The parts that need parentheses are any multiplied expressions that are NOT already in parentheses. For example i need to change :

a*b +c+ d*e*f + g

to

(a*b)+c+( d*e*f)+ g

another example .. change:

(a1+b1) + ( c1*d1) + e1*f1*g1*h1 + J1

to

(a1+b1) + ( c1*d1) + (e1*f1*g1*h1) + J1

Thanks in advance