copied ex3 from book
ex3 was actually ex4