added docstring to describe arguments. I don't intend to do this for every function; just those that i need to understand best.