change from double to float to speed up