changed routes to use resources