global variable issue SOLVED