making use of fragments to show mainContent