case search doesn't exhaustive, should compact links result to remove nil values