added some code to ch1