added pan handler