updates to ERP reverse correlation code.