add the task2 code