added changes to ch6-exercise2