Add cost calculation