added snippets for demo 3