make testable interface for matchers
tests and bug fixes