add segment file parsing