Added update logic in server.