implementing  up to combine function