updates routes and model