added more code snippets