second table tests passing, refactoring started