Made searchFirst function