fixed boundary issue where last bin contained only half the range as other bins