Add documentation and comment code for ch5
Add documentation and comment code for ch5