complete basic search function