replace braces with do-end