correcting curly brackets