added pan gesture recognizer method