Implemented rounding correctly