updated ex3 and ex4