lab8.py finished and functional