ex1-31 solved