added ex3, ex4, ex5 and ex6