complete search function design