refactor the code - pep8