removed snippet and added code to write snippets in