fixed problem 6