add and remove some parentheses