solving question 7