added more routes and debug mode