added persistence to mode