update using thunkify