few js snippets