slight changes to source code in order to respect pep8 syntax