++ some docstrings, minor bugs