update gesture detection