make collectNodes in the backend, which tests the membership of nodes