completely implement search