adapted to new table classes