fixed and improved the c++ challenge demo