refactored for clarity
pep-8 updates