minor updates to ch4 code