makes nested recursive variations work