analyze past spending