finished ex1(optional)