updates factory to make browserify work...