trimmed the input strings