solved ex. 1