made some variable global