attempted exercise 1 from week2