merge the function