added test and added  global to be null