add unique path and generate parenthesis