Added ability to provide a custom merging strategy