completed insertExpense function (with some leftover TODOS)