handle windows newlines correctly