added and updated comments to follow PEP format for docstrings