changed precision to float where appropriate