longest valid parentheses, not perfect