added pan gesture support