initial version of homework2.py