add resource and match