solved exercise 3
solved ex1