minor changes and docstrings