updated to support resource filtering