diff --git a/accton/accton_util.py b/accton/accton_util.py
index d38bb78..e12cc63 100755
--- a/accton/accton_util.py
+++ b/accton/accton_util.py
@@ -276,7 +276,7 @@
 
     action=[]
     action.append(ofp.action.set_field(ofp.oxm.eth_src(src_mac)))
-    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(vlanid)))       
+    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vlanid)))       
     action.append(ofp.action.group(group_id))
     
     buckets = [ofp.bucket(actions=action)]
@@ -779,32 +779,30 @@
 
     return request        
 
-def add_mpls(ctrl, action_group_id, label=100 ,ethertype=0x0800, bos=1, vrf=1, send_barrier=False):
+def add_mpls_flow(ctrl, action_group_id=0x0, label=100 ,ethertype=0x0800, bos=1, vrf=1, goto_table=27, send_barrier=False):
     match = ofp.match()
     match.oxm_list.append(ofp.oxm.eth_type(0x8847))
     match.oxm_list.append(ofp.oxm.mpls_label(label))
     match.oxm_list.append(ofp.oxm.mpls_bos(bos))
     actions = [ofp.action.dec_mpls_ttl(),
-               #ofp.action.copy_ttl_in(),
-               ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf)),
-               ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=23, value=32)),
-               ofp.action.group(action_group_id)]
-               #ofp.action.pop_mpls(ethertype)]
-
+               ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf))]
+    if (goto_table == 29):
+            actions.append(ofp.action.set_field(
+                            ofp.oxm.exp2ByteValue(exp_type=23, value=32)))
+            actions.append(ofp.action.group(action_group_id))
+    else:
+            actions.append(ofp.action.copy_ttl_in())
+            
     request = ofp.message.flow_add(
             table_id=24,
             cookie=43,
             match=match,
             instructions=[
-                    ofp.instruction.apply_actions(
-                        actions=actions
-                    ),
-                    #ofp.instruction.write_actions(
-                    ofp.instruction.goto_table(29)
+                    ofp.instruction.apply_actions(actions=actions),
+                    ofp.instruction.goto_table(goto_table)
                 ],
             buffer_id=ofp.OFP_NO_BUFFER,
             priority=1)
-
     logging.info("Inserting MPLS flow , label %ld", label)
     ctrl.message_send(request)
 
@@ -813,44 +811,6 @@
 
     return request
 
-
-
-def add_mpls_flow(ctrl, action_group_id=0x0, label=100 ,ethertype=0x0800, bos=1, vrf=1, send_barrier=False):
-    match = ofp.match()
-    match.oxm_list.append(ofp.oxm.eth_type(0x8847))
-    match.oxm_list.append(ofp.oxm.mpls_label(label))
-    match.oxm_list.append(ofp.oxm.mpls_bos(bos))
-    actions = [ofp.action.dec_mpls_ttl(),
-               ofp.action.copy_ttl_in(),
-               ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf)),
-               ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=23, value=32))]
-               #ofp.action.group(action_group_id)]
-               #ofp.action.pop_mpls(ethertype)]
-   
-    request = ofp.message.flow_add(
-            table_id=24,
-            cookie=43,
-            match=match,
-            instructions=[
-                    ofp.instruction.apply_actions(
-                        actions=actions
-                    ),
-                    #ofp.instruction.write_actions(
-                    #    actions=[ofp.action.group(action_group_id)]),
-                    ofp.instruction.goto_table(27)
-                ],
-            buffer_id=ofp.OFP_NO_BUFFER,
-            priority=1)
-
-    logging.info("Inserting MPLS flow , label %ld", label)
-    ctrl.message_send(request)
-
-    if send_barrier:
-        do_barrier(ctrl)
-
-    return request
-
-
 def add_mcast4_routing_flow(ctrl, vlan_id, src_ip, src_ip_mask, dst_ip, action_group_id, send_barrier=False):
     match = ofp.match()
     match.oxm_list.append(ofp.oxm.eth_type(0x0800))
diff --git a/ofdpa/flows.py b/ofdpa/flows.py
index 1ec015d..f09e99b 100755
--- a/ofdpa/flows.py
+++ b/ofdpa/flows.py
@@ -1058,7 +1058,6 @@
         delete_all_flows(self.controller)
         delete_groups(self.controller, Groups)
 
-@disabled
 class L3McastToL3(base_tests.SimpleDataPlane):
     """
     Mcast routing
@@ -1177,33 +1176,17 @@
                     subtype=OFDPA_MPLS_GROUP_SUBTYPE_SWAP_LABEL,
                     index=id, ref_gid=mpls_gid, push_mpls_header=False,
                     set_mpls_label=port, set_bos=1)
-                    #, set_ttl=32)
-            mpls_ecmp_gid, mpls_ecmp_msg = add_mpls_forwarding_group(
-                    self.controller,
-                    subtype=OFDPA_MPLS_GROUP_SUBTYPE_ECMP,
-                    index=id, 
-                    ref_gids=[mpls_label_gid])
-            # add L3 Unicast  group
-            l3_msg = add_l3_unicast_group(self.controller, port, vlanid=vlan_id,
-                                          id=id, src_mac=intf_src_mac,
-                                          dst_mac=dst_mac)
-            # add L3 ecmp group
-            ecmp_msg = add_l3_ecmp_group(self.controller, id, [l3_msg.group_id])
             # 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, port, 0x8847, intf_src_mac,
                                  vlan_id, goto_table=24)
-            #add_mpls_flow(self.controller, ecmp_msg.group_id, port)
-            add_mpls(self.controller, mpls_label_gid, port)
+            add_mpls_flow(self.controller, mpls_label_gid, port, goto_table=29)
             dst_ip = dip + (vlan_id << 8)
-            #add_unicast_routing_flow(self.controller, 0x0800, dst_ip, 0xffffff00,
-            #          ecmp_msg.group_id, 1)
             Groups._put(l2_gid)
             Groups._put(mpls_gid)
-            Groups._put(l3_msg.group_id)
-            Groups._put(ecmp_msg.group_id)
+            Groups._put(mpls_label_gid)
         do_barrier(self.controller)
 
         switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
