logic of Application process is here