complete mergeCodeTables and convert