upgraded added debugging to the routes