fixed problem 5, solutions complete