Upgrading technology and hiring staff to implement the work requirement will cost many states tens of millions.