updated routes and api