worked on global variable