Finished first pass of search function