Complete Ex3.