refactoring for pep8