solving question 8