added persistence switching