update can take a callback