changed matching method