finish package refactoring