corrected addIncome function and tested