rounding before converting to int