removing excessive newlines