refactor package.pp