code style and formating changes to fit pep8