converted all doubles to floats because they are smaller and faster on ARM