ex4 almost complete