added some tests
Automatic style corrections courtesy of autopep8