What's the significance of the return value of this function? Could do with a docstring to clarify