tried adding window.localStorage in loop