new enum app state func working