Solution for problem 4.4 added