made it more browserify friendly