adding local storage persistence of preferences