change update api to support transactions