define app_mode