where is the search loop failing

using print statements :D