correct integration and progress bar at c++ level