goal tests, refactorings