add segment.c comments