more changes  for exit()