add update function
Merge branch 'update-function'