update from gjun then add function