added optional trimming to segment evaluator