Added new solution for problem 7.