solved q2.40