adding js snippets