implemented the complete search design