added loading view and mainview