refactor code using pep8