added docstring with type