correct handling of the new line symbol