Moved code because of global var