added totatl spending variable