using localstorage instead of a window array