finished ex2.q1