Use Math.round instead of Math.floor