implementation of exercise 4 started