optimization first_segment-spect.js