Implemented task2