pep8
doc string
minor refactoring