added ex4.