use a single global variable