updated application logic