Task2 Code