modified Hw6.ipynb