added clearLocalStorage function