variables local & global bug with pointers fixed