remove duplicate newlines according to CS