added top level codes to individual tables