Final changes I made for stageIV in python