finished ex1.2