solved q2.30