added ability to run in the browser!