Gesture optimization