added unit tests for better coverage
pep8 fixes