merging nodes