add source codes of section 2 and section 3