changed the max value to accomodate the gravity threshold