histogram implementation ic