Updated the code to use LocalStorage