removing excess whitespace at end of line