add CM associated with best index to the JSON