Better getTable method