tried to refactor pep8 conformity