added line-ending normalization