added pelin's binning