use decelerate function for drag