task 1 exercise 7 implemented