Added “r” gesture recognition to the code