fixed histogram according to David Hood at discussion forum