added some code snippets.