Added problem 6, fixed problem 5 docstring