added internalMerge