new doc gen , mergeRecords deprecated