strips all trailing whitespaces