resource refactoring