changed spenderdata variable to global