refactored with nested resources example