First try of implementing gesture recognition