modified the algorithm to compute delta between 2 gestures and threshold