update some function but not tested