Implemented task 1.