use localstorage to store model