Added Task2 code