Calculate cxc properly