Realization of exercise 1.1