Added in updating shadow costs.