Changed cost calculation