remove leading and trailing whitespace