small resource refactoring