solved till problem 2.7
solved till problem 3.3