added solutions for q1 and q2