didnt include the function to write from localstorage to array