update some function