implemented task 2