implement resource name matching