add edges in merger