Finished ex2.