moar resource refactoring