added explanation of q3 solution