tweaks to js snippets