replacing missing parentheses