refactor of packages