Can you add a little docstring (or at least comments) explaining what this does.