code examples to ex1