Moved Exercise 1 to Assignment3 function