added code examples to demos