added persistence and analytics