added more app logic