add parenthesisMatching using stack