base function to collect neighbors for join process;