removing trailing whitespace