python3 version of 1-7 + unit testing
python3 version of exercise 1-8 + unit testing
cleanup redundant code