added pan function
merge