Using reduce in solution to problem 5.