Restructured ex1 and ex2 ,separating the two
Exercise 3