float -> double; tidy code