Fix critical bug in compute cost
Work on parallel collaboration