removing unneeded newlines