added localstorage support saving and loading