matching for tuple