implemented alert switch behavior, added persistence to alert switch