support resource patterns (issue #2)