added ex1.2 and ex1.3