refactored a package