more testing and fixing.  Hopefully setting a global that can then be "heard" outside of for loop