removes trailing whitespace