refactored
Added rounding