added docstrings
minor cleanup