updated to work with browserify v3