Changed doubles to float.