refactored to use a nil pointer for registering matchers