basic search code completed