add solution for valid parentheses