removing extra parentheses