diff --git a/accton/accton_util.py b/accton/accton_util.py
index aeff03f..5823a65 100755
--- a/accton/accton_util.py
+++ b/accton/accton_util.py
@@ -421,7 +421,7 @@
     # goto to table 20
     msgs=[]
     for of_port in ports:
-        if (flag == VLAN_TABLE_FLAG_ONLY_TAG) or (flag == VLAN_TABLE_FLAG_ONLY_BOTH):
+        if (flag == VLAN_TABLE_FLAG_ONLY_TAG) or (flag == VLAN_TABLE_FLAG_ONLY_BOTH) or (flag == 4):
             match = ofp.match()
             match.oxm_list.append(ofp.oxm.in_port(of_port))
             match.oxm_list.append(ofp.oxm.vlan_vid(0x1000+vlan_id))
@@ -462,6 +462,27 @@
             ctrl.message_send(request)
             msgs.append(request)
 
+        if (flag == 4) :
+            match = ofp.match()
+            match.oxm_list.append(ofp.oxm.in_port(of_port))
+            match.oxm_list.append(ofp.oxm.vlan_vid_masked(0x1000, 0x1fff))
+            request = ofp.message.flow_add(
+                table_id=10,
+                cookie=42,
+                match=match,
+                instructions=[
+                  ofp.instruction.apply_actions(
+                    actions=[
+                      ofp.action.set_field(ofp.oxm.vlan_vid(vlan_id))
+                    ]
+                  ),
+                  ofp.instruction.goto_table(20)
+                ],
+                priority=0)
+            logging.info("Add vlan %d untagged packets on port %d and go to table 20" % (vlan_id, of_port))
+            ctrl.message_send(request)
+            msgs.append(request)
+
     if send_barrier:
         do_barrier(ctrl)
 
@@ -551,7 +572,7 @@
 def add_one_vlan_table_flow(ctrl, of_port, vlan_id=1, vrf=0, flag=VLAN_TABLE_FLAG_ONLY_BOTH, send_barrier=False):
     # table 10: vlan
     # goto to table 20
-    if (flag == VLAN_TABLE_FLAG_ONLY_TAG) or (flag == VLAN_TABLE_FLAG_ONLY_BOTH):
+    if (flag == VLAN_TABLE_FLAG_ONLY_TAG) or (flag == VLAN_TABLE_FLAG_ONLY_BOTH) or (flag == 4):
         match = ofp.match()
         match.oxm_list.append(ofp.oxm.in_port(of_port))
         match.oxm_list.append(ofp.oxm.vlan_vid_masked(0x1000+vlan_id,0x1fff))
@@ -600,6 +621,31 @@
             priority=0)
         logging.info("Add vlan %d untagged packets on port %d and go to table 20" % (vlan_id, of_port))
         ctrl.message_send(request)
+    
+    if (flag == 4) :
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.in_port(of_port))
+        match.oxm_list.append(ofp.oxm.vlan_vid_masked(0x1000,0x1fff))
+
+        actions=[]
+        if vrf!=0:
+            actions.append(ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf)))
+
+        actions.append(ofp.action.set_field(ofp.oxm.vlan_vid(value=vlan_id)))
+
+        request = ofp.message.flow_add(
+            table_id=10,
+            cookie=42,
+            match=match,
+            instructions=[
+                ofp.instruction.apply_actions(
+                     actions=actions
+                ),
+                ofp.instruction.goto_table(20)
+            ],
+            priority=0)
+        logging.info("Add vlan %d tagged packets on port %d and go to table 20" %( vlan_id, of_port))
+        ctrl.message_send(request)
 
     if send_barrier:
         do_barrier(ctrl)
diff --git a/ofdpa/flows.py b/ofdpa/flows.py
index 44184b3..e4df84e 100644
--- a/ofdpa/flows.py
+++ b/ofdpa/flows.py
@@ -119,7 +119,7 @@
             priority=40000)
         self.controller.message_send(request)
         for port in ports:
-            add_one_l2_interface_group(self.controller, port, 1, True, False)
+            add_one_l2_interface_group(self.controller, port, 1, False, False)
             add_one_vlan_table_flow(self.controller, port, 1, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
             group_id = encode_l2_interface_group_id(1, port)
             add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
@@ -149,8 +149,6 @@
 
                 verify_no_other_packets(self)
 
-
-
 class PacketInArp(base_tests.SimpleDataPlane):
     """
     Test packet in function for a table-miss flow
@@ -200,7 +198,6 @@
 
             verify_no_other_packets(self)
 
-
 class L2FloodQinQ(base_tests.SimpleDataPlane):
     """
     Test L2 flood of double tagged vlan packets (802.1Q)
@@ -240,7 +237,6 @@
 
         verify_no_other_packets(self)
 
-
 class L2FloodTagged(base_tests.SimpleDataPlane):
     """
     Test L2 flood to a vlan
@@ -655,7 +651,7 @@
             l2_gid, l2_msg = add_one_l2_interface_group(self.controller, port, vlan_id, True, False)
             dst_mac[5]=vlan_id
             #add L3 Unicast  group
-            l3_msg=add_l3_unicast_group(self.controller, port, vlanid=vlan_id, id=vlan_id, src_mac=intf_src_mac, dst_mac=mcast_mac)
+            l3_msg=add_l3_unicast_group(self.controller, port, vlanid=vlan_id, id=vlan_id, src_mac=intf_src_mac, dst_mac=dst_mac)
             #add L3 ecmp group
             ecmp_msg = add_l3_ecmp_group(self.controller, port, [l3_msg.group_id])
             #add vlan flow table
@@ -690,7 +686,7 @@
                 mac_dst='00:00:00:22:22:%02X' % out_port
                 mcast='01:00:5e:00:00:01'
                 exp_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=out_port,
-                    eth_dst=mcast, eth_src=switch_mac, ip_ttl=31, ip_src=ip_src, ip_dst=ip_dst) 
+                    eth_dst=mac_dst, eth_src=switch_mac, ip_ttl=31, ip_src=ip_src, ip_dst=ip_dst) 
                 pkt=str(exp_pkt)
                 verify_packet(self, pkt, out_port)
                 verify_no_other_packets(self)
@@ -780,8 +776,8 @@
         """
         port1 (vlan 300)-> All Ports (vlan 300)
         """
-        delete_all_flows(self.controller)
-        delete_all_groups(self.controller)
+        #delete_all_flows(self.controller)
+        #delete_all_groups(self.controller)
 
         if len(config["port_map"]) <3:
             logging.info("Port count less than 3, can't run this case")
@@ -809,12 +805,11 @@
         #add l2 interface group
         l2_intf_group_list=[]
         for port in config["port_map"].keys():
+            add_one_vlan_table_flow(self.controller, port, vlan_id, flag=4) 
             if port == port2:
                 continue
             l2_intf_gid, msg=add_one_l2_interface_group(self.controller, port, vlan_id=vlan_id, is_tagged=True, send_barrier=False)
             l2_intf_group_list.append(l2_intf_gid)
-            #add vlan flow table
-            add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_TAG)
 
         #add termination flow
         add_termination_flow(self.controller, port1, 0x0800, switch_mac, vlan_id)
@@ -823,7 +818,8 @@
         mcat_group_msg=add_l3_mcast_group(self.controller, vlan_id,  2, l2_intf_group_list)
         add_mcast4_routing_flow(self.controller, vlan_id, src_ip, 0, dst_ip, mcat_group_msg.group_id)
 
-        parsed_pkt = simple_udp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=300,
+        parsed_pkt = simple_udp_packet(pktlen=100, 
+                                       dl_vlan_enable=True, 
                                        eth_dst=dst_mac_str,
                                        eth_src=port1_mac_str,
                                        ip_ttl=64,
@@ -964,8 +960,6 @@
         mpls_label_gid3, mpls_label_msg = add_mpls_label_group(self.controller, subtype=OFDPA_MPLS_GROUP_SUBTYPE_L3_VPN_LABEL,
                      index=(0x10000+port3), ref_gid= mpls_gid3, push_mpls_header=True, set_mpls_label=port3, set_bos=1, cpy_ttl_outward=True)
 
-
-
         mcat_group_msg=add_l3_mcast_group(self.controller, in_vlan,  2, [0x92020022 , 0x92010023])
         add_mcast4_routing_flow(self.controller, in_vlan, src_ip, 0, dst_ip, mcat_group_msg.group_id)
 
