Solution for q2