some global varaibles to local