Added update method that allows one to provide a callback