task 4 and correct task 3 docstring