Modified loop in erstertest.py