Finished ex3.