solved problem 8, added file for problem 9