smooth out gesture detection