revised doc, section titles, and added examples for sort functions