code before changing globalVariable to localstorage