extracted search to new class