Implemented task 5