Refactor columns matching method