Using global variable to persist addresses