added trim tolerance