Added check balanced parentheses