generate the proper closing braces for cond. WARNING: assumes cond is the entire function body