tweaked line ending removal