set up the update logic