Last exercises from the chapter 3