adds pan gesture recognizer