added subsidy calculation