solve exercise 6.3