initial commit, passes tests, pep8 and pyflakes checks
docstring and comment tweaks