Small changes for binning