add ch 4 code until Exception error
ch 4 code