refs #9769 Reverting the changes to C++ code

related to debugging the python algorithm