replace local storage with global variable for dictionary