diff --git a/xos/models/models.py b/xos/models/models.py
index 4493452..295c172 100644
--- a/xos/models/models.py
+++ b/xos/models/models.py
@@ -1,4 +1,3 @@
-from core.models import Service
 from xos.exceptions import XOSValidationError
 
 from models_decl import ProgranService_decl
diff --git a/xos/models/progran.xproto b/xos/models/progran.xproto
index 8591291..ad0a378 100644
--- a/xos/models/progran.xproto
+++ b/xos/models/progran.xproto
@@ -41,14 +41,14 @@
     required int32 UlAllocRBRate = 4 [db_index = False, null = False, blank = False];
     required string start = 5 [content_type = "date", null = True, blank = True];
     required string end = 6 [content_type = "date", null = True, blank = True];
-    required int32 AdmControl = 7 [default = "0", choices = "(('0', 'ALL'), ('1', 'Voice Only'), ('2', 'Data Only'))", max_length = 1, blank = False, null = False, db_index = False];
+    required int32 AdmControl = 7 [default = "0", choices = "(('0', 'ALL'), ('1', 'Voice Only'), ('2', 'Data Only'))", blank = False, null = False, db_index = False];
     required int32 CellIndividualOffset = 8 [db_index = False, null = False, blank = False];
     required string mmeip = 9 [db_index = False, max_length = 256, null = False, blank = False];
     required string mmeport = 10 [db_index = False, max_length = 256, null = False, blank = False];
     required int32 DlWifiRate = 11 [default = 100, db_index = False, null = False, blank = False];
     required int32 DlUeAllocRbRate = 12 [default = 100, db_index = False, null = False, blank = False];
     required string SubsProfile = 13 [ db_index = False, null = True, blank = True];
-    required manytoone enodeb->ENodeB:profiles = 14 [null = True, blank = True];
+    optional manytoone enodeb->ENodeB:profiles = 14 [null = True, blank = True];
     required manytoone handover->Handover:profiles = 15 [null = False, blank = False];
 }
 
diff --git a/xos/synchronizer/steps/progran_curl.yaml b/xos/synchronizer/steps/progran_curl.yaml
index f567a3b..cf76f6f 100644
--- a/xos/synchronizer/steps/progran_curl.yaml
+++ b/xos/synchronizer/steps/progran_curl.yaml
@@ -16,12 +16,12 @@
 - hosts: 127.0.0.1
   connection: local
   vars:
-    - profile: '{{ profile }}'
+    - body: '{{ body }}'
     - endpoint: '{{ endpoint }}'
 
   tasks:
     - debug:
-        msg: "{{ '{{' }} profile {{ '}}' }}"
+        msg: "{{ '{{' }} body {{ '}}' }}"
     # NOTE that the task has a generic name as it's planned to be used for all the requests
     - name: Call onos Progran
       uri:
@@ -32,6 +32,6 @@
         force_basic_auth: yes
         status_code: 200
         {% if method == "POST" or method == "PUT" -%}
-        body: "{{ '{{' }} profile {{ '}}' }}"
+        body: "{{ '{{' }} body {{ '}}' }}"
         body_format: json
         {%- endif -%}
diff --git a/xos/synchronizer/steps/sync_enodeb.py b/xos/synchronizer/steps/sync_enodeb.py
index 8d65974..db5bca9 100644
--- a/xos/synchronizer/steps/sync_enodeb.py
+++ b/xos/synchronizer/steps/sync_enodeb.py
@@ -24,12 +24,15 @@
 from multistructlog import create_logger
 import json
 
-from helpers import ProgranHelpers
 
 log = create_logger(Config().get('logging'))
 
 parentdir = os.path.join(os.path.dirname(__file__), "..")
+
 sys.path.insert(0, parentdir)
+sys.path.insert(0, os.path.dirname(__file__))
+
+from helpers import ProgranHelpers
 
 class SyncProgranEnodeB(SyncInstanceUsingAnsible):
     provides = [ENodeB]
@@ -59,7 +62,7 @@
             'onos_password': onos['password'],
             'onos_port': onos['port'],
             'endpoint': 'enodeb',
-            'profile': self.get_progran_enodeb_field(o),
+            'body': self.get_progran_enodeb_field(o),
             'method': 'POST'
         }
 
diff --git a/xos/synchronizer/steps/sync_imsi.py b/xos/synchronizer/steps/sync_imsi.py
new file mode 100644
index 0000000..e4db047
--- /dev/null
+++ b/xos/synchronizer/steps/sync_imsi.py
@@ -0,0 +1,83 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+import os
+import sys
+from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+from synchronizers.new_base.ansible_helper import run_template
+from synchronizers.new_base.modelaccessor import MCordSubscriberInstance
+
+from xosconfig import Config
+from multistructlog import create_logger
+import json
+
+
+log = create_logger(Config().get('logging'))
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+sys.path.insert(0, os.path.dirname(__file__))
+from helpers import ProgranHelpers
+
+class SyncProgranIMSI(SyncInstanceUsingAnsible):
+    provides = [MCordSubscriberInstance]
+
+    observes = MCordSubscriberInstance
+
+    def skip_ansible_fields(self, o):
+        # FIXME This model does not have an instance, this is a workaroung to make it work,
+        # but it need to be cleaned up creating a general SyncUsingAnsible base class
+        return True
+
+    def get_progran_imsi_field(self, o):
+
+        imsi = {
+            "IMSI": o.imsi_number,
+        }
+        imsi = json.dumps(imsi)
+        return imsi
+
+    def get_extra_attributes(self, o):
+        onos = ProgranHelpers.get_progran_onos_info()
+        fields = {
+            'onos_url': onos['url'],
+            'onos_username': onos['username'],
+            'onos_password': onos['password'],
+            'onos_port': onos['port'],
+            'endpoint': 'imsi',
+            'body': self.get_progran_imsi_field(o),
+            'method': 'POST'
+        }
+
+        return fields
+
+    # FIXME we need to override this as the default expect to ssh into a VM
+    def run_playbook(self, o, fields):
+        run_template("progran_curl.yaml", fields, object=o)
+
+    def delete_record(self, o):
+        log.info("deleting object", object=str(o), **o.tologdict())
+        onos = ProgranHelpers.get_progran_onos_info()
+        fields = {
+            'onos_url': onos['url'],
+            'onos_username': onos['username'],
+            'onos_password': onos['password'],
+            'onos_port': onos['port'],
+            'endpoint': 'imsi/%s' % o.imsi_number,
+            'body': '',
+            'method': 'DELETE'
+        }
+        res = self.run_playbook(o, fields)
\ No newline at end of file
diff --git a/xos/synchronizer/steps/sync_imsi_link.py b/xos/synchronizer/steps/sync_imsi_link.py
new file mode 100644
index 0000000..059b789
--- /dev/null
+++ b/xos/synchronizer/steps/sync_imsi_link.py
@@ -0,0 +1,97 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+import os
+import sys
+from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+from synchronizers.new_base.ansible_helper import run_template
+from synchronizers.new_base.modelaccessor import MCordSubscriberInstance, ServiceInstanceLink
+
+from xosconfig import Config
+from multistructlog import create_logger
+import json
+
+
+log = create_logger(Config().get('logging'))
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+sys.path.insert(0, os.path.dirname(__file__))
+from helpers import ProgranHelpers
+
+class SyncProgranIMSILink(SyncInstanceUsingAnsible):
+    provides = [ServiceInstanceLink]
+
+    observes = ServiceInstanceLink
+
+    def skip_ansible_fields(self, o):
+        # FIXME This model does not have an instance, this is a workaroung to make it work,
+        # but it need to be cleaned up creating a general SyncUsingAnsible base class
+        return True
+
+    def get_progran_imsi_field(self, o):
+
+        imsi = {
+            "IMSIRuleArray": [
+                '123' # TODO retrieve it service_instance_link.subscriber_service_instance.imsi_number
+            ]
+        }
+        imsi = json.dumps(imsi)
+        return imsi
+
+    def get_extra_attributes(self, o):
+
+
+        return fields
+
+    def sync_record(self, o):
+        log.info("sync'ing profile", object=str(o), **o.tologdict())
+        # onos = ProgranHelpers.get_progran_onos_info()
+        # profile_name = 'foo' # TODO retrieve it service_instance_link.subscriber_service_instance.imsi_number
+        #
+        # fields = {
+        #     'onos_url': onos['url'],
+        #     'onos_username': onos['username'],
+        #     'onos_password': onos['password'],
+        #     'onos_port': onos['port'],
+        #     'endpoint': 'profile/%s/imsi' % profile_name,
+        #     'body': self.get_progran_imsi_field(o),
+        #     'method': 'POST'
+        # }
+        # fields = {}
+        # self.run_playbook(o, fields)
+        # o.save()
+        print o
+
+    # FIXME we need to override this as the default expect to ssh into a VM
+    def run_playbook(self, o, fields):
+        run_template("progran_curl.yaml", fields, object=o)
+
+    def delete_record(self, o):
+        log.info("deleting object", object=str(o), **o.tologdict())
+        # onos = ProgranHelpers.get_progran_onos_info()
+        # profile_name = 'foo'
+        # imsi_number = 'bar'
+        # fields = {
+        #     'onos_url': onos['url'],
+        #     'onos_username': onos['username'],
+        #     'onos_password': onos['password'],
+        #     'onos_port': onos['port'],
+        #     'endpoint': 'profile/{profile_name}/{imsi}' % (profile_name, imsi_number),
+        #     'body': '',
+        #     'method': 'DELETE'
+        # }
+        # self.run_playbook(o, fields)
\ No newline at end of file
diff --git a/xos/synchronizer/steps/sync_progranserviceinstance.py b/xos/synchronizer/steps/sync_progranserviceinstance.py
index 3b8e0d3..4daf104 100644
--- a/xos/synchronizer/steps/sync_progranserviceinstance.py
+++ b/xos/synchronizer/steps/sync_progranserviceinstance.py
@@ -24,12 +24,13 @@
 from multistructlog import create_logger
 import json
 
-from helpers import ProgranHelpers
 
 log = create_logger(Config().get('logging'))
 
 parentdir = os.path.join(os.path.dirname(__file__), "..")
 sys.path.insert(0, parentdir)
+sys.path.insert(0, os.path.dirname(__file__))
+from helpers import ProgranHelpers
 
 class SyncProgranServiceInstance(SyncInstanceUsingAnsible):
     provides = [ProgranServiceInstance]
@@ -93,7 +94,7 @@
         # progran profile specific fields
         profile_fields = {
             'endpoint': 'profile',
-            'profile': self.get_progran_profile_field(o),
+            'body': self.get_progran_profile_field(o),
             'method': 'POST'
         }
         profile_fields["ansible_tag"] = getattr(o, "ansible_tag", o.__class__.__name__ + "_" + str(o.id))
@@ -104,7 +105,7 @@
         if o.enodeb:
             log.info("adding profile to enodeb", object=str(o), **o.tologdict())
             enodeb_fields = {
-                'profile': json.dumps({
+                'body': json.dumps({
                     "ProfileArray": [
                         o.name
                     ]
@@ -135,7 +136,7 @@
             'onos_password': onos['password'],
             'onos_port': onos['port'],
             'endpoint': 'profile/%s' % o.name,
-            'profile': '',
+            'body': '',
             'method': 'DELETE'
         }
         res = self.run_playbook(o, fields)
\ No newline at end of file
