made the example consistent with the fuction definition and improved doc

made the example consistent with the fuction definition and improved doc
Merge pull request #2404 from yashdv:old_basic_structures_doc_fix