added pan functions