change trim function