adapt to new CSR API