Added loop and set item to local storage.