switched to floats instead of doubles