fixed typos; made example more robust