saving and restoring with sqllite is working