Changed double to float - should be faster