the code of ex4