added tests and did a small refactor of simpltetable