Code for my week 2 exam