adding gesture dection and processing code