10: refactoring routes to use resources