Math.round and refactoring