tail recursive merge done.