solution of problem 2/3