Solved till problem 2.5