refactoring resources