handle dos line endings