model to localStorage