small refactoring, tests not passing