add mergePhy function