more javascript snippets