refactoring resources to have a base define