modified exercise2