complete the common functions

complete the common functions