Added the persistent logic.