Modified exercise 1 and added exercise 2