Changed numSegments to 1000