Adding validates & test codes in Chap 7