Convert to new CSR API