introduce Table abstraction.

Also, fix a bug. When I inlined the method, it should have switched to