solved ex. 2