updated the docstrings.
minor code cleanup