ch6_ex8 and ch8_ex24