Adds solution to problem four