fixed problem 5
added problem 6