references merging