finish ex4.