more table implementation (almost there!)