corrected to_f calls to float()