fixes to snippets 8 and 9