pep8
docstring to method
better infrastructure for testing

simulation of input