start refactoring for tp3. all tests fail, but it compiles!