Reworked code, it passess the flake8 test.
passes flake8 test