docstring on the purpose of this function