added code to deal with parentheses