work in progress for matching method