removing redundant parentheses