fix pep8 and docstring formatting