refactor routes to use restful controllers