updated a4.py yet again