Added code examples to doc