localStorage saving code run in index.html