Did you read my last post on
== 1
regarding
histogram[i] == 1
?