refactor for PEP8, pylint