added some localstorage hackery