diff --git a/apps/int-demo/src/main/java/org/onosproject/intdemo/IntDemoApp.java b/apps/int-demo/src/main/java/org/onosproject/intdemo/IntDemoApp.java
index e883fdc..a93c414 100644
--- a/apps/int-demo/src/main/java/org/onosproject/intdemo/IntDemoApp.java
+++ b/apps/int-demo/src/main/java/org/onosproject/intdemo/IntDemoApp.java
@@ -64,7 +64,7 @@
 public class IntDemoApp {
 
     private static final int DEFAULT_TEID = 0;
-    protected final Logger log = getLogger(getClass());
+    private final Logger log = getLogger(getClass());
 
     private static final String SPGW_INT_PIPECONF_KEYWORD = "spgw-int";
     private static final String SPGW_DEVICE_KEYWORD = "leaf2";
@@ -74,20 +74,12 @@
             "160.0.2.1", "160.0.2.2", "160.0.2.3", "160.0.2.4", "160.0.2.5");
 
     private static final Map<String, Integer> SWITCH_ID_MAP = new ImmutableMap.Builder<String, Integer>()
-            .put("leaf1", 0)
-            .put("leaf2", 1)
+            .put("leaf1", 100)
+            .put("leaf2", 200)
             .build();
-
-    private static final PiTableId TBL_ID_INT_INST = PiTableId
-            .of("int_egress.int_metadata_insert.int_inst_0003");
     private static final PiTableId TBL_ID_INT_PREP = PiTableId
             .of("int_egress.int_prep");
 
-    private static final PiMatchFieldId FM_ID_INST_MASK = PiMatchFieldId
-            .of("hdr.int_header.instruction_mask_0003");
-
-    private static final PiActionId ACT_ID_INST_ALL = PiActionId
-            .of("int_egress.int_metadata_insert.int_set_header_0003_i15");
     private static final PiActionId ACT_ID_INT_TRANSIT = PiActionId
             .of("int_egress.int_transit");
 
@@ -166,28 +158,38 @@
                                         PiAction.builder()
                                                 .withId(ACT_ID_INT_TRANSIT)
                                                 .withParameter(new PiActionParam(
-                                                        ACTP_ID_SWITCH_ID, copyFrom(0)))
+                                                        ACTP_ID_SWITCH_ID, copyFrom(switchId.get())))
                                                 .build())
                                 .build())
                 .build();
 
-        FlowRule intIntrRule = flowRuleBuilder(deviceId, TBL_ID_INT_INST)
-                .withSelector(
-                        DefaultTrafficSelector.builder()
-                                .matchPi(
-                                        PiCriterion.builder()
-                                                .matchExact(FM_ID_INST_MASK, (byte) 0x0F)
-                                                .build())
-                                .build())
-                .withTreatment(
-                        DefaultTrafficTreatment.builder()
-                                .piTableAction(PiAction.builder()
-                                                       .withId(ACT_ID_INST_ALL)
-                                                       .build())
-                                .build())
-                .build();
+        for (String instMask : ImmutableList.of("0003", "0407")) {
+            for (int i = 0; i < 16; i++) {
+                PiTableId tableId = PiTableId
+                        .of("int_egress.int_metadata_insert.int_inst_" + instMask);
+                PiMatchFieldId fmId = PiMatchFieldId
+                        .of("hdr.int_header.instruction_mask_" + instMask);
+                PiActionId actionId = PiActionId
+                        .of("int_egress.int_metadata_insert.int_set_header_" + instMask + "_i" + String.valueOf(i));
+                FlowRule intIntrRule = flowRuleBuilder(deviceId, tableId)
+                        .withSelector(
+                                DefaultTrafficSelector.builder()
+                                        .matchPi(
+                                                PiCriterion.builder()
+                                                        .matchExact(fmId, (byte) i)
+                                                        .build())
+                                        .build())
+                        .withTreatment(
+                                DefaultTrafficTreatment.builder()
+                                        .piTableAction(PiAction.builder()
+                                                               .withId(actionId)
+                                                               .build())
+                                        .build())
+                        .build();
 
-        flowRuleService.applyFlowRules(intPrepRule, intIntrRule);
+                flowRuleService.applyFlowRules(intPrepRule, intIntrRule);
+            }
+        }
     }
 
     private void confSpgw(DeviceId deviceId) {
