updating code from pep8 cleanup