make main table work (sort of)