refactored restaurants controller