make main app logic