changed TABLE references to PRIMARY_TABLE