ex4 finished, all tests pass