modified first_segment.js