add matches method in ParseQuery