completed updateIncome function