added handling for parens