added parsing to assignment5.py