simulation now working for task 1