added browser support - closes #2