trim the output text