added some docstrings.