Solution for q1