karma: rewording and pep8 cleanup
karma: slightly less repetitive code