Add functions of charpter 5
Add functions of charpter 7