local storage FINALLY working correctly