implemented matching method