viewtable method