refactoring for package structures