code for application 1