removing all trailing whitespaces