added js snippets