Got it woprking on both nodejs and browser