update some function.