round to nearest integer instead of down. Do to floating point inaccuracy, this led to

wrong numbers before