remove excess newlines