fix typos and tidy up formatting of example