Changed double values to float for better memory usage