automatically close curly brackets