update some functions.