exercise 1 implemented