ex2 finished; all tests pass