prepare update routine