modified routes, added update function