task3 with docstring