add docstrings, better names for things