removing extraneous parentheses