remove trailing whitespace from each line