added docstring and class