extract search_result into a separate class