fixing mismatched brace and some minor edits.