resources refactoring