add docstring and spacing