slightly more powerful/explicit dmerge function example