made module usable in browser as well
updated to use the browser-usable version