Edits and improve two code examples