correction brackets and remove new lines