Solve exercise 5.3