better persistance logic