setting up main application