test for nested parentheses