change the c api code