passing node selection to gadgets