adds feedback loop to the exhaustive search algorithm