added update functionality, update in controller and router