added tests for merging