CS311: Add main loop to compute for comm with manage