added app state to session