solution for problem four