refactoring pan operation