Added a new solution to problem 5