longest valid parantheses and wildcard matching added