added map merge function (untested