changed lab8.py readability