update routine