Completed ex4.