merge common functions to extend