refactoring using package