Update code to use ac_staging table