correct brace and paranthesis errors