Finished iterative search

not super optimized or anything