update functions.