testing merging function