added opts.mergeLeaf