add docstring and better function name