Why not just do the rounding in lines 71 and 72 above, eliminating the iteration and mutation?