- implementation of the merging process