Update segment.js