adding algorithm for generating the well parenthesized parenthesis