Add comments to segment functions into different sections
Add functions in charpter 4