solving question 8 - changes