works in the browser, not in node