refactoring + pep8