added default tpid
collapsed all table methods into one