remove space at end of the line