latest code for spendnalyser