main cpp fixed.