exercise2 and 3