log binning was still buggy, fixed and added a unit test.