remove the whitespace at the end of line