fix the IRcode error and add the converge part