add testing functions with python's unittest library
miscellaneous whitespace edits and print statements