application_view function