solve exercise 4.1