routine merge