reformat codes and fix bugs for capture index ic jc and kc
modified cpml