with node and edge sampling methods