add soln for exer 4-7