A normal variable should be enough, so needn't a global variable in here.