general package refactoring