updated example for the browser.