added phase3 search functionality