removed lodash, added compatibility with node and browser