using Math.round for more flexible