improved PEP8 compliance
slight refactoring