removing trailing whitespaces