setup routes and added stats