added docstrings, minor updates