added global  variable explanation