diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index c8566b0f0519024e7e1f5b69143a3c65e183a958..05a9f4b5469082fb03ebcad6831dc019a84d9f6b 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -553,7 +553,7 @@ module OneM2M_Templates {
 			/**
 			 * @desc Base CREATE request primitive for remoteCSE resource
 			 */
-			template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := {
+			template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE1_ID) modifies m_create := {
 				requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000),
 				resourceType := int16,
 				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
@@ -833,8 +833,9 @@ module OneM2M_Templates {
 																		   in template (omit) BatchNotify p_batchNotify := omit,
 																		   in template (omit) XSD.Boolean p_latestNotify := omit,
 																		   in template (omit) XSD.AnyURI p_subscriberURI := omit,
-																		   in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := {
-				primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}
+																		   in template (omit) NotificationContentType p_notificationContentType := int1, 
+																		   in template (omit) PendingNotification p_pendingNotification) modifies m_createSubscription := {
+				primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType, p_pendingNotification)}
 			};
         	
 			/**
@@ -1496,10 +1497,12 @@ module OneM2M_Templates {
 																					in template (omit) BatchNotify p_batchNotify,
 																					in template (omit) XSD.Boolean p_latestNotify,
 																					in template (omit) XSD.AnyURI p_subscriberURI,
-																					in template (omit) NotificationContentType p_notificationContentType) modifies m_contentCreateSubscription := {
+																					in template (omit) NotificationContentType p_notificationContentType, 
+																					in template (omit) PendingNotification p_pendingNotification) modifies m_contentCreateSubscription := {
 			eventNotificationCriteria := p_eventNotificationCriteria,//O
 			expirationCounter := p_expirationCounter,//O
 			batchNotify := p_batchNotify,//O
+			pendingNotification := p_pendingNotification,//O
 			latestNotify := p_latestNotify,//O
 			notificationContentType := p_notificationContentType, //TODO Set to omit once xsd is fixed,//O
 			subscriberURI := p_subscriberURI//O
@@ -1521,9 +1524,9 @@ module OneM2M_Templates {
 			notificationEventType_list := p_notificationEventType_list// TODO this list should be able to be omited see 9.6.8 (TS0001)
 		};
         
-		template (value) BatchNotify m_batchNotifyNumber3Duration1 (in XSD.NonNegativeInteger p_number) := {
+		template (value) BatchNotify m_batchNotify (in XSD.NonNegativeInteger p_number) := {
 			number := p_number,
-			duration := "PT1S" //TODO duration has to be set to 1s and match to the Duration regex 
+			duration := "PT5S" //TODO duration has to be set to 1s and match to the Duration regex 
 		};
 		//normaly duration can be omited
 		
@@ -1606,7 +1609,7 @@ module OneM2M_Templates {
 		 * @desc Base primitiveContent for CREATE operation for Container resource
 		 * @param p_name Resource name
 		 */
-		template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID):= {
+		template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE1_ID):= {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn
index 5f6e2cf61b4517ed24c7c3b9dc6b4c777bdccfe7..d1b8423910e0be2e9bbc84de052ec107a5a1ef83 100644
--- a/OneM2M_Testcases.ttcn
+++ b/OneM2M_Testcases.ttcn
@@ -2218,7 +2218,6 @@ module OneM2M_Testcases {
 								p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; 
 								p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex));
 							}
-							v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex);
 							
 							if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){
 							
@@ -2226,6 +2225,8 @@ module OneM2M_Testcases {
 							
 							}
 							
+							v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex);
+														
 						} else {//Resource under CSEBase
 						
 							if(p_resourceType != int1) {
@@ -16369,8 +16370,8 @@ module OneM2M_Testcases {
 					// Preamble
 					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}, -)); 
-					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}), -, omit, omit, omit, -, omit); 
+				
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription 				
@@ -16581,7 +16582,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), omit, omit, -, int2);
 
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
 					
@@ -16597,7 +16598,8 @@ module OneM2M_Testcases {
 					f_cse_updateResource(v_request);
 					
 					v_updateRequest := m_updateAeBase;
-					v_updateRequest.primitiveContent.aE.labels := v_labels_2; 
+					v_updateRequest.requestIdentifier := "m_updateAe" & f_rnd(1, 1000000);
+					v_updateRequest.primitiveContent.aE.appName := "MyAppName2"; 
 					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2
 					f_cse_updateResource(v_request);
 
@@ -16715,7 +16717,7 @@ module OneM2M_Testcases {
 					// Preamble
 					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int2); //notificationContentType ="modified attributes"
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int2, omit); //notificationContentType ="modified attributes"
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
@@ -16798,7 +16800,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int3); // notificationContentType ="ResourceID"
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int3, omit); // notificationContentType ="ResourceID"
 					
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
 
@@ -16871,7 +16873,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 3);  //expirationCounter set to 3
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 3, omit, omit, omit, -, omit);  //expirationCounter set to 3
 					
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription
 					
@@ -16956,7 +16958,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 1);  //expirationCounter set to 1
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 1, omit, omit, omit, -, omit);  //expirationCounter set to 1
 					
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);// Subscription
 
@@ -17034,7 +17036,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList));
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList), omit, omit, omit, omit, -, omit);
 
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
 
@@ -17110,8 +17112,8 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration
-
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), omit, omit, -, omit );
+		
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
 					
 					if(v_notifyHandler.running) {
@@ -17176,7 +17178,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 						
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification), true);// TODO fix the duration
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), true, omit,  -, omit);
             		
 					//TODO We Need to check if the IUT send a notification only for the latest update operation
 					// like we match a Notification we have to verify if it is the first (unvalid behavior) or the last (valid behavior)
@@ -17246,7 +17248,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList));
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList), omit, omit, omit, omit, -, omit);
 
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
 
@@ -17321,7 +17323,7 @@ module OneM2M_Testcases {
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit,f_getResourceAddress(v_ae2Index)); // SubscriberURI ="ResourceID"
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit,f_getResourceAddress(v_ae2Index), -, omit); // SubscriberURI ="ResourceID"
 	
 					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription
 					
@@ -17421,7 +17423,7 @@ module OneM2M_Testcases {
 					// Preamble
 					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int2}, -));
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int2}, -), omit, omit, omit, omit, -, omit);
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
 								
@@ -17494,7 +17496,7 @@ module OneM2M_Testcases {
 
 					v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container
 					
-					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int4}, -));
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int4}, -), omit, omit, omit, omit, -, omit);
 					
 					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);