added trim bool