why use global variables. There are any references about why use global variables in here. you can look below.