results from task 3 simulation with corrected code