tried to fix createBins