updated the router to use app instead of main