finished searching functionality.