refactored Resource