start of the implementation of exercise 2