struggling with formulas for 2 cost matrices