removes whitespace from end of lines