recursive merge implemented