ex3 finished; output matches