changed router to use resources