resources refactor