corrected searchPop algorithm to actually optimize