solving question 6