refactor tests, start implementing table-driven tests