update some of the function