removes trailing whitespaces