sometimes lines contains carriage return in end