Changed all double to float