add soln. for exer 4-6