added sample code snippets