add localStorage saving and parsing