added q2 solution.