update and exercise 3 solution