working on data binning while reading