remove the space at the end of the line