added rounding function for floats