refactoring package resource