moved dll variable in global scope