diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index 023b8ec1543a3d4ae8f9a02aca5e412ec4893dc9..2f736c5dbd004414551c95fb2f5f9d39c6930f24 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -44,7 +44,7 @@ pipeline {
         disableConcurrentBuilds()
         timestamps()
         gitLabConnection('OAI GitLab')
-        gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO"])
+        gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO", "Test-TDD-Band78-gNB-NR-UE"])
         ansiColor('xterm')
     }
 
@@ -615,6 +615,25 @@ pipeline {
                         }
                     }
                 }
+                stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
+                    steps {
+                        script {
+                            triggerSlaveJob ('gNB-nrUE-MONO-TDD-Band78-N300', 'Test-TDD-Band78-gNB-NR-UE')
+                        }
+                    }
+                    post {
+                        always {
+                            script {
+                                finalizeSlaveJob('gNB-nrUE-MONO-TDD-Band78-N300')
+                            }
+                        }
+                        failure {
+                            script {
+                                currentBuild.result = 'FAILURE'
+                            }
+                        }
+                    }
+                }
             }
             post {
                 always {
diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran
index 3e0777b6a7247f1ad83ca817e509be50bcb361f2..7211a54bcfc38eb53a87cec4d957a15caac9be0e 100644
--- a/ci-scripts/Jenkinsfile-tmp-full-ran
+++ b/ci-scripts/Jenkinsfile-tmp-full-ran
@@ -54,6 +54,10 @@ def eNB_CommitID
 def eNB_AllowMergeRequestProcess = false
 def eNB_TargetBranch
 
+def doEpcLogCollection = true
+
+
+
 pipeline {
     agent {
         label pythonExecutor
@@ -61,7 +65,7 @@ pipeline {
     options {
         disableConcurrentBuilds()
         ansiColor('xterm')
-        lock(extra: [[resource: ciSmartPhoneResource]], resource: ciSmartPhoneResource)
+        lock(extra: [[resource: oaiUEResource]], resource: ciSmartPhoneResource)
     }
 
     stages {
@@ -139,6 +143,11 @@ pipeline {
 
                     if (params.EPC_IPAddress == null) {
                         allParametersPresent = false
+                    } else {
+                        if (params.EPC_IPAddress == "none") {
+                            doEpcLogCollection = false
+                            echo "No EPC collections (ping/iperf/hss/mme/spgw)"
+                        }
                     }
                     if (params.EPC_Type == null) {
                         allParametersPresent = false
@@ -167,8 +176,8 @@ pipeline {
                             sh "git checkout -f ${eNB_CommitID}"
                         }
                     } else {
-                        echo "Some parameters are missing"
-                        sh "./ci-scripts/fail.sh"
+                        currentBuild.result = 'ABORTED'
+                        error('Stopping early because some parameters are missing')
                     }
                 }
             }
@@ -299,6 +308,9 @@ pipeline {
                     }
                 }
                 stage('Log Collection (Ping)') {
+                    when {
+                       expression {doEpcLogCollection}
+                    }
                     steps {
                         withCredentials([
                              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
@@ -317,6 +329,9 @@ pipeline {
                     }
                 }
                 stage('Log Collection (Iperf)') {
+                    when {
+                       expression {doEpcLogCollection}
+                    }
                     steps {
                         withCredentials([
                              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
@@ -335,6 +350,9 @@ pipeline {
                     }
                 }
                 stage('Log Collection (SPGW)') {
+                    when {
+                       expression {doEpcLogCollection}
+                    }
                     steps {
                         withCredentials([
                              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
@@ -353,6 +371,9 @@ pipeline {
                     }
                 }
                 stage('Log Collection (MME)') {
+                    when {
+                       expression {doEpcLogCollection}
+                    }
                     steps {
                         withCredentials([
                              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
@@ -371,6 +392,9 @@ pipeline {
                     }
                 }
                 stage('Log Collection (HSS)') {
+                    when {
+                       expression {doEpcLogCollection}
+                    }
                     steps {
                         withCredentials([
                              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh
index c6854357fe19f59be819ae2e72d9ecbea59e79a0..ae6b48cd513c16c8329051b8b4462d9871c2c67e 100755
--- a/ci-scripts/buildOnVM.sh
+++ b/ci-scripts/buildOnVM.sh
@@ -103,6 +103,7 @@ function build_on_vm {
     echo "############################################################"
     echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
     echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
+    echo "git config --global https.postBuffer 123289600" >> $VM_CMDS
     if [[ "$VM_NAME" == *"-cppcheck"* ]]
     then
         if [ $DAEMON -eq 0 ]
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 88ba4e1a9a7ca9cc6658e31068875aacba3b3279..5a86702cc21d2e3c083218b60941542f52bc6fe0 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -984,8 +984,14 @@ class SSHConnection():
 					logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
 					tunnelInterfaceStatus = True
 				else:
-					logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m')
-					tunnelInterfaceStatus = False
+					self.command('ifconfig oaitun_ue1', '\$', 4)
+					result = re.search('inet addr', str(self.ssh.before))
+					if result is not None:
+						logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
+						tunnelInterfaceStatus = True
+					else:
+						logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m')
+						tunnelInterfaceStatus = False
 			else:
 				tunnelInterfaceStatus = True
 		else:
@@ -1807,7 +1813,6 @@ class SSHConnection():
 			else:
 				self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
 				self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
-			self.command('cd cmake_targets', '\$', 5)
 			ping_time = re.findall("-c (\d+)",str(self.ping_args))
 			ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
 			# TIMEOUT CASE
diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool
index d4414b7ac2646156dd4bcb72c0f4efabe76678e5..7fba7bac7955743e8b7f7f85f32e24310fe614cb 100755
--- a/ci-scripts/oai-ci-vm-tool
+++ b/ci-scripts/oai-ci-vm-tool
@@ -348,10 +348,11 @@ fi
 VM_TEMPLATE=ci-
 
 
-# look for default ASN1 release in cmake directives
+# look for ASN1 release in cmake directives
 # It will be the release used when building
-ASN1VEROPT=( `grep "add_list2_option(RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
-ASN1VER=${ASN1VEROPT[1]//\"}
+ASN1VEROPT=( `grep "set (RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
+ASN1VER=${ASN1VEROPT[2]//\"}
+ASN1VER=${ASN1VER//)}
 unset ASN1VEROPT
 
 # variable to identify and store the command (build, create ...)
diff --git a/ci-scripts/xml_files/enb_usrp210_band13_test_10mhz_tm1.xml b/ci-scripts/xml_files/enb_usrp210_band13_test_10mhz_tm1.xml
index 1f4a82710cd1dcf469d77d5099aa5ac1596f8294..d72722aa8c1f7171e41ba5efad0a1703cbc17ef4 100644
--- a/ci-scripts/xml_files/enb_usrp210_band13_test_10mhz_tm1.xml
+++ b/ci-scripts/xml_files/enb_usrp210_band13_test_10mhz_tm1.xml
@@ -24,6 +24,7 @@
 	<htmlTabRef>test-10-tm1</htmlTabRef>
 	<htmlTabName>Test-10MHz-TM1</htmlTabName>
 	<htmlTabIcon>tasks</htmlTabIcon>
+	<repeatCount>2</repeatCount>
 	<TestCaseRequestedList>
  030201
  040102
diff --git a/ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml b/ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
index 79fc0b305c129fceb3c0c2a68bdf51e090329a41..ba059209ece7ba93b955430f475b883e776c8837 100644
--- a/ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
+++ b/ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
@@ -24,6 +24,7 @@
 	<htmlTabRef>test-20-tm1</htmlTabRef>
 	<htmlTabName>Test-20MHz-TM1</htmlTabName>
 	<htmlTabIcon>tasks</htmlTabIcon>
+	<repeatCount>4</repeatCount>
 	<TestCaseRequestedList>
  030201
  040101
diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
index ec63e11322eba6b8d08d823b98f1655498e56c1a..03220ec286553d971b710ce77f056fed40441c2f 100644
--- a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
+++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
@@ -21,8 +21,8 @@
 
 -->
 <testCaseList>
-        <htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
-        <htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
+        <htmlTabRef>run-oai-gnb-nr-ue</htmlTabRef>
+        <htmlTabName>Run-gNB-and-NR-UE</htmlTabName>
         <htmlTabIcon>tasks</htmlTabIcon>	
 	<repeatCount>4</repeatCount>
 	<TestCaseRequestedList>
diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_terminate.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_terminate.xml
index e7a6295b9ef1d758ea344af8ce9b5785dcce48f0..81df042865ff055d066af5bb66f3772511c84b0f 100644
--- a/ci-scripts/xml_files/gnb_nr_ue_usrp_terminate.xml
+++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_terminate.xml
@@ -21,8 +21,8 @@
 
 -->
 <testCaseList>
-        <htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
-        <htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
+        <htmlTabRef>terminate-oai-gnb-nr-ue</htmlTabRef>
+        <htmlTabName>Terminate-gNB-and-NR-UE</htmlTabName>
         <htmlTabIcon>tasks</htmlTabIcon>	
 	<TestCaseRequestedList>
 090108 090109
diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 5fcd97aa856b5449519eb382b852515009948a33..7397f7cb1e21439b528d1a3a619448066d31d231 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -285,34 +285,10 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
 
 # RRC
 ######
-add_list2_option(RRC_ASN1_VERSION "Rel15" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
-
-if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
-  make_version(LTE_RRC_VERSION 8 6 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
-elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
-  make_version(LTE_RRC_VERSION 10 2 0)
-  add_definitions(-DCBA)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
-  make_version(LTE_RRC_VERSION 10 2 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
-  make_version(LTE_RRC_VERSION 11 18 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
-  make_version(LTE_RRC_VERSION 12 16 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
-  make_version(LTE_RRC_VERSION 13 9 1)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
-  make_version(LTE_RRC_VERSION 14 7 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
-elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
-  make_version(LTE_RRC_VERSION 15 6 0)
-  set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
-endif  (${RRC_ASN1_VERSION} STREQUAL "Rel8")
+set (RRC_ASN1_VERSION "Rel15")
+make_version(LTE_RRC_VERSION 15 6 0)
+set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
+
 add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
 set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
 
@@ -339,12 +315,9 @@ include_directories ("${RRC_FULL_DIR}")
 
 #NR RRC
 #######
-add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface")
-
-if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
-  make_version(NR_RRC_VERSION 15 6 0)
-  set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
-endif  (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
+set (NR_RRC_ASN1_VERSION "NR_Rel15" )
+make_version(NR_RRC_VERSION 15 6 0)
+set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
 add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
 set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
 
@@ -373,34 +346,12 @@ include_directories ("${NR_RRC_FULL_DIR}")
 # Same limitation as described in RRC: unknown generated file list
 # so we generate it at cmake time
 ##############
-add_list1_option(S1AP_RELEASE R15 "S1AP ASN.1 grammar version" R8 R9 R10 R14 R15)
+set (S1AP_RELEASE R15)
 
 set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
-if (${S1AP_RELEASE} STREQUAL "R8")
-  make_version(S1AP_VERSION 8 10 0)
-  set(S1AP_ASN_FILES "s1ap-8.10.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R9")
-  make_version(S1AP_VERSION 9 10 0)
-  set(S1AP_ASN_FILES "s1ap-9.10.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R10")
-  make_version(S1AP_VERSION 10 9 0)
-  set(S1AP_ASN_FILES "s1ap-10.9.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R11")
-  make_version(S1AP_VERSION 11 8 0)
-  set(S1AP_ASN_FILES "s1ap-11.8.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R12")
-  make_version(S1AP_VERSION 12 7 0)
-  set(S1AP_ASN_FILES "s1ap-12.7.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R13")
-  make_version(S1AP_VERSION 13 6 0)
-  set(S1AP_ASN_FILES "s1ap-13.6.0.asn1")
-elseif (${S1AP_RELEASE} STREQUAL "R14")
-  make_version(S1AP_VERSION 14 9 0)
-  set(S1AP_ASN_FILES "s1ap-14.9.0.asn1")
-else (${S1AP_RELEASE} STREQUAL "R15")
-  make_version(S1AP_VERSION 15 6 0)
-  set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
-endif(${S1AP_RELEASE} STREQUAL "R8")
+make_version(S1AP_VERSION 15 6 0)
+set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
+
 add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
 set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
 set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
@@ -448,25 +399,12 @@ add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
 # Same limitation as described in RRC/S1AP: unknown generated file list
 # so we generate it at cmake time
 ##############
-add_list1_option(X2AP_RELEASE R15 "X2AP ASN.1 grammar version" R8 R11 R12 R14 R15)
+set (X2AP_RELEASE R15)
 
 set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
-if (${X2AP_RELEASE} STREQUAL "R8")
-  make_version(X2AP_VERSION 8 9 0)
-  set(X2AP_ASN_FILES x2ap-8.9.0.asn1)
-elseif (${X2AP_RELEASE} STREQUAL "R11")
-  make_version(X2AP_VERSION 11 9 0)
-  set(X2AP_ASN_FILES x2ap-11.9.0.asn1)
-elseif (${X2AP_RELEASE} STREQUAL "R12")
-  make_version(X2AP_VERSION 12 9 0)
-  set(X2AP_ASN_FILES x2ap-12.9.0.asn1)
-elseif (${X2AP_RELEASE} STREQUAL "R14")
-  make_version(X2AP_VERSION 14 7 0)
-  set(X2AP_ASN_FILES x2ap-14.7.0.asn1)
-elseif (${X2AP_RELEASE} STREQUAL "R15")
-  make_version(X2AP_VERSION 15 6 0)
-  set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
-endif(${X2AP_RELEASE} STREQUAL "R8")
+make_version(X2AP_VERSION 15 6 0)
+set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
+
 add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
 set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
 set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index f24039369e8a93f32a9b317c767aa24c9794b7c7..e828d3987fdc4de4f26fb24df2b6456626f716fa 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -47,7 +47,6 @@ VCD_TIMING="False"
 DEADLINE_SCHEDULER_FLAG_USER=""
 CPU_AFFINITY_FLAG_USER="False" #Only valid when low-latency flag is set to False
 REL="Rel15"
-NR_REL="NR_Rel15"
 HW="None"
 TP="None"
 EPC=0
@@ -107,10 +106,6 @@ Options
     Makes test program for haw latency tests
 -a | --agent
    Enables agent for software-defined control of the eNB
--r | --3gpp-release
-   default is Rel14,
-   Rel8 limits the implementation to 3GPP Release 8 version
-   Rel10 limits the implementation to 3GPP Release 10 version
 -w | --hardware
    EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, None (Default)
    Adds this RF board support (in external packages installation and in compilation)
@@ -236,10 +231,6 @@ function main() {
        --UE-gen-nvram)
             gen_nvram_path=$(readlink -f $2)
             shift 2;;
-       -r | --3gpp-release)
-            REL=$2
-            echo_info "Setting release to: $REL"
-            shift 2;;
        -w | --hardware)
             # Use OAI_USRP as the key word USRP is used inside UHD driver           
             case "$2" in
@@ -551,8 +542,6 @@ function main() {
 #    echo "set ( PHY_TX_THREAD $UE_EXPANSION )"                            >> $cmake_file
     echo "set ( PRE_SCD_THREAD $UE_EXPANSION )"                           >> $cmake_file
     echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )"                       >> $cmake_file
-    echo "set ( RRC_ASN1_VERSION \"${REL}\")"                             >> $cmake_file
-    echo "set ( NR_RRC_ASN1_VERSION \"${NR_REL}\")"                       >> $cmake_file
     echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )"                            >> $cmake_file
     echo "set ( RF_BOARD \"${HW}\")"                                      >> $cmake_file
     echo "set ( TRANSP_PRO \"${TP}\")"                                    >> $cmake_file
diff --git a/cmake_targets/tools/make_asn1c_includes.sh b/cmake_targets/tools/make_asn1c_includes.sh
index a60d66fe16a08ae380a5db56702d35cb5e85a0a0..cf18f0fa3ebe2da62d5d697ef9e275df525e9d0b 100755
--- a/cmake_targets/tools/make_asn1c_includes.sh
+++ b/cmake_targets/tools/make_asn1c_includes.sh
@@ -11,5 +11,14 @@ if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then
    rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
    mkdir -p "$GENERATED_FULL_DIR"
    asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u
+  if [ "$ASN1C_PREFIX" = "X2AP_" ] ; then
+    sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
+    sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
+  fi
+  if [ "$ASN1C_PREFIX" = "S1AP_" ] ; then
+    sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
+    sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
+  fi
+
 fi
-touch $done_flag
\ No newline at end of file
+touch $done_flag
diff --git a/common/utils/LOG/vcd_signal_dumper.c b/common/utils/LOG/vcd_signal_dumper.c
index 4722cc4c4e0fc6530cee586deb88289793f980ad..cde9337d7f0d80827070715da90999eda1ff49a5 100644
--- a/common/utils/LOG/vcd_signal_dumper.c
+++ b/common/utils/LOG/vcd_signal_dumper.c
@@ -643,6 +643,10 @@ inline static uint32_t vcd_get_write_index(void)
   return write_index;
 }
 
+#if defined(ENABLE_ITTI)
+int signal_mask(void);
+#endif
+
 void *vcd_dumper_thread_rt(void *args)
 {
   vcd_queue_user_data_t *data;
diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c
index 0f42966d664c18f1b8b2df6f0bb4e2fb7ef56a58..bf1f934d2938e0a76ce4c15dcebb1e505a0b284e 100644
--- a/executables/nr-gnb.c
+++ b/executables/nr-gnb.c
@@ -193,7 +193,6 @@ static inline int rxtx(PHY_VARS_gNB *gNB,int frame_rx, int slot_rx, int frame_tx
   // UE-specific RX processing for subframe n
   if (nfapi_mode == 0 || nfapi_mode == 1) */
 
-
   pthread_mutex_lock(&gNB->UL_INFO_mutex);
   gNB->UL_INFO.frame     = frame_rx;
   gNB->UL_INFO.slot      = slot_rx;
@@ -665,11 +664,7 @@ static void* gNB_thread_prach( void* param ) {
    if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
 
    LOG_D(PHY,"Running gNB prach procedures\n");
-   prach_procedures(gNB
-#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      ,0
-#endif
-      );
+   prach_procedures(gNB ,0);
 
    if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
  }
diff --git a/executables/nr-ru.c b/executables/nr-ru.c
index bce4e6856a83fe2b4f7de72715ae689e31781903..af4f8b8cbaa64e6c38d303107444b9ea2e6ebb4b 100644
--- a/executables/nr-ru.c
+++ b/executables/nr-ru.c
@@ -731,10 +731,18 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
   int i;
   T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
     T_INT(0), T_BUFFER(&ru->common.txdata[0][slot * fp->samples_per_slot], fp->samples_per_slot * 4));
-  nr_subframe_t SF_type     = nr_slot_select(cfg,slot%fp->slots_per_frame);
   int sf_extension = 0;
+  nr_subframe_t SF_type     = nr_slot_select(cfg,slot%fp->slots_per_frame);
+
+  if ((slot == 0) ||
+      (slot == 1)) {
+    int siglen=fp->samples_per_slot;
+    int flags;
+    if (slot==0)
+      flags = 2;
+    else if (slot==1)
+      flags=3;
 
-    int siglen=fp->samples_per_slot,flags=1;
     /*
         if (SF_type == SF_S) {
           siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
@@ -774,6 +782,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
           (long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
     AssertFatal(txs ==  siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
+  }
 }
 
 
@@ -852,10 +861,7 @@ static void *ru_thread_prach( void *param ) {
 
     /*if (ru->gNB_list[0]){
       prach_procedures(
-        ru->gNB_list[0]
-    #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-        ,0
-    #endif
+        ru->gNB_list[0],0
         );
     }
     else {
@@ -865,10 +871,7 @@ static void *ru_thread_prach( void *param ) {
                 NULL,
                 NULL,
                 proc->frame_prach,
-                0
-    #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-          ,0
-    #endif
+                0,0
           );
     }
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 ); */
@@ -1996,8 +1999,8 @@ void set_function_spec_param(RU_t *ru) {
         ru->fh_north_out          = fh_if4p5_north_out;       // send_IF4p5 on reception
         ru->fh_south_out          = tx_rf;                    // send output to RF
         ru->fh_north_asynch_in    = fh_if4p5_north_asynch_in; // TX packets come asynchronously
-        ru->feprx                 = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full;                 // RX DFTs
-        ru->feptx_ofdm            = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm;               // this is fep with idft only (no precoding in RRU)
+        ru->feprx                 = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full;     // RX DFTs
+        ru->feptx_ofdm            = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft only (no precoding in RRU)
         ru->feptx_prec            = NULL;
         ru->nr_start_if           = nr_start_if;              // need to start the if interface for if4p5
         ru->ifdevice.host_type    = RRU_HOST;
@@ -2018,8 +2021,8 @@ void set_function_spec_param(RU_t *ru) {
         malloc_IF4p5_buffer(ru);
       } else if (ru->function == gNodeB_3GPP) {
         ru->do_prach             = 0;                       // no prach processing in RU
-        ru->feprx                = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full;                // RX DFTs
-        ru->feptx_ofdm           = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm;              // this is fep with idft and precoding
+        ru->feprx                = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full;     // RX DFTs
+        ru->feptx_ofdm           = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft and precoding
         ru->feptx_prec           = NULL;              // this is fep with idft and precoding
         ru->fh_north_in          = NULL;                    // no incoming fronthaul from north
         ru->fh_north_out         = NULL;                    // no outgoing fronthaul to north
@@ -2048,13 +2051,13 @@ void set_function_spec_param(RU_t *ru) {
 
     case REMOTE_IF5: // the remote unit is IF5 RRU
       ru->do_prach               = 0;
-      ru->feprx                  = nr_fep_full;                   // this is frequency-shift + DFTs
-      ru->feptx_prec             = feptx_prec;                 // need to do transmit Precoding + IDFTs
-      ru->feptx_ofdm             = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm;                 // need to do transmit Precoding + IDFTs
-      ru->fh_south_in          = fh_if5_south_in;     // synchronous IF5 reception
-      ru->fh_south_out         = fh_if5_south_out;    // synchronous IF5 transmission
-      ru->fh_south_asynch_in   = NULL;                // no asynchronous UL
-      ru->start_rf               = NULL;                 // no local RF
+      ru->feprx                  = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full;     // this is frequency-shift + DFTs
+      ru->feptx_prec             = feptx_prec;          // need to do transmit Precoding + IDFTs
+      ru->feptx_ofdm             = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs
+      ru->fh_south_in            = fh_if5_south_in;     // synchronous IF5 reception
+      ru->fh_south_out           = fh_if5_south_out;    // synchronous IF5 transmission
+      ru->fh_south_asynch_in     = NULL;                // no asynchronous UL
+      ru->start_rf               = NULL;                // no local RF
       ru->stop_rf                = NULL;
       ru->nr_start_if            = nr_start_if;         // need to start if interface for IF5
       ru->ifdevice.host_type     = RAU_HOST;
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index d2fd5d925e73804612e4586e5389d9a40b29678e..d95d6a1d2ed8b3ccc78585e8095c5f7e6010f9cb 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -63,7 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
 
 #include "common/utils/LOG/log.h"
 #include "common/utils/LOG/vcd_signal_dumper.h"
-
 #include "UTIL/OPT/opt.h"
 
 //#include "PHY/TOOLS/time_meas.h"
@@ -513,17 +512,7 @@ static void get_options(void) {
   paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
   config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
 
-  if (strlen(in_path) > 0) {
-    opt_type = OPT_PCAP;
-    opt_enabled=1;
-    printf("Enabling OPT for PCAP  with the following file %s \n",in_path);
-  }
 
-  if (strlen(in_ip) > 0) {
-    opt_enabled=1;
-    opt_type = OPT_WIRESHARK;
-    printf("Enabling OPT for wireshark for local interface");
-  }
 
   config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
 
@@ -923,10 +912,8 @@ int main( int argc, char **argv )
   MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
 #endif
 
-  if (opt_type != OPT_NONE) {
-    if (init_opt() == -1)
-      LOG_E(OPT,"failed to run OPT \n");
-  }
+init_opt();
+
 
 #ifdef PDCP_USE_NETLINK
   netlink_init();
@@ -1158,8 +1145,6 @@ int main( int argc, char **argv )
       RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
   }
 
-  if (opt_enabled == 1)
-    terminate_opt();
 
   logClean();
   printf("Bye.\n");
diff --git a/executables/nr-softmodem.h b/executables/nr-softmodem.h
index 488b38281c1da338c5bb46490a8edcb420d1a313..6016f1e363ab94ea9419815a045ab0d0f53a9437 100644
--- a/executables/nr-softmodem.h
+++ b/executables/nr-softmodem.h
@@ -34,8 +34,6 @@
     {"K" ,                    CONFIG_HLP_ITTIL,       PARAMFLAG_NOFREE, strptr:&itti_dump_file,             defstrval:"/tmp/itti.dump",    TYPE_STRING, 0},        \
     {"m" ,                    CONFIG_HLP_DLMCS,       0,                uptr:&target_dl_mcs,                defintval:0,                   TYPE_UINT,   0},        \
     {"t" ,                    CONFIG_HLP_ULMCS,       0,                uptr:&target_ul_mcs,                defintval:0,                   TYPE_UINT,   0},        \
-    {"W" ,                    CONFIG_HLP_L2MONW,      0,                strptr:(char **)&in_ip,             defstrval:"127.0.0.1",         TYPE_STRING, sizeof(in_ip)},  \
-    {"P" ,                    CONFIG_HLP_L2MONP,      0,                strptr:(char **)&in_path,           defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)},\
     {"q" ,                    CONFIG_HLP_STMON,       PARAMFLAG_BOOL,   iptr:&opp_enabled,                  defintval:0,                   TYPE_INT,    0},        \
     {"S" ,                    CONFIG_HLP_MSLOTS,      PARAMFLAG_BOOL,   u8ptr:&exit_missed_slots,           defintval:1,                   TYPE_UINT8,  0},        \
     {"T" ,                    CONFIG_HLP_TDD,         PARAMFLAG_BOOL,   iptr:&tddflag,                      defintval:0,                   TYPE_INT,    0},        \
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index aa3224a4f3521fce0c9b52b2415aeaf22cd18778..c213134ee8a8ab9dc6095b3d6ea315c3198a7c76 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -699,7 +699,7 @@ void *UE_thread(void *arg) {
                slot_nr*UE->frame_parms.samples_per_slot];
 
     for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
-      txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + 4)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
+      txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
 
     int readBlockSize, writeBlockSize;
 
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
     AssertFatal( writeBlockSize ==
                  UE->rfdevice.trx_write_func(&UE->rfdevice,
                      timestamp+
-                     (4*UE->frame_parms.samples_per_slot) -
+                     (DURATION_RX_TO_TX*UE->frame_parms.samples_per_slot) -
                      UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
                      openair0_cfg[0].tx_sample_advance,
                      txp,
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index 9c8cd7b350a7f8be40e38c738438622828b084f2..84836acf89651a844aa132b9fb73fe74cfefafab 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -409,18 +409,6 @@ static void get_options(void) {
   paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
   config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
 
-  if (strlen(in_path) > 0) {
-    opt_type = OPT_PCAP;
-    opt_enabled=1;
-    printf("Enabling OPT for PCAP  with the following file %s \n",in_path);
-  }
-
-  if (strlen(in_ip) > 0) {
-    opt_enabled=1;
-    opt_type = OPT_WIRESHARK;
-    printf("Enabling OPT for wireshark for local interface");
-  }
-
   config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
 
   if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) {
@@ -703,10 +691,7 @@ int main( int argc, char **argv ) {
   cpuf=get_cpu_freq_GHz();
   itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
 
-  if (opt_type != OPT_NONE) {
-    if (init_opt() == -1)
-      LOG_E(OPT,"failed to run OPT \n");
-  }
+  init_opt() ;
 
   if (ouput_vcd) {
     vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h
index 3edffc30e111338b68d39beb9f9ae6291bc4a5f5..6dd00276ed546a2c10a8d3fcd4259a6ebe876a96 100644
--- a/executables/nr-uesoftmodem.h
+++ b/executables/nr-uesoftmodem.h
@@ -74,8 +74,6 @@
     {"E" ,                      CONFIG_HLP_TQFS,        PARAMFLAG_BOOL,         iptr:&threequarter_fs,                 defintval:0,                    TYPE_INT,       0},                     \
     {"m" ,                      CONFIG_HLP_DLMCS,       0,                      uptr:&target_dl_mcs,                   defintval:0,                    TYPE_UINT,      0},                     \
     {"t" ,                      CONFIG_HLP_ULMCS,       0,                      uptr:&target_ul_mcs,                   defintval:0,                    TYPE_UINT,      0},                     \
-    {"W" ,                      CONFIG_HLP_L2MONW,      0,                      strptr:(char **)&in_ip,                defstrval:"127.0.0.1",          TYPE_STRING,    sizeof(in_ip)},         \
-    {"P" ,                      CONFIG_HLP_L2MONP,      0,                      strptr:(char **)&in_path,              defstrval:"/tmp/oai_opt.pcap",  TYPE_STRING,    sizeof(in_path)},       \
     {"q" ,                      CONFIG_HLP_STMON,       PARAMFLAG_BOOL,         iptr:&opp_enabled,                     defintval:0,                    TYPE_INT,       0},                     \
     {"S" ,                      CONFIG_HLP_MSLOTS,      PARAMFLAG_BOOL,         u8ptr:&exit_missed_slots,              defintval:1,                    TYPE_UINT8,     0},                     \
     {"T" ,                      CONFIG_HLP_TDD,         PARAMFLAG_BOOL,         iptr:&tddflag,                         defintval:0,                    TYPE_INT,       0},                     \
diff --git a/openair1/PHY/INIT/defs_NB_IoT.h b/openair1/PHY/INIT/defs_NB_IoT.h
index d115a57f10fee5ead14876c78059fb4842252211..10c134b6fb7cef3b69b9ff853d26ad4b40e87c5a 100644
--- a/openair1/PHY/INIT/defs_NB_IoT.h
+++ b/openair1/PHY/INIT/defs_NB_IoT.h
@@ -24,52 +24,43 @@
 #define __INIT_DEFS_NB_IOT__H__
 
 //#include "PHY/defs_NB_IoT.h"
-#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"  
-#include "nfapi_interface.h"  
+#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
+#include "nfapi_interface.h"
 
-//#include "SystemInformationBlockType2.h"
-//#include "RadioResourceConfigCommonSIB.h"
-//#include "RadioResourceConfigDedicated.h"
-//#include "TDD-Config.h"
-//#include "MBSFN-SubframeConfigList.h"
-//#include "MobilityControlInfo.h"
-//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-//#include "SCellToAddMod-r10.h"
-//#endif
 
 /*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
-void phy_config_mib_eNB_NB_IoT(int  		Mod_id,
-						   	   int          eutra_band,
-						       int          Nid_cell,
-						       int          Ncp,
-						       int			Ncp_UL,
-						       int          p_eNB,
-						       uint16_t		EARFCN,
-						       uint16_t		prb_index, // NB_IoT_RB_ID,
-						       uint16_t 	operating_mode,
-						       uint16_t		control_region_size,
-						       uint16_t		eutra_NumCRS_ports);
+void phy_config_mib_eNB_NB_IoT(int      Mod_id,
+                               int          eutra_band,
+                               int          Nid_cell,
+                               int          Ncp,
+                               int      Ncp_UL,
+                               int          p_eNB,
+                               uint16_t   EARFCN,
+                               uint16_t   prb_index, // NB_IoT_RB_ID,
+                               uint16_t   operating_mode,
+                               uint16_t   control_region_size,
+                               uint16_t   eutra_NumCRS_ports);
 
 /*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/
 
 /*brief Configure LTE_DL_FRAME_PARMS with components of SIB2-NB (at eNB).*/
 
 //void NB_phy_config_sib2_eNB(module_id_t                            Mod_id,
-//                         int                                		CC_id,
+//                         int                                    CC_id,
 //                         RadioResourceConfigCommonSIB_NB_r13_t      *radioResourceConfigCommon
 //                         );
 
 void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
-				nfapi_nb_iot_config_t *config,
-				nfapi_rf_config_t *rf_config,
-				nfapi_uplink_reference_signal_config_t* ul_nrs_config,
-				extra_phyConfig_t* extra_phy_parms);
+                                nfapi_nb_iot_config_t *config,
+                                nfapi_rf_config_t *rf_config,
+                                nfapi_uplink_reference_signal_config_t *ul_nrs_config,
+                                extra_phyConfig_t *extra_phy_parms);
 
 void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
-				     rnti_t rnti,
-				     extra_phyConfig_t* extra_phy_parms); 
+                                     rnti_t rnti,
+                                     extra_phyConfig_t *extra_phy_parms);
 
-// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms); 
+// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
 void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar);
 int l1_north_init_NB_IoT(void);
 
diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index 368910ee05b563b42e75040a3b5ac0ed4c84c84c..d754d2613452b713cc0e25d32548dad9400deb41 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -47,82 +47,66 @@ uint8_t         dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 };
 int             N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 };
 
 int
-l1_north_init_eNB ()
-{
-
+l1_north_init_eNB () {
   int i,j;
 
-  if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.eNB != NULL)
-  {
+  if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.eNB != NULL) {
     AssertFatal(RC.nb_L1_inst>0,"nb_L1_inst=%d\n",RC.nb_L1_inst);
     AssertFatal(RC.nb_L1_CC!=NULL,"nb_L1_CC is null\n");
     AssertFatal(RC.eNB!=NULL,"RC.eNB is null\n");
-
     LOG_I(PHY,"%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
 
-    for (i=0;i<RC.nb_L1_inst;i++) {
+    for (i=0; i<RC.nb_L1_inst; i++) {
       AssertFatal(RC.eNB[i]!=NULL,"RC.eNB[%d] is null\n",i);
       AssertFatal(RC.nb_L1_CC[i]>0,"RC.nb_L1_CC[%d]=%d\n",i,RC.nb_L1_CC[i]);
-
       LOG_I(PHY,"%s() RC.nb_L1_CC[%d]:%d\n", __FUNCTION__, i,  RC.nb_L1_CC[i]);
 
-      for (j=0;j<RC.nb_L1_CC[i];j++) {
+      for (j=0; j<RC.nb_L1_CC[i]; j++) {
         AssertFatal(RC.eNB[i][j]!=NULL,"RC.eNB[%d][%d] is null\n",i,j);
 
-        if ((RC.eNB[i][j]->if_inst =  IF_Module_init(i))<0) return(-1); 
+        if ((RC.eNB[i][j]->if_inst =  IF_Module_init(i))<0) return(-1);
 
         LOG_I(PHY,"%s() RC.eNB[%d][%d] installing callbacks\n", __FUNCTION__, i,  j);
-
         RC.eNB[i][j]->if_inst->PHY_config_req = phy_config_request;
         RC.eNB[i][j]->if_inst->schedule_response = schedule_response;
       }
     }
-  }
-  else
-  {
+  } else {
     LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_L1_inst:%d RC.nb_L1_CC:%p RC.eNB:%p\n", __FUNCTION__, RC.nb_L1_inst, RC.nb_L1_CC, RC.eNB);
   }
+
   return(0);
 }
 
 
 void phy_config_request(PHY_Config_t *phy_config) {
-
   uint8_t         Mod_id = phy_config->Mod_id;
   int             CC_id = phy_config->CC_id;
   nfapi_config_request_t *cfg = phy_config->cfg;
-
-
   LTE_DL_FRAME_PARMS *fp;
-  PHICH_RESOURCE_t phich_resource_table[4]={oneSixth,half,one,two};
-  int                 eutra_band     = cfg->nfapi_config.rf_bands.rf_band[0];  
+  PHICH_RESOURCE_t phich_resource_table[4]= {oneSixth,half,one,two};
+  int                 eutra_band     = cfg->nfapi_config.rf_bands.rf_band[0];
   int                 dl_Bandwidth   = cfg->rf_config.dl_channel_bandwidth.value;
   int                 ul_Bandwidth   = cfg->rf_config.ul_channel_bandwidth.value;
   int                 Nid_cell       = cfg->sch_config.physical_cell_id.value;
   int                 Ncp            = cfg->subframe_config.dl_cyclic_prefix_type.value;
   int                 p_eNB          = cfg->rf_config.tx_antenna_ports.value;
   uint32_t            dl_CarrierFreq = cfg->nfapi_config.earfcn.value;
-
   LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,eNB_tx_antenna_ports %d,Ncp %d,DL freq %u,phich_config.resource %d, phich_config.duration %d)\n",
-	Mod_id, CC_id, eutra_band, dl_Bandwidth, ul_Bandwidth, Nid_cell, p_eNB,Ncp,dl_CarrierFreq,
-	cfg->phich_config.phich_resource.value,
-	cfg->phich_config.phich_duration.value);
-
+        Mod_id, CC_id, eutra_band, dl_Bandwidth, ul_Bandwidth, Nid_cell, p_eNB,Ncp,dl_CarrierFreq,
+        cfg->phich_config.phich_resource.value,
+        cfg->phich_config.phich_duration.value);
   AssertFatal (RC.eNB != NULL, "PHY instance pointer doesn't exist\n");
   AssertFatal (RC.eNB[Mod_id] != NULL, "PHY instance %d doesn't exist\n", Mod_id);
   AssertFatal (RC.eNB[Mod_id][CC_id] != NULL, "PHY instance %d, CCid %d doesn't exist\n", Mod_id, CC_id);
 
-
-  if (RC.eNB[Mod_id][CC_id]->configured == 1)
-  {
+  if (RC.eNB[Mod_id][CC_id]->configured == 1) {
     LOG_E(PHY,"Already eNB already configured, do nothing\n");
     return;
   }
 
   RC.eNB[Mod_id][CC_id]->mac_enabled = 1;
-
   fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
-
   fp->N_RB_DL                            = dl_Bandwidth;
   fp->N_RB_UL                            = ul_Bandwidth;
   fp->Nid_cell                           = Nid_cell;
@@ -131,17 +115,13 @@ void phy_config_request(PHY_Config_t *phy_config) {
   fp->Ncp                                = Ncp;
   fp->Ncp_UL                             = Ncp;
   fp->nb_antenna_ports_eNB               = p_eNB;
-
   fp->threequarter_fs = 0;
-
   AssertFatal (cfg->phich_config.phich_resource.value < 4, "Illegal phich_Resource\n");
-
   fp->phich_config_common.phich_resource = phich_resource_table[cfg->phich_config.phich_resource.value];
   fp->phich_config_common.phich_duration = cfg->phich_config.phich_duration.value;
   // Note: "from_earfcn" has to be in a common library with MACRLC
   fp->dl_CarrierFreq = from_earfcn (eutra_band, dl_CarrierFreq);
   fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset (eutra_band) * 100000);
-
   fp->tdd_config = 0;
   fp->tdd_config_S = 0;
 
@@ -163,46 +143,36 @@ void phy_config_request(PHY_Config_t *phy_config) {
 
   fp->prach_config_common.rootSequenceIndex = cfg->prach_config.root_sequence_index.value;
   LOG_I (PHY, "prach_config_common.rootSequenceIndex = %d\n", cfg->prach_config.root_sequence_index.value);
-
   fp->prach_config_common.prach_Config_enabled = 1;
-
   fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = cfg->prach_config.configuration_index.value;
   LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_ConfigIndex = %d\n", cfg->prach_config.configuration_index.value);
-
   fp->prach_config_common.prach_ConfigInfo.highSpeedFlag = cfg->prach_config.high_speed_flag.value;
   LOG_I (PHY, "prach_config_common.prach_ConfigInfo.highSpeedFlag = %d\n", cfg->prach_config.high_speed_flag.value);
   fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->prach_config.zero_correlation_zone_configuration.value;
   LOG_I (PHY, "prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = %d\n", cfg->prach_config.zero_correlation_zone_configuration.value);
   fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset = cfg->prach_config.frequency_offset.value;
   LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_FreqOffset = %d\n", cfg->prach_config.frequency_offset.value);
-
   init_prach_tables (839);
   compute_prach_seq (fp->prach_config_common.rootSequenceIndex,
                      fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
                      fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig, fp->prach_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u);
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (cfg->emtc_config.prach_ce_level_0_enable.value == 1) {
     fp->prach_emtc_config_common.prach_Config_enabled = 1;
-
     fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
-
     fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag = cfg->emtc_config.prach_catm_high_speed_flag.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->emtc_config.prach_catm_zero_correlation_zone_configuration.value;
-
     // CE Level 3 parameters
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] = cfg->emtc_config.prach_ce_level_3_enable.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] = cfg->emtc_config.prach_ce_level_3_starting_subframe_periodicity.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3] = cfg->emtc_config.prach_ce_level_3_number_of_repetitions_per_attempt.value;
     AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3],
                  "prach_starting_subframe_periodicity[3] < prach_numPetitionPerPreambleAttempt[3]\n");
-
-
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3] = cfg->emtc_config.prach_ce_level_3_configuration_index.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[3] = cfg->emtc_config.prach_ce_level_3_frequency_offset.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[3] = cfg->emtc_config.prach_ce_level_3_hopping_enable.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[3] = cfg->emtc_config.prach_ce_level_3_hopping_offset.value;
+
     if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] == 1)
       compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
                          fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
@@ -219,6 +189,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[2] = cfg->emtc_config.prach_ce_level_2_frequency_offset.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[2] = cfg->emtc_config.prach_ce_level_2_hopping_enable.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[2] = cfg->emtc_config.prach_ce_level_2_hopping_offset.value;
+
     if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] == 1)
       compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
                          fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
@@ -231,11 +202,11 @@ void phy_config_request(PHY_Config_t *phy_config) {
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1] = cfg->emtc_config.prach_ce_level_1_number_of_repetitions_per_attempt.value;
     AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1],
                  "prach_starting_subframe_periodicity[1] < prach_numPetitionPerPreambleAttempt[1]\n");
-
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[1] = cfg->emtc_config.prach_ce_level_1_configuration_index.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[1] = cfg->emtc_config.prach_ce_level_1_frequency_offset.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[1] = cfg->emtc_config.prach_ce_level_1_hopping_enable.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[1] = cfg->emtc_config.prach_ce_level_1_hopping_offset.value;
+
     if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] == 1)
       compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
                          fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
@@ -254,6 +225,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[0] = cfg->emtc_config.prach_ce_level_0_frequency_offset.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[0] = cfg->emtc_config.prach_ce_level_0_hopping_enable.value;
     fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[0] = cfg->emtc_config.prach_ce_level_0_hopping_offset.value;
+
     if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
       compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
                          fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
@@ -263,63 +235,49 @@ void phy_config_request(PHY_Config_t *phy_config) {
     }
   }
 
-#endif
-
-
-
   fp->pucch_config_common.deltaPUCCH_Shift = 1 + cfg->pucch_config.delta_pucch_shift.value;
   fp->pucch_config_common.nRB_CQI = cfg->pucch_config.n_cqi_rb.value;
   fp->pucch_config_common.nCS_AN = cfg->pucch_config.n_an_cs.value;
   fp->pucch_config_common.n1PUCCH_AN = cfg->pucch_config.n1_pucch_an.value;
-
   fp->pdsch_config_common.referenceSignalPower = cfg->rf_config.reference_signal_power.value;
   fp->pdsch_config_common.p_b = cfg->subframe_config.pb.value;
-
   fp->pusch_config_common.n_SB = cfg->pusch_config.number_of_subbands.value;
   LOG_I (PHY, "pusch_config_common.n_SB = %d\n", fp->pusch_config_common.n_SB);
-
   fp->pusch_config_common.hoppingMode = cfg->pusch_config.hopping_mode.value;
   LOG_I (PHY, "pusch_config_common.hoppingMode = %d\n", fp->pusch_config_common.hoppingMode);
-
   fp->pusch_config_common.pusch_HoppingOffset = cfg->pusch_config.hopping_offset.value;
   LOG_I (PHY, "pusch_config_common.pusch_HoppingOffset = %d\n", fp->pusch_config_common.pusch_HoppingOffset);
-
   fp->pusch_config_common.enable64QAM                                  = 0;//radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM;
   LOG_I(PHY,"pusch_config_common.enable64QAM = %d\n",fp->pusch_config_common.enable64QAM );
   fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled     = 0;
   fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled  = 0;
-  if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 1) 
-      fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
-  if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 2) 
-      fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 1;
+
+  if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 1)
+    fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
+
+  if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 2)
+    fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 1;
+
   LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
   fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH   =  cfg->uplink_reference_signal_config.group_assignment.value;
   LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
-
   LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
-
   fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = dmrs1_tab[cfg->uplink_reference_signal_config.cyclic_shift_1_for_drms.value];
   LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
-
   init_ul_hopping (fp);
-
   fp->soundingrs_ul_config_common.enabled_flag = 0;     // 1; Don't know how to turn this off in NFAPI
   fp->soundingrs_ul_config_common.srs_BandwidthConfig = cfg->srs_config.bandwidth_configuration.value;
   fp->soundingrs_ul_config_common.srs_SubframeConfig = cfg->srs_config.srs_subframe_configuration.value;
   fp->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission = cfg->srs_config.srs_acknack_srs_simultaneous_transmission.value;
   fp->soundingrs_ul_config_common.srs_MaxUpPts = cfg->srs_config.max_up_pts.value;
-
   fp->num_MBSFN_config = 0;
-
   fp->NonMBSFN_config_flag =cfg->fembms_config.non_mbsfn_config_flag.value;
   fp->NonMBSFN_config.non_mbsfn_SubframeConfig = cfg->fembms_config.non_mbsfn_subframeconfig.value;
   fp->NonMBSFN_config.radioframeAllocationPeriod = cfg->fembms_config.radioframe_allocation_period.value;
   fp->NonMBSFN_config.radioframeAllocationOffset = cfg->fembms_config.radioframe_allocation_offset.value;
-  LOG_D(PHY,"eNB %d/%d frame NonMBSFN configured: %d (%x) %d/%d\n",Mod_id,CC_id,fp->NonMBSFN_config_flag,fp->NonMBSFN_config.non_mbsfn_SubframeConfig,fp->NonMBSFN_config.radioframeAllocationPeriod,fp->NonMBSFN_config.radioframeAllocationOffset);
-
+  LOG_D(PHY,"eNB %d/%d frame NonMBSFN configured: %d (%x) %d/%d\n",Mod_id,CC_id,fp->NonMBSFN_config_flag,fp->NonMBSFN_config.non_mbsfn_SubframeConfig,fp->NonMBSFN_config.radioframeAllocationPeriod,
+        fp->NonMBSFN_config.radioframeAllocationOffset);
   init_ncs_cell (fp, RC.eNB[Mod_id][CC_id]->ncs_cell);
-
-
   init_ul_hopping (fp);
   RC.eNB[Mod_id][CC_id]->configured = 1;
   LOG_I (PHY, "eNB %d/%d configured\n", Mod_id, CC_id);
@@ -328,12 +286,8 @@ void phy_config_request(PHY_Config_t *phy_config) {
 
 
 void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
-                          long mbsfn_AreaId_r9)
-{
-
+                          long mbsfn_AreaId_r9) {
   LTE_DL_FRAME_PARMS *fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
-
-
   LOG_I (PHY, "[eNB%d] Applying MBSFN_Area_id %ld for index %d\n", Mod_id, mbsfn_AreaId_r9, mbsfn_Area_idx);
 
   if (mbsfn_Area_idx == 0) {
@@ -342,37 +296,28 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
   }
 
   lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   lte_gold_mbsfn_khz_1dot25 (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table, fp->Nid_cell_mbsfn);
-#endif
 }
 
 
 int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
                      unsigned char is_secondary_eNB,
-                     unsigned char abstraction_flag)
-{
-
+                     unsigned char abstraction_flag) {
   // shortcuts
-  LTE_DL_FRAME_PARMS* const fp       = &eNB->frame_parms;
-  LTE_eNB_COMMON* const common_vars  = &eNB->common_vars;
-  LTE_eNB_PUSCH** const pusch_vars   = eNB->pusch_vars;
-  LTE_eNB_SRS* const srs_vars        = eNB->srs_vars;
-  LTE_eNB_PRACH* const prach_vars    = &eNB->prach_vars;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
-#endif
+  LTE_DL_FRAME_PARMS *const fp       = &eNB->frame_parms;
+  LTE_eNB_COMMON *const common_vars  = &eNB->common_vars;
+  LTE_eNB_PUSCH **const pusch_vars   = eNB->pusch_vars;
+  LTE_eNB_SRS *const srs_vars        = eNB->srs_vars;
+  LTE_eNB_PRACH *const prach_vars    = &eNB->prach_vars;
+  LTE_eNB_PRACH *const prach_vars_br = &eNB->prach_vars_br;
   int             i, UE_id;
-
   LOG_I(PHY,"[eNB %d] %s() About to wait for eNB to be configured", eNB->Mod_id, __FUNCTION__);
-
   eNB->total_dlsch_bitrate = 0;
   eNB->total_transmitted_bits = 0;
   eNB->total_system_throughput = 0;
   eNB->check_for_MUMIMO_transmissions = 0;
-
-  LOG_I(PHY,"[eNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u nb_antenna_ports_eNB:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
+  LOG_I(PHY,
+        "[eNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u nb_antenna_ports_eNB:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
         eNB->Mod_id,
         fp->N_RB_DL,fp->phich_config_common.phich_resource,
         fp->phich_config_common.phich_duration,
@@ -383,156 +328,135 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
         fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
         fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
         fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset
-        );
+       );
   LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02"PRIu8"][]\n", eNB->Mod_id);
-
   LOG_I (PHY, "[eNB %" PRIu8 "] Initializing DL_FRAME_PARMS : N_RB_DL %" PRIu8 ", PHICH Resource %d, PHICH Duration %d\n",
          eNB->Mod_id, fp->N_RB_DL, fp->phich_config_common.phich_resource, fp->phich_config_common.phich_duration);
   LOG_D (PHY, "[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02" PRIu8 "][]\n", eNB->Mod_id);
-
   crcTableInit();
-
   lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell);
   generate_pcfich_reg_mapping (fp);
   generate_phich_reg_mapping (fp);
 
   for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
-    eNB->first_run_timing_advance[UE_id] = 1;   ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
-
+    eNB->first_run_timing_advance[UE_id] =
+      1;   ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
     // clear whole structure
     bzero (&eNB->UE_stats[UE_id], sizeof (LTE_eNB_UE_stats));
-
     eNB->physicalConfigDedicated[UE_id] = NULL;
   }
-  
-  eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
-  
-
-
-    
-  if (NFAPI_MODE!=NFAPI_MODE_VNF){
-  common_vars->rxdata  = (int32_t **)NULL;
-  common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
-  common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t*));
-  
-  LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
-
-  for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
-    if (i<fp->nb_antenna_ports_eNB || i==5) {
-      common_vars->txdataF[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
-      
-      LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
-	    i,common_vars->txdataF[i],
-	    fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
+
+  eNB->first_run_I0_measurements =
+    1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
+
+  if (NFAPI_MODE!=NFAPI_MODE_VNF) {
+    common_vars->rxdata  = (int32_t **)NULL;
+    common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *));
+    common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t *));
+    LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
+
+    for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
+      if (i<fp->nb_antenna_ports_eNB || i==5) {
+        common_vars->txdataF[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
+        LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
+              i,common_vars->txdataF[i],
+              fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
+      }
     }
-  }
 
+    // Channel estimates for SRS
+    for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
+      srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
+      srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *));
 
-  // Channel estimates for SRS
-  for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
+      for (i = 0; i < 64; i++) {
+        srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size);
+        srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2);
+      }
+    }                             //UE_id
 
-    srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
-    srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *));
+    generate_ul_ref_sigs_rx ();
+    init_ulsch_power_LUT ();
 
-    for (i = 0; i < 64; i++) {
-      srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size);
-      srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2);
+    // SRS
+    for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
+      srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
     }
-  }                             //UE_id
 
+    // PRACH
+    prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
+    // assume maximum of 64 RX antennas for PRACH receiver
+    prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
 
-  generate_ul_ref_sigs_rx ();
-
-  init_ulsch_power_LUT ();
+    for (i = 0; i < 64; i++)
+      prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
 
-  // SRS
-  for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
-    srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
-  }
+    prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
+    // PRACH BR
+    prach_vars_br->prachF = (int16_t *)malloc16_clear( 1024*2*sizeof(int32_t) );
 
-  // PRACH
-  prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
+    // assume maximum of 64 RX antennas for PRACH receiver
+    for (int ce_level = 0; ce_level < 4; ce_level++) {
+      prach_vars_br->prach_ifft[ce_level] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
 
-  // assume maximum of 64 RX antennas for PRACH receiver
-  prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
-  for (i = 0; i < 64; i++)
-    prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
+      for (i = 0; i < 64; i++)
+        prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
 
-  prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
-  // PRACH BR
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
+      prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
+    }
 
-  // assume maximum of 64 RX antennas for PRACH receiver
-  for (int ce_level = 0; ce_level < 4; ce_level++) {
-    prach_vars_br->prach_ifft[ce_level] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
-    for (i = 0; i < 64; i++)
-      prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
-    prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
-  }
-#endif
-
-  /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) 
-  AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
-              "nb_antennas_rx too large");
-  for (i=0; i<fp->nb_antennas_rx; i++) {
-    prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
-    LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
-    }*/
-  
-  for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
-    
-    //FIXME
-    pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
-
-    pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-    pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-
-    AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
-    AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
-    AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
-    for (i = 0; i < 2; i++) {
-      // RK 2 times because of output format of FFT!
-      // FIXME We should get rid of this
-      pusch_vars[UE_id]->rxdataF_ext[i]      = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-      pusch_vars[UE_id]->rxdataF_ext2[i]     = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-      pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-      pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
-      pusch_vars[UE_id]->rxdataF_comp[i]     = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-      pusch_vars[UE_id]->ul_ch_mag[i]  = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
-      pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
+    /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
+    AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
+                "nb_antennas_rx too large");
+    for (i=0; i<fp->nb_antennas_rx; i++) {
+      prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
+      LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
+      }*/
+
+    for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
+      //FIXME
+      pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
+      pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
+      AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
+      AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
+
+      for (i = 0; i < 2; i++) {
+        // RK 2 times because of output format of FFT!
+        // FIXME We should get rid of this
+        pusch_vars[UE_id]->rxdataF_ext[i]      = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
+        pusch_vars[UE_id]->rxdataF_ext2[i]     = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
+        pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
+        pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
+        pusch_vars[UE_id]->rxdataF_comp[i]     = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
+        pusch_vars[UE_id]->ul_ch_mag[i]  = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
+        pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
       }
-    
-    pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
-  } //UE_id
 
+      pusch_vars[UE_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
+    } //UE_id
 
-  for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
-    eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
+    for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
+      eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
   }
 
   eNB->pdsch_config_dedicated->p_a = dB0;       //defaul value until overwritten by RRCConnectionReconfiguration
-
-
   return (0);
-
 }
 
-void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
-{
-  LTE_DL_FRAME_PARMS* const fp       = &eNB->frame_parms;
-  LTE_eNB_COMMON* const common_vars  = &eNB->common_vars;
-  LTE_eNB_PUSCH** const pusch_vars   = eNB->pusch_vars;
-  LTE_eNB_SRS* const srs_vars        = eNB->srs_vars;
-  LTE_eNB_PRACH* const prach_vars    = &eNB->prach_vars;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
-#endif
+void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
+  LTE_DL_FRAME_PARMS *const fp       = &eNB->frame_parms;
+  LTE_eNB_COMMON *const common_vars  = &eNB->common_vars;
+  LTE_eNB_PUSCH **const pusch_vars   = eNB->pusch_vars;
+  LTE_eNB_SRS *const srs_vars        = eNB->srs_vars;
+  LTE_eNB_PRACH *const prach_vars    = &eNB->prach_vars;
+  LTE_eNB_PRACH *const prach_vars_br = &eNB->prach_vars_br;
   int i, UE_id;
 
   for (i = 0; i < NB_ANTENNA_PORTS_ENB; i++) {
@@ -541,6 +465,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
       /* rxdataF[i] is not allocated -> don't free */
     }
   }
+
   free_and_zero(common_vars->txdataF);
   free_and_zero(common_vars->rxdataF);
 
@@ -550,6 +475,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
       free_and_zero(srs_vars[UE_id].srs_ch_estimates[i]);
       free_and_zero(srs_vars[UE_id].srs_ch_estimates_time[i]);
     }
+
     free_and_zero(srs_vars[UE_id].srs_ch_estimates);
     free_and_zero(srs_vars[UE_id].srs_ch_estimates_time);
   } //UE_id
@@ -561,16 +487,17 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
   free_and_zero(prach_vars->prachF);
 
   for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
+
   free_and_zero(prach_vars->prach_ifft[0]);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   for (int ce_level = 0; ce_level < 4; ce_level++) {
     for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]);
+
     free_and_zero(prach_vars_br->prach_ifft[ce_level]);
     free_and_zero(prach_vars->rxsigF[ce_level]);
   }
+
   free_and_zero(prach_vars_br->prachF);
-#endif
   free_and_zero(prach_vars->rxsigF[0]);
 
   for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
@@ -583,6 +510,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
       free_and_zero(pusch_vars[UE_id]->ul_ch_mag[i]);
       free_and_zero(pusch_vars[UE_id]->ul_ch_magb[i]);
     }
+
     free_and_zero(pusch_vars[UE_id]->rxdataF_ext);
     free_and_zero(pusch_vars[UE_id]->rxdataF_ext2);
     free_and_zero(pusch_vars[UE_id]->drs_ch_estimates);
@@ -597,8 +525,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
   for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) eNB->UE_stats_ptr[UE_id] = NULL;
 }
 
-void install_schedule_handlers(IF_Module_t *if_inst)
-{
+void install_schedule_handlers(IF_Module_t *if_inst) {
   if_inst->PHY_config_req = phy_config_request;
   if_inst->schedule_response = schedule_response;
 }
diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c
index 08943dcffae5ff1c67aa1cbcd2330424b5085675..207bf249f511902ba0c1e83f78cfa94f48ab22b0 100644
--- a/openair1/PHY/INIT/lte_init_ru.c
+++ b/openair1/PHY/INIT/lte_init_ru.c
@@ -34,215 +34,223 @@
 
 void init_7_5KHz(void);
 
-int phy_init_RU(RU_t *ru)
-{
+int phy_init_RU(RU_t *ru) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_CALIBRATION *calibration = &ru->calibration;
   int i,j,p,re;
-  
-  init_dfts();  
-
+  init_dfts();
   LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
 
   if (ru->is_slave == 1) {
- 	 generate_ul_ref_sigs_rx();
+    generate_ul_ref_sigs_rx();
   }
 
-  if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals 
+  if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
     // Time-domain signals
-    ru->common.txdata        = (int32_t**)malloc16(ru->nb_tx*sizeof(int32_t*));
-    ru->common.rxdata        = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
+    ru->common.txdata        = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *));
+    ru->common.rxdata        = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
 
     for (i=0; i<ru->nb_tx; i++) {
       // Allocate 10 subframes of I/Q TX signal data (time) if not
-      ru->common.txdata[i]  = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
+      ru->common.txdata[i]  = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
       LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes)\n",i,ru->common.txdata[i],
-	     fp->samples_per_tti*10*sizeof(int32_t));
+            fp->samples_per_tti*10*sizeof(int32_t));
     }
 
     if (ru->is_slave == 1) {
-        calibration->drs_ch_estimates_time = (int32_t**)malloc16_clear(ru->nb_rx*sizeof(int32_t*));
-        for (i=0; i<ru->nb_rx; i++) {    
-        	calibration->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
-        }
-    }
+      calibration->drs_ch_estimates_time = (int32_t **)malloc16_clear(ru->nb_rx*sizeof(int32_t *));
 
+      for (i=0; i<ru->nb_rx; i++) {
+        calibration->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
+      }
+    }
 
-    for (i=0;i<ru->nb_rx;i++) {
-      ru->common.rxdata[i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
+    for (i=0; i<ru->nb_rx; i++) {
+      ru->common.rxdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
     }
   } // IF5 or local RF
   else {
     //    LOG_I(PHY,"No rxdata/txdata for RU\n");
-    ru->common.txdata        = (int32_t**)NULL;
-    ru->common.rxdata        = (int32_t**)NULL;
-
+    ru->common.txdata        = (int32_t **)NULL;
+    ru->common.rxdata        = (int32_t **)NULL;
   }
+
   if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
     init_dfts();
     init_7_5KHz();
     LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
-    ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
-    for (i=0;i<ru->nb_rx;i++) {
-      ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
+    ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
+
+    for (i=0; i<ru->nb_rx; i++) {
+      ru->common.rxdata_7_5kHz[i] = (int32_t *)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
       LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx);
     }
-  
 
     // allocate IFFT input buffers (TX)
-    ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*));
+    ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *));
     LOG_I(PHY,"[INIT] common.txdata_BF= %p (%lu bytes)\n",ru->common.txdataF_BF,
-	  ru->nb_tx*sizeof(int32_t*));
+          ru->nb_tx*sizeof(int32_t *));
+
     for (i=0; i<ru->nb_tx; i++) {
-      ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) );
+      ru->common.txdataF_BF[i] = (int32_t *)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) );
       LOG_I(PHY,"txdataF_BF[%d] %p for RU %d\n",i,ru->common.txdataF_BF[i],ru->idx);
     }
+
     // allocate FFT output buffers (RX)
-    ru->common.rxdataF     = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
-    for (i=0; i<ru->nb_rx; i++) {    
+    ru->common.rxdataF     = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
+
+    for (i=0; i<ru->nb_rx; i++) {
       // allocate 2 subframes of I/Q signal data (frequency)
-      ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) ); 
+      ru->common.rxdataF[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
       LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx);
     }
-    
-     if (ru->is_slave == 1) {
-     	// allocate FFT output buffers after extraction (RX)
-    	calibration->rxdataF_ext = (int32_t**)malloc16(2*sizeof(int32_t*));
-	calibration->drs_ch_estimates = (int32_t**)malloc16(2*sizeof(int32_t*));
-    	for (i=0; i<ru->nb_rx; i++) {    
-      		// allocate 2 subframes of I/Q signal data (frequency)
-      		calibration->rxdataF_ext[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); 
-      		LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
-                calibration->drs_ch_estimates[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
-    	}
-     }
+
+    if (ru->is_slave == 1) {
+      // allocate FFT output buffers after extraction (RX)
+      calibration->rxdataF_ext = (int32_t **)malloc16(2*sizeof(int32_t *));
+      calibration->drs_ch_estimates = (int32_t **)malloc16(2*sizeof(int32_t *));
+
+      for (i=0; i<ru->nb_rx; i++) {
+        // allocate 2 subframes of I/Q signal data (frequency)
+        calibration->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
+        LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
+        calibration->drs_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
+      }
+    }
 
     /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
     //AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
-		//"nb_antennas_rx too large");
-    ru->prach_rxsigF = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
-    for (j=0;j<4;j++) ru->prach_rxsigF_br[j] = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
+    //"nb_antennas_rx too large");
+    ru->prach_rxsigF = (int16_t **)malloc(ru->nb_rx * sizeof(int16_t *));
+
+    for (j=0; j<4; j++) ru->prach_rxsigF_br[j] = (int16_t **)malloc(ru->nb_rx * sizeof(int16_t *));
 
     for (i=0; i<ru->nb_rx; i++) {
-      ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
+      ru->prach_rxsigF[i] = (int16_t *)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
       LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      for (j=0;j<4;j++) {
-	ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
-	LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
+
+      for (j=0; j<4; j++) {
+        ru->prach_rxsigF_br[j][i] = (int16_t *)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
+        LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
       }
-#endif
     }
-    
-    AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n",
-		RC.nb_L1_inst,NUMBER_OF_eNB_MAX);
 
+    AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n",
+                RC.nb_L1_inst,NUMBER_OF_eNB_MAX);
     LOG_D(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst);
-
     int starting_antenna_index=0;
-    for (i=0; i<ru->idx;i++) starting_antenna_index+=ru->nb_tx;
+
+    for (i=0; i<ru->idx; i++) starting_antenna_index+=ru->nb_tx;
 
     for (i=0; i<RC.nb_L1_inst; i++) {
-      for (p=0;p<15;p++) {
+      for (p=0; p<15; p++) {
         LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
-	if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
+
+        if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
           LOG_D(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx);
-	  ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
-	  for (j=0; j<ru->nb_tx; j++) {
-	    ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
-	    // antenna ports 0-3 are mapped on antennas 0-3 as follows
-	    //    - antenna port p is mapped to antenna j on ru->idx as: p = (starting_antenna_index+j)%nb_anntena_ports_eNB 
-	    // antenna port 4 is mapped on antenna 0
-	    // antenna ports 5-14 are mapped on all antennas
-	    
-	    if (((p<4) && 
-		 (p==((starting_antenna_index+j)%ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB))) || 
-		((p==4) && (j==0))) {
-	      for (re=0; re<fp->ofdm_symbol_size; re++) 
-              {
-		ru->beam_weights[i][p][j][re] = 0x00007fff; 
+          ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t *));
+
+          for (j=0; j<ru->nb_tx; j++) {
+            ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
+            // antenna ports 0-3 are mapped on antennas 0-3 as follows
+            //    - antenna port p is mapped to antenna j on ru->idx as: p = (starting_antenna_index+j)%nb_anntena_ports_eNB
+            // antenna port 4 is mapped on antenna 0
+            // antenna ports 5-14 are mapped on all antennas
 
+            if (((p<4) &&
+                 (p==((starting_antenna_index+j)%ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB))) ||
+                ((p==4) && (j==0))) {
+              for (re=0; re<fp->ofdm_symbol_size; re++) {
+                ru->beam_weights[i][p][j][re] = 0x00007fff;
                 //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
               }
-	    }
-	    else if (p>4) {
-	      for (re=0; re<fp->ofdm_symbol_size; re++) 
-              {
-		ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx; 
+            } else if (p>4) {
+              for (re=0; re<fp->ofdm_symbol_size; re++) {
+                ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx;
                 //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
               }
-	    }  
-	    //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t)); 
-	  } // for (j=0
-	} // if (p<ru
+            }
+
+            //LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t));
+          } // for (j=0
+        } // if (p<ru
       } // for p
     } //for i
   } // !=IF5
-  ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
 
+  ru->common.sync_corr = (uint32_t *)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
   return(0);
 }
 
-void phy_free_RU(RU_t *ru)
-{
+void phy_free_RU(RU_t *ru) {
   int i,j,p;
   RU_CALIBRATION *calibration = &ru->calibration;
-
   LOG_I(PHY, "Feeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
-
   free_and_zero(ru->frame_parms);
 
   if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
     for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
+
     for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata[i]);
-    if (ru->is_slave == 1) {  
-    	for (i = 0; i < ru->nb_rx; i++) {
-       		free_and_zero(calibration->drs_ch_estimates_time[i]);
-        }
-        free_and_zero(calibration->drs_ch_estimates_time);
+
+    if (ru->is_slave == 1) {
+      for (i = 0; i < ru->nb_rx; i++) {
+        free_and_zero(calibration->drs_ch_estimates_time[i]);
+      }
+
+      free_and_zero(calibration->drs_ch_estimates_time);
     }
+
     free_and_zero(ru->common.txdata);
     free_and_zero(ru->common.rxdata);
   } // else: IF5 or local RF -> nothing to free()
 
   if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
     for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata_7_5kHz[i]);
+
     free_and_zero(ru->common.rxdata_7_5kHz);
 
     // free IFFT input buffers (TX)
     for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdataF_BF[i]);
+
     free_and_zero(ru->common.txdataF_BF);
 
     // free FFT output buffers (RX)
     for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdataF[i]);
+
     free_and_zero(ru->common.rxdataF);
+
     if (ru->is_slave == 1) {
-    	for (i = 0; i < ru->nb_rx; i++) {
-        	free_and_zero(calibration->rxdataF_ext[i]);
-  		free_and_zero(calibration->drs_ch_estimates[i]);
-        }
-        free_and_zero(calibration->rxdataF_ext);
-        free_and_zero(calibration->drs_ch_estimates);
+      for (i = 0; i < ru->nb_rx; i++) {
+        free_and_zero(calibration->rxdataF_ext[i]);
+        free_and_zero(calibration->drs_ch_estimates[i]);
+      }
+
+      free_and_zero(calibration->rxdataF_ext);
+      free_and_zero(calibration->drs_ch_estimates);
     }
 
     for (i = 0; i < ru->nb_rx; i++) {
       free_and_zero(ru->prach_rxsigF[i]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
       for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
-#endif
     }
+
     for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j]);
+
     free_and_zero(ru->prach_rxsigF);
     /* ru->prach_rxsigF_br is not allocated -> don't free */
 
     for (i = 0; i < RC.nb_L1_inst; i++) {
       for (p = 0; p < 15; p++) {
-	if (p < ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p == 5) {
-	  for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]);
-	  free_and_zero(ru->beam_weights[i][p]);
-	}
+        if (p < ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p == 5) {
+          for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]);
+
+          free_and_zero(ru->beam_weights[i][p]);
+        }
       }
     }
   }
+
   free_and_zero(ru->common.sync_corr);
 }
diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c
index dc2fea5072943297bc2454f27e1df32440960dbe..6c9ca73754087f461ff9cd3f9d05d56ff87ee94c 100644
--- a/openair1/PHY/INIT/lte_init_ue.c
+++ b/openair1/PHY/INIT/lte_init_ue.c
@@ -165,20 +165,16 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
   }
 
   lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
-
-  
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   lte_gold_mbsfn_khz_1dot25(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table,fp->Nid_cell_mbsfn);
-#endif
-
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
-                        uint8_t eNB_id,
-                        struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig){
+                               uint8_t eNB_id,
+                               struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig) {
   PHY_VARS_UE *ue        = PHY_vars_UE_g[Mod_id][CC_id];
   LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
+
   if (nonMBSFN_SubframeConfig != NULL) {
     fp->NonMBSFN_config_flag = 0;
     fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
@@ -186,7 +182,7 @@ void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
     fp->NonMBSFN_config.non_mbsfn_SubframeConfig=(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
   }
 }
-#endif
+
 
 
 /*
@@ -310,20 +306,19 @@ void phy_config_meas_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8
   memcpy((void *)phy_meas->adj_cell_id,(void *)adj_cell_id,n_adj_cells*sizeof(unsigned int));
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 void phy_config_dedicated_scell_ue(uint8_t Mod_id,
                                    uint8_t eNB_index,
                                    LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
                                    int CC_id) {
 }
-#endif
+
 
 
 void phy_config_harq_ue(module_id_t Mod_id,
-						int CC_id,
-						uint8_t eNB_id,
-                        uint16_t max_harq_tx)
-{
+                        int CC_id,
+                        uint8_t eNB_id,
+                        uint16_t max_harq_tx) {
   PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
   phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx;
 }
@@ -500,18 +495,6 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
         }
       }
     }
-
-#ifdef CBA
-
-    if (physicalConfigDedicated->pusch_CBAConfigDedicated_vlola) {
-      phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->betaOffset_CBA_Index;
-      phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->cShift_CBA;
-      LOG_D(PHY,"[UE %d ] physicalConfigDedicated pusch CBA config dedicated: beta offset %d cshift %d \n",Mod_id,
-            phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index,
-            phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift);
-    }
-
-#endif
   } else {
     LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
     return;
diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c
index ba62849f41543bfa92a70feeaec8bf53266b47e7..a3ca8421b37b45e793a093e77e03b29fc1ecfcb6 100644
--- a/openair1/PHY/INIT/lte_parms.c
+++ b/openair1/PHY/INIT/lte_parms.c
@@ -25,8 +25,7 @@
 uint16_t dl_S_table_normal[10]= {3,9,10,11,12,3,9,10,11,6};
 uint16_t dl_S_table_extended[10]= {3,8,9,10,3,8,9,5,0,0};
 
-void set_S_config(LTE_DL_FRAME_PARMS *fp)
-{
+void set_S_config(LTE_DL_FRAME_PARMS *fp) {
   int X = fp->srsX;
   fp->ul_symbols_in_S_subframe=(1+X);
 
@@ -37,8 +36,7 @@ void set_S_config(LTE_DL_FRAME_PARMS *fp)
 }
 
 int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
-		             uint8_t osf)
-{
+                     uint8_t osf) {
   uint8_t log2_osf;
   LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
 
@@ -128,12 +126,10 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
       frame_parms->nb_prefix_samples0>>=(2-log2_osf);
       frame_parms->N_RBGS = 2;
       frame_parms->N_RBG = 13;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       frame_parms->ofdm_symbol_size_khz_1dot25     = 6144*osf;
       frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800; //4344
       frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
       frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
-#endif
       break;
 
     case 15:
@@ -170,8 +166,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
 }
 
 
-void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
-{
+void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms) {
   LOG_I(PHY,"frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
   LOG_I(PHY,"frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
   LOG_I(PHY,"frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c
index ad7b4ee56abe0c702f4e053bfc55d34b4168a9f0..246252c6e4bb4c88b4df2f8cf59a8c017ed27214 100644
--- a/openair1/PHY/INIT/nr_init.c
+++ b/openair1/PHY/INIT/nr_init.c
@@ -507,6 +507,26 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
         exit(-1);
       }
 
+      LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
+      // [hna] added here for RT implementation
+      uint8_t harq_pid = 0;
+      nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
+  
+      // --------- setting rel15_ul parameters ----------
+      rel15_ul->rnti                           = 0x1234;
+      rel15_ul->ulsch_pdu_rel15.start_rb       = 0;
+      rel15_ul->ulsch_pdu_rel15.number_rbs     = 50;
+      rel15_ul->ulsch_pdu_rel15.start_symbol   = 2;
+      rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
+      rel15_ul->ulsch_pdu_rel15.nb_re_dmrs     = 6;
+      rel15_ul->ulsch_pdu_rel15.length_dmrs    = 1;
+      rel15_ul->ulsch_pdu_rel15.Qm             = 2;
+      rel15_ul->ulsch_pdu_rel15.mcs            = 9;
+      rel15_ul->ulsch_pdu_rel15.rv             = 0;
+      rel15_ul->ulsch_pdu_rel15.n_layers       = 1;
+      ///////////////////////////////////////////////////
+
+      //////////////////////////////////////////////////////////////////////////
     }
 
   }
diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c
index 2f17105d02800bc3405c96cd6252d3972257740d..eb7b62ff99fca60d129bb6cc2f82b1966318cf06 100644
--- a/openair1/PHY/INIT/nr_init_ue.c
+++ b/openair1/PHY/INIT/nr_init_ue.c
@@ -86,10 +86,10 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
   fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset           =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
 
   compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
-		    fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
-		    fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
-		    fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
-		    fp->frame_type,ue->X_u);
+        fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
+        fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
+        fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
+        fp->frame_type,ue->X_u);
 
 
 
@@ -240,9 +240,9 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
 
     //compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u);
     compute_prach_seq(PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.rootSequenceIndex,
-		      PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
-		      PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
-		      PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
+          PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
+          PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
+          PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
                       fp->frame_type,
                       PHY_vars_UE_g[Mod_id][CC_id]->X_u);
 
@@ -353,24 +353,19 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n
 void phy_config_dedicated_scell_ue(uint8_t Mod_id,
                                    uint8_t eNB_index,
                                    SCellToAddMod_r10_t *sCellToAddMod_r10,
-                                   int CC_id)
-{
-
+                                   int CC_id) {
 }
 #endif
 
 void phy_config_harq_ue(module_id_t Mod_id,
-						int CC_id,
-						uint8_t eNB_id,
-                        uint16_t max_harq_tx)
-{
-
+                        int CC_id,
+                        uint8_t eNB_id,
+                        uint16_t max_harq_tx) {
   int num_of_threads,num_of_code_words;
-
   PHY_VARS_NR_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
 
-  for (num_of_threads=0;num_of_threads<RX_NB_TH_MAX;num_of_threads++)
-    for (num_of_code_words=0;num_of_code_words<NR_MAX_NB_CODEWORDS;num_of_code_words++)
+  for (num_of_threads=0; num_of_threads<RX_NB_TH_MAX; num_of_threads++)
+    for (num_of_code_words=0; num_of_code_words<NR_MAX_NB_CODEWORDS; num_of_code_words++)
       phy_vars_ue->ulsch[num_of_threads][eNB_id][num_of_code_words]->Mlimit = max_harq_tx;
 }
 
@@ -552,17 +547,6 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
       }
     }
 
-#ifdef CBA
-
-    if (physicalConfigDedicated->pusch_CBAConfigDedicated_vlola) {
-      phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->betaOffset_CBA_Index;
-      phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->cShift_CBA;
-      LOG_D(PHY,"[UE %d ] physicalConfigDedicated pusch CBA config dedicated: beta offset %d cshift %d \n",Mod_id,
-            phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index,
-            phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift);
-    }
-
-#endif
   } else {
     LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
     return;
@@ -575,9 +559,9 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
   first_dedicated_configuration ++;
   if(first_dedicated_configuration > 1)
   {
-  	LOG_I(PHY,"Disable SIB MIB decoding \n");
-  	phy_vars_ue->decode_SIB = 0;
-  	phy_vars_ue->decode_MIB = 0;
+    LOG_I(PHY,"Disable SIB MIB decoding \n");
+    phy_vars_ue->decode_SIB = 0;
+    phy_vars_ue->decode_MIB = 0;
   }
   //phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
   if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
@@ -596,83 +580,72 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
  * \param[in] frame_parms LTE_DL_FRAME_PARMS structure.
  * \note This function is optimistic in that it expects malloc() to succeed.
  */
-void phy_init_nr_ue__PDSCH(NR_UE_PDSCH* const pdsch,
-                           const NR_DL_FRAME_PARMS* const fp)
-{
+void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
+                           const NR_DL_FRAME_PARMS *const fp) {
   AssertFatal( pdsch, "pdsch==0" );
-
-  pdsch->pmi_ext = (uint8_t*)malloc16_clear( fp->N_RB_DL );
-  pdsch->llr[0] = (int16_t*)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
-  pdsch->layer_llr[0] = (int16_t*)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
-  pdsch->llr128 = (int16_t**)malloc16_clear( sizeof(int16_t*) );
+  pdsch->pmi_ext = (uint8_t *)malloc16_clear( fp->N_RB_DL );
+  pdsch->llr[0] = (int16_t *)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
+  pdsch->layer_llr[0] = (int16_t *)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
+  pdsch->llr128 = (int16_t **)malloc16_clear( sizeof(int16_t *) );
   // FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
   // FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
-
-
-  pdsch->rxdataF_ext            = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->rxdataF_uespec_pilots  = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->rxdataF_comp0          = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->rho                    = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
-  pdsch->dl_ch_estimates        = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->dl_ch_estimates_ext    = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->dl_bf_ch_estimates     = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->dl_bf_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
+  pdsch->rxdataF_ext            = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->rxdataF_uespec_pilots  = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->rxdataF_comp0          = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->rho                    = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
+  pdsch->dl_ch_estimates        = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->dl_ch_estimates_ext    = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->dl_bf_ch_estimates     = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->dl_bf_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
   //pdsch->dl_ch_rho_ext          = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
   //pdsch->dl_ch_rho2_ext         = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->dl_ch_mag0             = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-  pdsch->dl_ch_magb0            = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-
-
+  pdsch->dl_ch_mag0             = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+  pdsch->dl_ch_magb0            = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
   // the allocated memory size is fixed:
   AssertFatal( fp->nb_antennas_rx <= 2, "nb_antennas_rx > 2" );
 
   for (int i=0; i<fp->nb_antennas_rx; i++) {
-    pdsch->rho[i]     = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
+    pdsch->rho[i]     = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
 
     for (int j=0; j<4; j++) { //fp->nb_antennas_tx; j++)
       const int idx = (j<<1)+i;
       const size_t num = 7*2*fp->N_RB_DL*12;
-      pdsch->rxdataF_ext[idx]             = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-      pdsch->rxdataF_uespec_pilots[idx]   = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
-      pdsch->rxdataF_comp0[idx]           = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-      pdsch->dl_ch_estimates[idx]         = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
-      pdsch->dl_ch_estimates_ext[idx]     = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-      pdsch->dl_bf_ch_estimates[idx]      = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
-      pdsch->dl_bf_ch_estimates_ext[idx]  = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->rxdataF_ext[idx]             = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->rxdataF_uespec_pilots[idx]   = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
+      pdsch->rxdataF_comp0[idx]           = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->dl_ch_estimates[idx]         = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
+      pdsch->dl_ch_estimates_ext[idx]     = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->dl_bf_ch_estimates[idx]      = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
+      pdsch->dl_bf_ch_estimates_ext[idx]  = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
       //pdsch->dl_ch_rho_ext[idx]           = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
       //pdsch->dl_ch_rho2_ext[idx]          = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-      pdsch->dl_ch_mag0[idx]              = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-      pdsch->dl_ch_magb0[idx]             = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->dl_ch_mag0[idx]              = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+      pdsch->dl_ch_magb0[idx]             = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
     }
   }
 }
 
-void phy_init_nr_ue_PUSCH(NR_UE_PUSCH* const pusch,
-                          const NR_DL_FRAME_PARMS* const fp)
-{
+void phy_init_nr_ue_PUSCH(NR_UE_PUSCH *const pusch,
+                          const NR_DL_FRAME_PARMS *const fp) {
   AssertFatal( pusch, "pusch==0" );
 
-  for (int i=0; i<NR_MAX_NB_LAYERS; i++){
-    pusch->txdataF_layers[i] = (int32_t *)malloc16_clear((NR_MAX_PUSCH_ENCODED_LENGTH)*sizeof(int32_t*));
+  for (int i=0; i<NR_MAX_NB_LAYERS; i++) {
+    pusch->txdataF_layers[i] = (int32_t *)malloc16_clear((NR_MAX_PUSCH_ENCODED_LENGTH)*sizeof(int32_t *));
   }
-
 }
 
 int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
                       int nb_connected_eNB,
-                      uint8_t abstraction_flag)
-{
+                      uint8_t abstraction_flag) {
   // create shortcuts
-  NR_DL_FRAME_PARMS* const fp            = &ue->frame_parms;
-  NR_UE_COMMON* const common_vars        = &ue->common_vars;
-  NR_UE_PDSCH** const pdsch_vars_SI      = ue->pdsch_vars_SI;
-  NR_UE_PDSCH** const pdsch_vars_ra      = ue->pdsch_vars_ra;
-  NR_UE_PDSCH** const pdsch_vars_p       = ue->pdsch_vars_p;
-  NR_UE_PDSCH** const pdsch_vars_mch     = ue->pdsch_vars_MCH;
-  NR_UE_PBCH**  const pbch_vars          = ue->pbch_vars;
-  NR_UE_PRACH** const prach_vars         = ue->prach_vars;
-
-
+  NR_DL_FRAME_PARMS *const fp            = &ue->frame_parms;
+  NR_UE_COMMON *const common_vars        = &ue->common_vars;
+  NR_UE_PDSCH **const pdsch_vars_SI      = ue->pdsch_vars_SI;
+  NR_UE_PDSCH **const pdsch_vars_ra      = ue->pdsch_vars_ra;
+  NR_UE_PDSCH **const pdsch_vars_p       = ue->pdsch_vars_p;
+  NR_UE_PDSCH **const pdsch_vars_mch     = ue->pdsch_vars_MCH;
+  NR_UE_PBCH  **const pbch_vars          = ue->pbch_vars;
+  NR_UE_PRACH **const prach_vars         = ue->prach_vars;
   int i,j,k,l,slot,symb,q;
   int eNB_id;
   int th_id;
@@ -684,14 +657,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
   abstraction_flag = 0;
   fp->nb_antennas_tx = 1;
   fp->nb_antennas_rx=1;
-
-
   printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
   //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
-  
   nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,k_ssb);
   phy_init_nr_top(ue);
-
   // many memory allocation sizes are hard coded
   AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]" );
   AssertFatal( nb_connected_eNB <= NUMBER_OF_CONNECTED_eNB_MAX, "n_connected_eNB is too large" );
@@ -712,98 +681,93 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
     ue->total_received_bits[eNB_id] = 0;
   }
 
-/////////////////////////PUSCH init/////////////////////////
-///////////
-  for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++){
-    for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++){
-
+  /////////////////////////PUSCH init/////////////////////////
+  ///////////
+  for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
+    for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++) {
       ue->pusch_vars[th_id][eNB_id] = (NR_UE_PUSCH *)malloc16(sizeof(NR_UE_PUSCH));
       phy_init_nr_ue_PUSCH( ue->pusch_vars[th_id][eNB_id], fp );
-
     }
   }
 
-///////////
-////////////////////////////////////////////////////////////////////////////////////////////
+  ///////////
+  ////////////////////////////////////////////////////////////////////////////////////////////
 
-/////////////////////////PUSCH DMRS init/////////////////////////
-///////////
+  /////////////////////////PUSCH DMRS init/////////////////////////
+  ///////////
 
   // default values until overwritten by RRCConnectionReconfiguration
 
-  for (i=0;i<MAX_NR_OF_UL_ALLOCATIONS;i++){
+  for (i=0; i<MAX_NR_OF_UL_ALLOCATIONS; i++) {
     ue->pusch_config.pusch_TimeDomainResourceAllocation[i] = (PUSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PUSCH_TimeDomainResourceAllocation_t));
     ue->pusch_config.pusch_TimeDomainResourceAllocation[i]->mappingType = typeA;
   }
 
-
-
-  //------------- config DMRS parameters--------------// 
+  //------------- config DMRS parameters--------------//
   ue->dmrs_UplinkConfig.pusch_dmrs_type = pusch_dmrs_type1;
   ue->dmrs_UplinkConfig.pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
   ue->dmrs_UplinkConfig.pusch_maxLength = pusch_len1;
   //-------------------------------------------------//
+  ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
+  pusch_dmrs             = ue->nr_gold_pusch_dmrs;
+  n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization
 
-   ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t***));
-   pusch_dmrs             = ue->nr_gold_pusch_dmrs;
-   n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization 
-
-   for (slot=0; slot<fp->slots_per_frame; slot++) {
-    pusch_dmrs[slot] = (uint32_t ***)malloc16(fp->symbols_per_slot*sizeof(uint32_t**));
+  for (slot=0; slot<fp->slots_per_frame; slot++) {
+    pusch_dmrs[slot] = (uint32_t ***)malloc16(fp->symbols_per_slot*sizeof(uint32_t **));
     AssertFatal(pusch_dmrs[slot]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d - malloc failed\n", slot);
-    for (symb=0; symb<fp->symbols_per_slot; symb++){
-      pusch_dmrs[slot][symb] = (uint32_t **)malloc16(NR_MAX_NB_CODEWORDS*sizeof(uint32_t*));
+
+    for (symb=0; symb<fp->symbols_per_slot; symb++) {
+      pusch_dmrs[slot][symb] = (uint32_t **)malloc16(NR_MAX_NB_CODEWORDS*sizeof(uint32_t *));
       AssertFatal(pusch_dmrs[slot][symb]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
+
       for (q=0; q<NR_MAX_NB_CODEWORDS; q++) {
-        pusch_dmrs[slot][symb][q] = (uint32_t*)malloc16(NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
+        pusch_dmrs[slot][symb][q] = (uint32_t *)malloc16(NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
         AssertFatal(pusch_dmrs[slot][symb][q]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d symbol %d codeword %d - malloc failed\n", slot, symb, q);
       }
     }
   }
 
   nr_init_pusch_dmrs(ue, N_n_scid, n_scid);
-///////////
-////////////////////////////////////////////////////////////////////////////////////////////
+  ///////////
+  ////////////////////////////////////////////////////////////////////////////////////////////
 
-  for (i=0;i<10;i++)
+  for (i=0; i<10; i++)
     ue->tx_power_dBm[i]=-127;
 
   if (abstraction_flag == 0) {
-
     // init TX buffers
-
-    common_vars->txdata  = (int32_t**)malloc16( fp->nb_antennas_tx*sizeof(int32_t*) );
-    common_vars->txdataF = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t*) );
+    common_vars->txdata  = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) );
+    common_vars->txdataF = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) );
 
     for (i=0; i<fp->nb_antennas_tx; i++) {
-
-      common_vars->txdata[i]  = (int32_t*)malloc16_clear( fp->samples_per_subframe*10*sizeof(int32_t) );
+      common_vars->txdata[i]  = (int32_t *)malloc16_clear( fp->samples_per_subframe*10*sizeof(int32_t) );
       common_vars->txdataF[i] = (int32_t *)malloc16_clear( fp->samples_per_slot_wCP*sizeof(int32_t) );
     }
 
     // init RX buffers
-    common_vars->rxdata   = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
+    common_vars->rxdata   = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
+
     for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-        common_vars->common_vars_rx_data_per_thread[th_id].rxdataF  = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
+      common_vars->common_vars_rx_data_per_thread[th_id].rxdataF  = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
     }
 
     for (i=0; i<fp->nb_antennas_rx; i++) {
-      common_vars->rxdata[i] = (int32_t*) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
+      common_vars->rxdata[i] = (int32_t *) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
+
       for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-          common_vars->common_vars_rx_data_per_thread[th_id].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->samples_per_slot_wCP) );
+        common_vars->common_vars_rx_data_per_thread[th_id].rxdataF[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->samples_per_slot_wCP) );
       }
     }
   }
 
-
   // DLSCH
   for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
     for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-        ue->pdsch_vars[th_id][eNB_id]     = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
+      ue->pdsch_vars[th_id][eNB_id]     = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
     }
 
     for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-        ue->pdcch_vars[th_id][eNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH));
+      ue->pdcch_vars[th_id][eNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH));
     }
 
     pdsch_vars_SI[eNB_id]  = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
@@ -815,62 +779,62 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
 
     if (abstraction_flag == 0) {
       for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-         phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
+        phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
       }
 
       for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-        ue->pdsch_vars[th_id][eNB_id]->llr_shifts      = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12);
+        ue->pdsch_vars[th_id][eNB_id]->llr_shifts      = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
         ue->pdsch_vars[th_id][eNB_id]->llr_shifts_p        = ue->pdsch_vars[0][eNB_id]->llr_shifts;
-        ue->pdsch_vars[th_id][eNB_id]->llr[1]              = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
-        ue->pdsch_vars[th_id][eNB_id]->layer_llr[1]        = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
-        ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream    = (int16_t**)malloc16_clear( sizeof(int16_t*) );
-        ue->pdsch_vars[th_id][eNB_id]->rho                 = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
+        ue->pdsch_vars[th_id][eNB_id]->llr[1]              = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
+        ue->pdsch_vars[th_id][eNB_id]->layer_llr[1]        = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
+        ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream    = (int16_t **)malloc16_clear( sizeof(int16_t *) );
+        ue->pdsch_vars[th_id][eNB_id]->rho                 = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
       }
 
-      for (int i=0; i<fp->nb_antennas_rx; i++){
+      for (int i=0; i<fp->nb_antennas_rx; i++) {
         for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-            ue->pdsch_vars[th_id][eNB_id]->rho[i]     = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
+          ue->pdsch_vars[th_id][eNB_id]->rho[i]     = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
         }
+      }
 
-        }
       for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-          ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext      = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
+        ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext      = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
       }
 
       for (i=0; i<fp->nb_antennas_rx; i++)
         for (j=0; j<4; j++) {
           const int idx = (j<<1)+i;
           const size_t num = 7*2*fp->N_RB_DL*12+4;
+
           for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-              ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
+            ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
           }
-
         }
 
       //const size_t num = 7*2*fp->N_RB_DL*12+4;
-      for (k=0;k<8;k++) { //harq_pid
-        for (l=0;l<8;l++) { //round
+      for (k=0; k<8; k++) { //harq_pid
+        for (l=0; l<8; l++) { //round
           for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-              ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-              ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-              ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-              ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
+            ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+            ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+            ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+            ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
           }
 
-
           for (int i=0; i<fp->nb_antennas_rx; i++)
             for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
               const int idx = (j<<1)+i;
+
               for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-                  ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
-                  ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
-                  ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
-                  ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
+                ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
+                ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
+                ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
+                ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
               }
-
-                }
+            }
         }
       }
+
       phy_init_nr_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
       phy_init_nr_ue__PDSCH( pdsch_vars_ra[eNB_id], fp );
       phy_init_nr_ue__PDSCH( pdsch_vars_p[eNB_id], fp );
@@ -878,65 +842,63 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
 
       // 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
       for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-          ue->pdcch_vars[th_id][eNB_id]->llr   = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
-          ue->pdcch_vars[th_id][eNB_id]->llr16 = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
-          ue->pdcch_vars[th_id][eNB_id]->wbar  = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
-          ue->pdcch_vars[th_id][eNB_id]->e_rx  = (int16_t*)malloc16_clear( 4*2*100*12 );
-
-          ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp        = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-          ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext       = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-          ue->pdcch_vars[th_id][eNB_id]->rho                 = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
-          ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext         = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-          ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-
-	  // Channel estimates
-	  ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates      = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
-	  ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
-
-	  for (i=0; i<fp->nb_antennas_rx; i++) {
-            ue->pdcch_vars[th_id][eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) );
-	    for (j=0; j<4; j++) {
-	      int idx = (j<<1) + i;
-	      ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
-	      ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
-      
-	      //  size_t num = 7*2*fp->N_RB_DL*12;
-	      size_t num = 4*273*12;  // 4 symbols, 100 PRBs, 12 REs per PRB
-              ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp[idx]        = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-              ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext[idx]       = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-              ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext[idx]         = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-              ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
-	    }
-	  }
+        ue->pdcch_vars[th_id][eNB_id]->llr   = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
+        ue->pdcch_vars[th_id][eNB_id]->llr16 = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
+        ue->pdcch_vars[th_id][eNB_id]->wbar  = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
+        ue->pdcch_vars[th_id][eNB_id]->e_rx  = (int16_t *)malloc16_clear( 4*2*100*12 );
+        ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp        = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+        ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext       = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+        ue->pdcch_vars[th_id][eNB_id]->rho                 = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
+        ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext         = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+        ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+        // Channel estimates
+        ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates      = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
+        ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
+
+        for (i=0; i<fp->nb_antennas_rx; i++) {
+          ue->pdcch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4) );
+
+          for (j=0; j<4; j++) {
+            int idx = (j<<1) + i;
+            ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
+            ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
+            //  size_t num = 7*2*fp->N_RB_DL*12;
+            size_t num = 4*273*12;  // 4 symbols, 100 PRBs, 12 REs per PRB
+            ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp[idx]        = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+            ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext[idx]       = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+            ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext[idx]         = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+            ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
+          }
+        }
       }
 
       // PBCH
-      pbch_vars[eNB_id]->rxdataF_ext         = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
-      pbch_vars[eNB_id]->rxdataF_comp        = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-      pbch_vars[eNB_id]->dl_ch_estimates     = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-      pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
-      pbch_vars[eNB_id]->llr                 = (int16_t*)malloc16_clear( 1920 );//
-      prach_vars[eNB_id]->prachF             = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
-      prach_vars[eNB_id]->prach              = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
+      pbch_vars[eNB_id]->rxdataF_ext         = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
+      pbch_vars[eNB_id]->rxdataF_comp        = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+      pbch_vars[eNB_id]->dl_ch_estimates     = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+      pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
+      pbch_vars[eNB_id]->llr                 = (int16_t *)malloc16_clear( 1920 ); //
+      prach_vars[eNB_id]->prachF             = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
+      prach_vars[eNB_id]->prach              = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
 
       for (i=0; i<fp->nb_antennas_rx; i++) {
-        pbch_vars[eNB_id]->rxdataF_ext[i]    = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
+        pbch_vars[eNB_id]->rxdataF_ext[i]    = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
 
         for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
           int idx = (j<<1)+i;
-          pbch_vars[eNB_id]->rxdataF_comp[idx]        = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
-          pbch_vars[eNB_id]->dl_ch_estimates[idx]     = (int32_t*)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
-          pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
+          pbch_vars[eNB_id]->rxdataF_comp[idx]        = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
+          pbch_vars[eNB_id]->dl_ch_estimates[idx]     = (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
+          pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
         }
       }
     }
 
-    pbch_vars[eNB_id]->decoded_output = (uint8_t*)malloc16_clear( 64 );
+    pbch_vars[eNB_id]->decoded_output = (uint8_t *)malloc16_clear( 64 );
   }
 
   // initialization for the last instance of pdsch_vars (used for MU-MIMO)
   for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-      ue->pdsch_vars[th_id][eNB_id]     = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
+    ue->pdsch_vars[th_id][eNB_id]     = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
   }
 
   pdsch_vars_SI[eNB_id]  = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
@@ -945,51 +907,41 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
 
   if (abstraction_flag == 0) {
     for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
-        //phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
-        ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
-        ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
+      //phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
+      ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
+      ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
     }
-
   } else { //abstraction == 1
-    ue->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
+    ue->sinr_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
   }
 
-  ue->sinr_CQI_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
-
+  ue->sinr_CQI_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
   ue->init_averaging = 1;
+
   // default value until overwritten by RRCConnectionReconfiguration
   if (fp->nb_antenna_ports_eNB==2)
     ue->pdsch_config_dedicated->p_a = dBm3;
   else
     ue->pdsch_config_dedicated->p_a = dB0;
-  
 
   // set channel estimation to do linear interpolation in time
   ue->high_speed_flag = 1;
   ue->ch_est_alpha    = 24576;
-
   // enable MIB/SIB decoding by default
   ue->decode_MIB = 1;
   ue->decode_SIB = 1;
-
   ue->ssb_periodicity = 5; // initialization of ssb periodicity to 5ms according to TS38.213 section 4.1
-
   init_prach_tables(839);
-
-
   return 0;
-
 }
 
 void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
-                          int abstraction_flag)
-{
+                          int abstraction_flag) {
   for (int i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
     for (int j=0; j<2; j++) {
       for (int k=0; k<RX_NB_TH_MAX; k++) {
         AssertFatal((ue->dlsch[k][i][j]  = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag))!=NULL,"Can't get ue dlsch structures\n");
         LOG_D(PHY,"dlsch[%d][%d][%d] => %p\n",k,i,j,ue->dlsch[k][i][j]);
-
         AssertFatal((ue->ulsch[k][i][j]  = new_nr_ue_ulsch(ue->frame_parms.N_RB_UL, NR_MAX_ULSCH_HARQ_PROCESSES, abstraction_flag))!=NULL,"Can't get ue ulsch structures\n");
         LOG_D(PHY,"ulsch[%d][%d][%d] => %p\n",k,i,j,ue->ulsch[k][i][j]);
       }
@@ -997,102 +949,78 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
 
     ue->dlsch_SI[i]  = new_nr_ue_dlsch(1,1,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag);
     ue->dlsch_ra[i]  = new_nr_ue_dlsch(1,1,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag);
-
     ue->transmission_mode[i] = ue->frame_parms.nb_antenna_ports_eNB==1 ? 1 : 2;
   }
 
   //ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
-
   ue->dlsch_MCH[0]  = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0);
-
 }
 
-void phy_init_nr_top(PHY_VARS_NR_UE *ue)
-{
+void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
   NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
-    
   crcTableInit();
-
   init_dfts();
-
   init_context_synchro_nr(frame_parms);
-
   generate_ul_reference_signal_sequences(SHRT_MAX);
-
   // Polar encoder init for PBCH
-  
   //lte_sync_time_init(frame_parms);
-
   //generate_ul_ref_sigs();
   //generate_ul_ref_sigs_rx();
-
   //generate_64qam_table();
   //generate_16qam_table();
   //generate_RIV_tables();
-
   //init_unscrambling_lut();
   //init_scrambling_lut();
-  
   //set_taus_seed(1328);
-
 }
 
 void set_default_frame_parms_single(nfapi_nr_config_request_t *config,
-                                    NR_DL_FRAME_PARMS *frame_parms)
-{
+                                    NR_DL_FRAME_PARMS *frame_parms) {
   //int CC_id;
-
   //for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
-        /* Set some default values that may be overwritten while reading options */
-        frame_parms = (NR_DL_FRAME_PARMS*) malloc(sizeof(NR_DL_FRAME_PARMS));
-        config = (nfapi_nr_config_request_t*) malloc(sizeof(nfapi_nr_config_request_t));
-        config->subframe_config.numerology_index_mu.value =1;
-        config->subframe_config.duplex_mode.value = 1; //FDD
-        config->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL
-        config->rf_config.dl_carrier_bandwidth.value = 106;
-        config->rf_config.ul_carrier_bandwidth.value = 106;
-        config->sch_config.physical_cell_id.value = 0;
-
-        frame_parms->frame_type          = FDD;
-        frame_parms->tdd_config          = 3;
-        //frame_parms[CC_id]->tdd_config_S        = 0;
-        frame_parms->N_RB_DL             = 100;
-        frame_parms->N_RB_UL             = 100;
-        frame_parms->Ncp                 = NORMAL;
-        //frame_parms[CC_id]->Ncp_UL              = NORMAL;
-        frame_parms->Nid_cell            = 0;
-        //frame_parms[CC_id]->num_MBSFN_config    = 0;
-        frame_parms->nb_antenna_ports_eNB  = 1;
-        frame_parms->nb_antennas_tx      = 1;
-        frame_parms->nb_antennas_rx      = 1;
-
-        //frame_parms[CC_id]->nushift             = 0;
-
-        ///frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth;
-        //frame_parms[CC_id]->phich_config_common.phich_duration = normal;
-	
-	// UL RS Config
-        /*frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 1;//n_DMRS1 set to 0
-        frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
-        frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
-        frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
-
-	frame_parms[CC_id]->pusch_config_common.n_SB = 1;
-	frame_parms[CC_id]->pusch_config_common.hoppingMode = 0;
-	frame_parms[CC_id]->pusch_config_common.pusch_HoppingOffset = 0;
-	frame_parms[CC_id]->pusch_config_common.enable64QAM = 0;
-		
-        frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22;
-        frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1;
-        frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0;
-        frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
-        frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
-
-        // NR: Init to legacy LTE 20Mhz params
-        frame_parms->numerology_index	= 0;
-        frame_parms->ttis_per_subframe	= 1;
-        frame_parms->slots_per_tti		= 2;
-
-    //}
-
+  /* Set some default values that may be overwritten while reading options */
+  frame_parms = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
+  config = (nfapi_nr_config_request_t *) malloc(sizeof(nfapi_nr_config_request_t));
+  config->subframe_config.numerology_index_mu.value =1;
+  config->subframe_config.duplex_mode.value = 1; //FDD
+  config->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL
+  config->rf_config.dl_carrier_bandwidth.value = 106;
+  config->rf_config.ul_carrier_bandwidth.value = 106;
+  config->sch_config.physical_cell_id.value = 0;
+  frame_parms->frame_type          = FDD;
+  frame_parms->tdd_config          = 3;
+  //frame_parms[CC_id]->tdd_config_S        = 0;
+  frame_parms->N_RB_DL             = 100;
+  frame_parms->N_RB_UL             = 100;
+  frame_parms->Ncp                 = NORMAL;
+  //frame_parms[CC_id]->Ncp_UL              = NORMAL;
+  frame_parms->Nid_cell            = 0;
+  //frame_parms[CC_id]->num_MBSFN_config    = 0;
+  frame_parms->nb_antenna_ports_eNB  = 1;
+  frame_parms->nb_antennas_tx      = 1;
+  frame_parms->nb_antennas_rx      = 1;
+  //frame_parms[CC_id]->nushift             = 0;
+  ///frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth;
+  //frame_parms[CC_id]->phich_config_common.phich_duration = normal;
+  // UL RS Config
+  /*frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 1;//n_DMRS1 set to 0
+  frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
+  frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
+  frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
+
+  frame_parms[CC_id]->pusch_config_common.n_SB = 1;
+  frame_parms[CC_id]->pusch_config_common.hoppingMode = 0;
+  frame_parms[CC_id]->pusch_config_common.pusch_HoppingOffset = 0;
+  frame_parms[CC_id]->pusch_config_common.enable64QAM = 0;
+
+  frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22;
+  frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1;
+  frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0;
+  frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
+  frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
+  // NR: Init to legacy LTE 20Mhz params
+  frame_parms->numerology_index = 0;
+  frame_parms->ttis_per_subframe  = 1;
+  frame_parms->slots_per_tti    = 2;
+  //}
 }
diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c
index 7ca794c5c275ba09c37ff49728578cbbb51b0e3e..81785872f93a35a8c1b7ad135a5ee7db1aceece8 100644
--- a/openair1/PHY/INIT/nr_parms.c
+++ b/openair1/PHY/INIT/nr_parms.c
@@ -79,6 +79,32 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_f
   return symbol;
 }
 
+int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot)
+{
+
+  uint8_t n_hf;
+  int rel_slot;
+
+  n_hf = cfg->sch_config.half_frame_index.value;
+
+  // if SSB periodicity is 5ms, they are transmitted in both half frames
+  if ( cfg->sch_config.ssb_periodicity.value == 5) {
+    if (slot<10)
+      n_hf=0;
+    else
+      n_hf=1;
+  }
+
+  // to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be
+  rel_slot = (n_hf)? (slot-10) : slot;
+
+  if(rel_slot<10 && rel_slot>=0)
+    return 1;
+  else
+    return 0;
+
+}
+
 
 int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
 			 int mu,
diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h
index 89ae16a8fa84fb1f2bd4fe668a0cbe62fb436b28..7e0500b56c0a59ef9de46263e9e1249953cd9dd2 100644
--- a/openair1/PHY/INIT/phy_init.h
+++ b/openair1/PHY/INIT/phy_init.h
@@ -34,12 +34,9 @@
 #include "LTE_PHICH-Config.h"
 #include "LTE_MBSFN-SubframeConfigList.h"
 #include "LTE_MobilityControlInfo.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 #include "LTE_SCellToAddMod-r10.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #include "LTE_NonMBSFN-SubframeConfig-r14.h"
-#endif
+
 /** @addtogroup _PHY_STRUCTURES_
  * @{
  */
@@ -73,8 +70,8 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue);
 @note The current implementation will never return -1, but segfault.
  */
 int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue,
-			   int          nb_connected_eNB,
-			   uint8_t         abstraction_flag);
+                       int          nb_connected_eNB,
+                       uint8_t         abstraction_flag);
 
 /*!
 \brief Allocate and initialize the PHY variables releated to the transport channel buffers (UL/DL)
@@ -114,15 +111,15 @@ void phy_free_lte_eNB(PHY_VARS_eNB *phy_vars_eNb);
 @param phich_config Pointer to PHICH_CONFIG_COMMON
  */
 void phy_config_mib_eNB(int                    Mod_id,
-			int                    CC_id,
-			int                    eutra_band,
-			int                    N_RB_DL,
-			LTE_PHICH_Config_t    *phich_config,
-			int                    Nid_cell,
-			int                    Ncp,
-			int                    p_eNB,
-			uint32_t               dl_CarrierFreq,
-			uint32_t               ul_CarrierFreq);
+                        int                    CC_id,
+                        int                    eutra_band,
+                        int                    N_RB_DL,
+                        LTE_PHICH_Config_t    *phich_config,
+                        int                    Nid_cell,
+                        int                    Ncp,
+                        int                    p_eNB,
+                        uint32_t               dl_CarrierFreq,
+                        uint32_t               ul_CarrierFreq);
 
 
 
@@ -249,7 +246,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,
 
  */
 void phy_config_harq_ue(module_id_t Mod_id,int CC_id,uint8_t CH_index,
-                           uint16_t max_harq_tx);
+                        uint16_t max_harq_tx);
 /**
 \brief Configure UE MBSFN common parameters.
 \details Invoked upon reception of SIB13 from eNB.
@@ -265,8 +262,8 @@ void phy_config_sib13_ue(module_id_t Mod_id,
                          long mbsfn_AreaId_r9);
 
 void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
-                        uint8_t eNB_id,
-			struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
+                               uint8_t eNB_id,
+                               struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
 
 /**
 \brief Configure eNB MBSFN common parameters.
@@ -341,25 +338,24 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
 //void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
 
 void lte_param_init(PHY_VARS_eNB **eNBp,
-		    PHY_VARS_UE **UEp,
-		    RU_t **rup,
-		    unsigned char N_tx_port_eNB,
+                    PHY_VARS_UE **UEp,
+                    RU_t **rup,
+                    unsigned char N_tx_port_eNB,
                     unsigned char N_tx_phy,
-		    unsigned char N_rx_ru,
-		    unsigned char N_rx_ue,
-		    unsigned char transmission_mode,
-		    uint8_t extended_prefix_flag,
-		    frame_t frame_type,
-		    uint16_t Nid_cell,
-		    uint8_t tdd_config,
-		    uint8_t N_RB_DL,
-		    uint8_t pa,
-		    uint8_t threequarter_fs,
+                    unsigned char N_rx_ru,
+                    unsigned char N_rx_ue,
+                    unsigned char transmission_mode,
+                    uint8_t extended_prefix_flag,
+                    frame_t frame_type,
+                    uint16_t Nid_cell,
+                    uint8_t tdd_config,
+                    uint8_t N_RB_DL,
+                    uint8_t pa,
+                    uint8_t threequarter_fs,
                     uint8_t osf,
-		    uint32_t perfect_ce);
+                    uint32_t perfect_ce);
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 void phy_config_dedicated_scell_ue(uint8_t Mod_id,
                                    uint8_t eNB_index,
                                    LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
@@ -370,7 +366,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
                                     LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
                                     int CC_id);
 
-#endif
 
 
 
@@ -383,7 +378,8 @@ void phy_config_request(PHY_Config_t *phy_config);
 int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
 void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
 int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_frame_index);
-int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
+int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot);
+int nr_init_frame_parms(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms);
 int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int N_RB_DL,int n_ssb_crb,int ssb_subcarrier_offset);
 int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag);
 void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
index 0d45a472eb7d2a3def68ff0b9b52fe1242e52d64..6f917ee49c5cb1b42e1320972f5fc2dfd8155d74 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
@@ -20,7 +20,7 @@
  */
 
 /*! \file config_ue.c
- * \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing 
+ * \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing
  * \author Javier Morgade
  * \date 2019
  * \version 0.1
@@ -42,23 +42,16 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
                                     module_id_t eNB_id,
                                     uint8_t eNB_offset,
                                     int subframe,
-                                    unsigned char l)
-{
-
-
-
+                                    unsigned char l) {
   int pilot[600] __attribute__((aligned(16)));
   unsigned char aarx,aa;
   unsigned int rb;
   short *pil,*rxF,*ch,*ch0,*ch1,*ch11,*chp,*ch_prev;
   int ch_offset,symbol_offset;
-
   //  unsigned int n;
   //  int i;
-
   int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
   int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
-
   ch_offset     = (l*(ue->frame_parms.ofdm_symbol_size));
   symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
 
@@ -71,12 +64,9 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
                       l>>2);
     } // if symbol==2, return 0 else if symbol = 6, return 1, else if symbol=10 return 2
 
-
-
     pil   = (short *)&pilot[0];
     rxF   = (short *)&rxdataF[aarx][((symbol_offset+ue->frame_parms.first_carrier_offset))];
     ch = (short *)&dl_ch_estimates[aarx][ch_offset];
-
     //    if (eNb_id==0)
     memset(ch,0,4*(ue->frame_parms.ofdm_symbol_size));
 
@@ -84,7 +74,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
     if ((ue->frame_parms.N_RB_DL==6)  ||
         (ue->frame_parms.N_RB_DL==50) ||
         (ue->frame_parms.N_RB_DL==100)) {
-
       // Interpolation  and extrapolation;
       if (l==6) {
         // ________________________First half of RBs____________________
@@ -94,7 +83,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
 
       for (rb=0; rb<ue->frame_parms.N_RB_DL; rb++) {
         // ------------------------1st pilot------------------------
-
         if (rb==(ue->frame_parms.N_RB_DL>>1)) {
           rxF = (short *)&rxdataF[aarx][symbol_offset+1];
 
@@ -179,7 +167,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
         rxF+=24;
       }
     }
-
     //*********************************************************************
     else if (ue->frame_parms.N_RB_DL==25) {
       //printf("Channel estimation\n");
@@ -191,7 +178,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
 
         for (rb=0; rb<12; rb++) {
           // ------------------------1st pilot------------------------
-
           ch[0] = (short)(((int)pil[0]*rxF[0] - (int)pil[1]*rxF[1])>>15);
           ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
           ch[2] = ch[0]>>1;
@@ -269,7 +255,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
         ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
         ch[2] = ch[0]>>1;
         ch[3] = ch[1]>>1;
-
         chp[22] += ch[2];
         chp[23] += ch[3];
         /*  printf("rb %d: pil0 (%d,%d) x (%d,%d) = (%d,%d)\n",
@@ -297,11 +282,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
         /*  printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
           rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
         // printf("Second half\n");
-
         // ________________________Second half of RB____________________
-
         rxF   = (short *)&rxdataF[aarx][((symbol_offset+2))];
-
         // 4th pilot
         ch[12] = (short)(((int)pil[6]*rxF[0] - (int)pil[7]*rxF[1])>>15);
         ch[13] = (short)(((int)pil[6]*rxF[1] + (int)pil[7]*rxF[0])>>15);
@@ -483,7 +465,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
           ch[7] += ch[11];
           /*    printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
             rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
-
           // ------------------------4th pilot------------------------
           ch[12] = (short)(((int)pil[6]*rxF[12] - (int)pil[7]*rxF[13])>>15);
           ch[13] = (short)(((int)pil[6]*rxF[13] + (int)pil[7]*rxF[12])>>15);
@@ -518,7 +499,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
 
         // ------------------------middle PRB--------------------------
         // ------------------------1st pilot---------------------------
-
         ch[0] = (short)(((int)pil[0]*rxF[0] - (int)pil[1]*rxF[1])>>15);
         ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
         ch[2] = ch[0]>>1;
@@ -546,7 +526,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
         /*        printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
             rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
         // printf("Second half\n");
-
         // ------------------------Second half of RBs---------------------//
         rxF   = (short *)&rxdataF[aarx][((symbol_offset+1))];
         // ---------------------------------------------------------------//
@@ -590,7 +569,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
           ch[3] = ch[1]>>1;
           ch[-2] += ch[2];
           ch[-1] += ch[3];
-
           /*    printf("rb %d: pil0 (%d,%d) x (%d,%d) = (%d,%d)\n",
             13+rb,pil[0],pil[1],rxF[0],rxF[1],ch[0],ch[1]);*/
           // ------------------------2nd pilot------------------------
@@ -708,14 +686,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
       ch_prev = (short *)&dl_ch_estimates[aarx][2*(ue->frame_parms.ofdm_symbol_size)];
       ch0 = (short *)&dl_ch_estimates[aarx][0*(ue->frame_parms.ofdm_symbol_size)];
       memcpy(ch0,ch_prev,4*ue->frame_parms.ofdm_symbol_size);
-
       ch1 = (short *)&dl_ch_estimates[aarx][1*(ue->frame_parms.ofdm_symbol_size)];
       memcpy(ch1,ch_prev,4*ue->frame_parms.ofdm_symbol_size);
-
       // 3/4 ch2 + 1/4 ch6 => ch3
       multadd_complex_vector_real_scalar(ch_prev,24576,ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
       multadd_complex_vector_real_scalar(ch,8192,ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size);
-
       // 1/2 ch2 + 1/2 ch6 => ch4
       multadd_complex_vector_real_scalar(ch_prev,16384,ch_prev+(4*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
       multadd_complex_vector_real_scalar(ch,16384,ch_prev+(4*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size);
@@ -748,33 +723,38 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
   for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
     if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
       switch (ue->frame_parms.N_RB_DL) {
-      case 6:
-	idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
-		(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
-		1);
-	break;
-      case 25:
-	idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
-		(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
-		1);
-	break;
-      case 50:
-	idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
-		(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
-		1);
-	break;
-      case 75:
-	idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
-		 (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
-		 1);
-	break;
-      case 100:
-	idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
-		(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
-		1);
-	break;
-      default:
-	break;
+        case 6:
+          idft128((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
+                  (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
+                  1);
+          break;
+
+        case 25:
+          idft512((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
+                  (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
+                  1);
+          break;
+
+        case 50:
+          idft1024((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
+                   (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
+                   1);
+          break;
+
+        case 75:
+          idft1536((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
+                   (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
+                   1);
+          break;
+
+        case 100:
+          idft2048((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
+                   (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
+                   1);
+          break;
+
+        default:
+          break;
       }
     }
   }
@@ -783,15 +763,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
 }
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
-                                    module_id_t eNB_id,
-                                    uint8_t eNB_offset,
-                                    int subframe)
-{
-
-
 
+int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
+    module_id_t eNB_id,
+    uint8_t eNB_offset,
+    int subframe) {
   int pilot_khz_1dot25[600] __attribute__((aligned(16)));
   unsigned char aarx/*,aa*/;
   //unsigned int rb;
@@ -799,163 +775,138 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
   short *pil,*rxF,*dl_ch/*,*ch0,*ch1,*ch11,*chp,*ch_prev*/;
   int ch_offset,symbol_offset;
   int pilot_cnt;
-
   int16_t *f,*f2,*fl,*f2l2,*fr,*f2r2/*,*f2_dc,*f_dc*/;
-
   unsigned int k;
-
   //  unsigned int n;
   //  int i;
-
   int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
   int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
-
   ch_offset     = 0;//(l*(ue->frame_parms.ofdm_symbol_size));
   symbol_offset = 0;//ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
-
   AssertFatal( ue->frame_parms.N_RB_DL==25,"OFDM symbol size %d not yet supported for FeMBMS\n",ue->frame_parms.N_RB_DL);
 
-  if( (subframe&0x1) == 0){
-        f=filt24_0_khz_1dot25;
-        f2=filt24_2_khz_1dot25;
-        fl=filt24_0_khz_1dot25;
-        f2l2=filt24_2_khz_1dot25;
-        fr=filt24_0r2_khz_1dot25;
-        f2r2=filt24_2r_khz_1dot25;
-        //f_dc=filt24_0_dcr_khz_1dot25;
-        //f2_dc=filt24_2_dcl_khz_1dot25;
-   }else{
-    	f=filt24_0_khz_1dot25;
-        f2=filt24_2_khz_1dot25;
-        fl=filt24_0_khz_1dot25;
-        f2l2=filt24_2_khz_1dot25;
-        fr=filt24_0r2_khz_1dot25;
-        f2r2=filt24_2r_khz_1dot25;
-        //f_dc=filt24_0_dcr_khz_1dot25;
-        //f2_dc=filt24_2_dcl_khz_1dot25;
-   }
-
-
- for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
-    // generate pilot
-      lte_dl_mbsfn_khz_1dot25_rx(ue,
-                      &pilot_khz_1dot25[0],
-                      subframe);
-
+  if( (subframe&0x1) == 0) {
+    f=filt24_0_khz_1dot25;
+    f2=filt24_2_khz_1dot25;
+    fl=filt24_0_khz_1dot25;
+    f2l2=filt24_2_khz_1dot25;
+    fr=filt24_0r2_khz_1dot25;
+    f2r2=filt24_2r_khz_1dot25;
+    //f_dc=filt24_0_dcr_khz_1dot25;
+    //f2_dc=filt24_2_dcl_khz_1dot25;
+  } else {
+    f=filt24_0_khz_1dot25;
+    f2=filt24_2_khz_1dot25;
+    fl=filt24_0_khz_1dot25;
+    f2l2=filt24_2_khz_1dot25;
+    fr=filt24_0r2_khz_1dot25;
+    f2r2=filt24_2r_khz_1dot25;
+    //f_dc=filt24_0_dcr_khz_1dot25;
+    //f2_dc=filt24_2_dcl_khz_1dot25;
+  }
 
+  for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
+    // generate pilot
+    lte_dl_mbsfn_khz_1dot25_rx(ue,
+                               &pilot_khz_1dot25[0],
+                               subframe);
     pil   = (short *)&pilot_khz_1dot25[0];
     rxF   = (short *)&rxdataF[aarx][((ue->frame_parms.first_carrier_offset_khz_1dot25))];
     dl_ch = (short *)&dl_ch_estimates[aarx][ch_offset];
-
     memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size_khz_1dot25));
 
-    if( (subframe&0x1) == 0){
-        rxF+=0;
-        k=0;
-    }else{
-        rxF+=6;//2*3;
-        k=3;
+    if( (subframe&0x1) == 0) {
+      rxF+=0;
+      k=0;
+    } else {
+      rxF+=6;//2*3;
+      k=3;
     }
 
-    if(ue->frame_parms.N_RB_DL==25){ 
-       ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-       ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-       multadd_real_vector_complex_scalar(fl,
-                                ch,
-                                dl_ch,
-                                24);
-       pil+=2;    // Re Im
-       rxF+=12;
-       dl_ch+=8;
-
-       ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-       ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-       multadd_real_vector_complex_scalar(f2l2,
-                                ch,
-                                dl_ch,
-                                24);
-       pil+=2;    // Re Im
-       rxF+=12;
-       dl_ch+=16;
-
-       for(pilot_cnt=2;pilot_cnt<299;pilot_cnt+=2){
-
-               ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-               ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-               multadd_real_vector_complex_scalar(f,
-                                  ch,
-                                  dl_ch,
-                                  24);
-               pil+=2;    // Re Im
-               rxF+=12;
-               dl_ch+=8;
-
-               ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-               ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-               multadd_real_vector_complex_scalar(f2,
-                                  ch,
-                                  dl_ch,
-                                  24);
-               pil+=2;
-               rxF+=12;
-               dl_ch+=16;
-
-       }
-
-       rxF   = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
-
-       for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2){
-
-               ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-               ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-                
-               multadd_real_vector_complex_scalar(f,
-                                  ch,
-                                  dl_ch,
-                                  24);
-               pil+=2;
-               rxF+=12;
-               dl_ch+=8;
-
-               ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-               ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-       
-               multadd_real_vector_complex_scalar(f2,
-                                  ch,
-                                  dl_ch,
-                                  24);
-               pil+=2;
-               rxF+=12;
-               dl_ch+=16;
-       }
-
-       ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-       ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-       multadd_real_vector_complex_scalar(fr,
-                                 ch,
-                                 dl_ch,
-                                  24);
-       pil+=2;    // Re Im
-       rxF+=12;
-       dl_ch+=8;
-
-       ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
-       ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
-
-       multadd_real_vector_complex_scalar(f2r2,
-                                  ch,
-                                  dl_ch,
-                                  24);
+    if(ue->frame_parms.N_RB_DL==25) {
+      ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+      ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+      multadd_real_vector_complex_scalar(fl,
+                                         ch,
+                                         dl_ch,
+                                         24);
+      pil+=2;    // Re Im
+      rxF+=12;
+      dl_ch+=8;
+      ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+      ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+      multadd_real_vector_complex_scalar(f2l2,
+                                         ch,
+                                         dl_ch,
+                                         24);
+      pil+=2;    // Re Im
+      rxF+=12;
+      dl_ch+=16;
+
+      for(pilot_cnt=2; pilot_cnt<299; pilot_cnt+=2) {
+        ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+        ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+        multadd_real_vector_complex_scalar(f,
+                                           ch,
+                                           dl_ch,
+                                           24);
+        pil+=2;    // Re Im
+        rxF+=12;
+        dl_ch+=8;
+        ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+        ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+        multadd_real_vector_complex_scalar(f2,
+                                           ch,
+                                           dl_ch,
+                                           24);
+        pil+=2;
+        rxF+=12;
+        dl_ch+=16;
+      }
+
+      rxF   = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
+
+      for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2) {
+        ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+        ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+        multadd_real_vector_complex_scalar(f,
+                                           ch,
+                                           dl_ch,
+                                           24);
+        pil+=2;
+        rxF+=12;
+        dl_ch+=8;
+        ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+        ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+        multadd_real_vector_complex_scalar(f2,
+                                           ch,
+                                           dl_ch,
+                                           24);
+        pil+=2;
+        rxF+=12;
+        dl_ch+=16;
+      }
+
+      ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+      ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+      multadd_real_vector_complex_scalar(fr,
+                                         ch,
+                                         dl_ch,
+                                         24);
+      pil+=2;    // Re Im
+      rxF+=12;
+      dl_ch+=8;
+      ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+      ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
+      multadd_real_vector_complex_scalar(f2r2,
+                                         ch,
+                                         dl_ch,
+                                         24);
     }
   }
 
   return(0);
 }
-#endif
+
 
 
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
index 2dbc58276d6b0ad6b12d87ec0122729cf4b5b58b..3c54e0bd288139796c34bc00b41aaa477ea9326c 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
@@ -38,54 +38,39 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
                                   L1_rxtx_proc_t *proc,
                                   module_id_t UE_id,
                                   unsigned char l,
-                                  unsigned char Ns)
-{
+                                  unsigned char Ns) {
   RU_t *ru;
   ru = RC.ru[UE_id];
   LTE_DL_FRAME_PARMS *frame_parms = (eNB!=NULL) ? &eNB->frame_parms : ru->frame_parms;
   LTE_eNB_PUSCH *pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : NULL;
   RU_CALIBRATION *calibration = &ru->calibration;
   int32_t **ul_ch_estimates = (eNB!=NULL) ? pusch_vars->drs_ch_estimates : calibration->drs_ch_estimates;
-
-  AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null (eNB %p, pusch %p, pusch->drs_ch_estimates %p, pusch->drs_ch_estimates[0] %p ul_ch_estimates %p UE_id %d)\n",eNB,pusch_vars,pusch_vars->drs_ch_estimates,pusch_vars->drs_ch_estimates[0],ul_ch_estimates,UE_id);
-
+  AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null (eNB %p, pusch %p, pusch->drs_ch_estimates %p, pusch->drs_ch_estimates[0] %p ul_ch_estimates %p UE_id %d)\n",eNB,pusch_vars,
+              pusch_vars->drs_ch_estimates,pusch_vars->drs_ch_estimates[0],ul_ch_estimates,UE_id);
   int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
- 
   AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
- 
   int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
-
   int subframe = (eNB!=NULL) ? proc->subframe_rx : ru->proc.tti_rx;
-
-  uint8_t harq_pid; 
+  uint8_t harq_pid;
   int16_t delta_phase = 0;
   int16_t *ru1 = ru_90;
   int16_t *ru2 = ru_90;
   int16_t current_phase1,current_phase2;
-
   uint16_t aa,Msc_RS,Msc_RS_idx;
-  uint16_t * Msc_idx_ptr;
+  uint16_t *Msc_idx_ptr;
   int k,pilot_pos1 = 3 - frame_parms->Ncp, pilot_pos2 = 10 - 2*frame_parms->Ncp;
   int32_t *ul_ch1=NULL, *ul_ch2=NULL;
   int16_t ul_ch_estimates_re,ul_ch_estimates_im;
-
   //uint8_t nb_antennas_rx = frame_parms->nb_antenna_ports_eNB;
   uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
   uint8_t cyclic_shift;
-
   uint32_t alpha_ind;
   uint32_t u=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[Ns+(subframe<<1)];
   uint32_t v=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[Ns+(subframe<<1)];
-
-
   int symbol_offset,i;
-
   //debug_msg("lte_ul_channel_estimation: cyclic shift %d\n",cyclicShift);
-
-
   int16_t alpha_re[12] = {32767, 28377, 16383,     0,-16384,  -28378,-32768,-28378,-16384,    -1, 16383, 28377};
   int16_t alpha_im[12] = {0,     16383, 28377, 32767, 28377,   16383,     0,-16384,-28378,-32768,-28378,-16384};
-
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *rxdataF128,*ul_ref128,*ul_ch128;
   __m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
@@ -93,28 +78,20 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
   int16x8_t *rxdataF128,*ul_ref128,*ul_ch128;
   int32x4_t mmtmp0,mmtmp1,mmtmp_re,mmtmp_im;
 #endif
-
   int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
-  else
-#endif
-    {
-      harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
-    }
+  else {
+    harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
+  }
 
   uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
   int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
-
   Msc_RS = N_rb_alloc*12;
-
   cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
                   eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
                   frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
-
-  Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
+  Msc_idx_ptr = (uint16_t *) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
 
   if (Msc_idx_ptr)
     Msc_RS_idx = Msc_idx_ptr - dftsizes;
@@ -134,7 +111,6 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
 #endif
 
   if (l == (3 - frame_parms->Ncp)) {
-
     symbol_offset = frame_parms->N_RB_UL*12*(l+((7-frame_parms->Ncp)*(Ns&1)));
 
     for (aa=0; aa<nb_antennas_rx; aa++) {
@@ -155,14 +131,13 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
         // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
         mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[0],_MM_SHUFFLE(2,3,0,1));
         mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)&conjugate[0]);
+        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)&conjugate[0]);
         mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[0]);
         // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
         mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
         mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
         mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
         mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-
         ul_ch128[0] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
         //  printf("rb %d ch: %d %d\n",i,((int16_t*)ul_ch128)[0],((int16_t*)ul_ch128)[1]);
         // multiply by conjugated channel
@@ -170,72 +145,63 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
         // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
         mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[1],_MM_SHUFFLE(2,3,0,1));
         mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
         mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[1]);
         // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
         mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
         mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
         mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
         mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-
         ul_ch128[1] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
-
         mmtmpU0 = _mm_madd_epi16(ul_ref128[2],rxdataF128[2]);
         // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
         mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[2],_MM_SHUFFLE(2,3,0,1));
         mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+        mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
         mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[2]);
         // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
         mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
         mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
         mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
         mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-
         ul_ch128[2] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
 #elif defined(__arm__)
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
-      mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
-      mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-
-      ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
-      ul_ch128++;
-      ul_ref128++;
-      rxdataF128++;
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
-      mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
-      mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-
-      ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
-      ul_ch128++;
-      ul_ref128++;
-      rxdataF128++;
-
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
-      mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
-      mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
-                              vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-
-      ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
-      ul_ch128++;
-      ul_ref128++;
-      rxdataF128++;
-
-
+        mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
+        mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
+        mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
+        ul_ch128++;
+        ul_ref128++;
+        rxdataF128++;
+        mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
+        mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
+        mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
+        ul_ch128++;
+        ul_ref128++;
+        rxdataF128++;
+        mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
+        mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+        mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
+        mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
+                                vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
+        ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
+        ul_ch128++;
+        ul_ref128++;
+        rxdataF128++;
 #endif
         ul_ch128+=3;
         ul_ref128+=3;
@@ -251,18 +217,16 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
 #endif
 
         for(i=symbol_offset; i<symbol_offset+Msc_RS; i++) {
-          ul_ch_estimates_re = ((int16_t*) ul_ch_estimates[aa])[i<<1];
-          ul_ch_estimates_im = ((int16_t*) ul_ch_estimates[aa])[(i<<1)+1];
+          ul_ch_estimates_re = ((int16_t *) ul_ch_estimates[aa])[i<<1];
+          ul_ch_estimates_im = ((int16_t *) ul_ch_estimates[aa])[(i<<1)+1];
           //    ((int16_t*) ul_ch_estimates[aa])[i<<1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_re;
-          ((int16_t*) ul_ch_estimates[aa])[i<<1] =
+          ((int16_t *) ul_ch_estimates[aa])[i<<1] =
             (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_re) +
                         (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_im))>>15);
-
           //((int16_t*) ul_ch_estimates[aa])[(i<<1)+1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_im;
-          ((int16_t*) ul_ch_estimates[aa])[(i<<1)+1] =
+          ((int16_t *) ul_ch_estimates[aa])[(i<<1)+1] =
             (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_im) -
                         (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_re))>>15);
-
           alpha_ind+=cyclic_shift;
 
           if (alpha_ind>11)
@@ -276,39 +240,44 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
 
       // Convert to time domain for visualization
       memset(temp_in_ifft_0,0,frame_parms->ofdm_symbol_size*sizeof(int32_t));
+
       for(i=0; i<Msc_RS; i++)
-        ((int32_t*)temp_in_ifft_0)[i] = ul_ch_estimates[aa][symbol_offset+i];
+        ((int32_t *)temp_in_ifft_0)[i] = ul_ch_estimates[aa][symbol_offset+i];
 
       switch(frame_parms->N_RB_DL) {
-      case 6:
-	idft128((int16_t*) temp_in_ifft_0,
-	       (int16_t*) ul_ch_estimates_time[aa],
-	       1);
-	break;
-      case 25:
-	idft512((int16_t*) temp_in_ifft_0,
-	       (int16_t*) ul_ch_estimates_time[aa],
-	       1);
-	break;
-      case 50:
-	idft1024((int16_t*) temp_in_ifft_0,
-	       (int16_t*) ul_ch_estimates_time[aa],
-	       1);
-	break;
-      case 100:
-	idft2048((int16_t*) temp_in_ifft_0,
-	       (int16_t*) ul_ch_estimates_time[aa],
-	       1);
-	break;
+        case 6:
+          idft128((int16_t *) temp_in_ifft_0,
+                  (int16_t *) ul_ch_estimates_time[aa],
+                  1);
+          break;
+
+        case 25:
+          idft512((int16_t *) temp_in_ifft_0,
+                  (int16_t *) ul_ch_estimates_time[aa],
+                  1);
+          break;
+
+        case 50:
+          idft1024((int16_t *) temp_in_ifft_0,
+                   (int16_t *) ul_ch_estimates_time[aa],
+                   1);
+          break;
+
+        case 100:
+          idft2048((int16_t *) temp_in_ifft_0,
+                   (int16_t *) ul_ch_estimates_time[aa],
+                   1);
+          break;
       }
 
 #if T_TRACER
+
       if (aa == 0)
         T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(eNB->ulsch[UE_id]->rnti),
           T_INT(proc->frame_rx), T_INT(subframe),
           T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512  * 4));
-#endif
 
+#endif
 #ifdef DEBUG_CH
 
       if (aa==1) {
@@ -322,151 +291,122 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
 
 #endif
 
-
-    
-    
-	if (Ns&1) {//we are in the second slot of the sub-frame, so do the interpolation
-
-	  ul_ch1 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos1];
-	  ul_ch2 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos2];
-	  
-	  
-	  // Estimation of phase difference between the 2 channel estimates
-	  delta_phase = lte_ul_freq_offset_estimation(frame_parms,
-						      ul_ch_estimates[aa],
-						      N_rb_alloc);
-	  // negative phase index indicates negative Im of ru
-	  //    msg("delta_phase: %d\n",delta_phase);
-	  
+      if (Ns&1) {//we are in the second slot of the sub-frame, so do the interpolation
+        ul_ch1 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos1];
+        ul_ch2 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos2];
+        // Estimation of phase difference between the 2 channel estimates
+        delta_phase = lte_ul_freq_offset_estimation(frame_parms,
+                      ul_ch_estimates[aa],
+                      N_rb_alloc);
+        // negative phase index indicates negative Im of ru
+        //    msg("delta_phase: %d\n",delta_phase);
 #ifdef DEBUG_CH
-	  LOG_D(PHY,"lte_ul_channel_estimation: ul_ch1 = %p, ul_ch2 = %p, pilot_pos1=%d, pilot_pos2=%d\n",ul_ch1, ul_ch2, pilot_pos1,pilot_pos2);
+        LOG_D(PHY,"lte_ul_channel_estimation: ul_ch1 = %p, ul_ch2 = %p, pilot_pos1=%d, pilot_pos2=%d\n",ul_ch1, ul_ch2, pilot_pos1,pilot_pos2);
 #endif
-	  
-	  for (k=0; k<frame_parms->symbols_per_tti; k++) {
-	    
-	    // we scale alpha and beta by SCALE (instead of 0x7FFF) to avoid overflows
-	    //	    alpha = (int16_t) (((int32_t) SCALE * (int32_t) (pilot_pos2-k))/(pilot_pos2-pilot_pos1));
-	    //	    beta  = (int16_t) (((int32_t) SCALE * (int32_t) (k-pilot_pos1))/(pilot_pos2-pilot_pos1));
-
-	    
+
+        for (k=0; k<frame_parms->symbols_per_tti; k++) {
+          // we scale alpha and beta by SCALE (instead of 0x7FFF) to avoid overflows
+          //      alpha = (int16_t) (((int32_t) SCALE * (int32_t) (pilot_pos2-k))/(pilot_pos2-pilot_pos1));
+          //      beta  = (int16_t) (((int32_t) SCALE * (int32_t) (k-pilot_pos1))/(pilot_pos2-pilot_pos1));
 #ifdef DEBUG_CH
-	    LOG_D(PHY,"lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
+          LOG_D(PHY,"lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
 #endif
           //symbol_offset_subframe = frame_parms->N_RB_UL*12*k;
-	    
-          // interpolate between estimates
-	    if ((k != pilot_pos1) && (k != pilot_pos2))  {
-	      //          multadd_complex_vector_real_scalar((int16_t*) ul_ch1,alpha,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-	      //          multadd_complex_vector_real_scalar((int16_t*) ul_ch2,beta ,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-	      
-	      //          multadd_complex_vector_real_scalar((int16_t*) ul_ch1,SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-	      //          multadd_complex_vector_real_scalar((int16_t*) ul_ch2,SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-	      //          msg("phase = %d\n",ru[2*cmax(((delta_phase/7)*(k-3)),0)]);
-	      
-	      // the phase is linearly interpolated
-	      current_phase1 = (delta_phase/7)*(k-pilot_pos1);
-	      current_phase2 = (delta_phase/7)*(k-pilot_pos2);
-	      //          msg("sym: %d, current_phase1: %d, current_phase2: %d\n",k,current_phase1,current_phase2);
-	      // set the right quadrant
-	      (current_phase1 > 0) ? (ru1 = ru_90) : (ru1 = ru_90c);
-	      (current_phase2 > 0) ? (ru2 = ru_90) : (ru2 = ru_90c);
-	      // take absolute value and clip
-	      current_phase1 = cmin(abs(current_phase1),127);
-	      current_phase2 = cmin(abs(current_phase2),127);
-	      
-	      //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
-	      
-	      // rotate channel estimates by estimated phase
-	      rotate_cpx_vector((int16_t*) ul_ch1,
-				&ru1[2*current_phase1],
-				(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
-				Msc_RS,
-				15);
-	      
-	      rotate_cpx_vector((int16_t*) ul_ch2,
-				&ru2[2*current_phase2],
-				(int16_t*) &tmp_estimates[0],
-				Msc_RS,
-				15);
-	      
-	      // Combine the two rotated estimates
-	      multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-	      multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-	      
-	      /*
-		if ((k<pilot_pos1) || ((k>pilot_pos2))) {
-		
-                multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-		
-                multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-		
-		} else {
-		
-                multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-		
-                multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-		
-                //              multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],alpha,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-		
-                //              multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],beta ,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-		
-		}
-	      */
-	      
-	      //      memcpy(&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],ul_ch1,Msc_RS*sizeof(int32_t));
-	    }
-	  } //for(k=...
-
-	  // because of the scaling of alpha and beta we also need to scale the final channel estimate at the pilot positions
-	  
-	  //    multadd_complex_vector_real_scalar((int16_t*) ul_ch1,SCALE,(int16_t*) ul_ch1,1,Msc_RS);
-	  //    multadd_complex_vector_real_scalar((int16_t*) ul_ch2,SCALE,(int16_t*) ul_ch2,1,Msc_RS);
-
-	} //if (Ns&1)
 
+          // interpolate between estimates
+          if ((k != pilot_pos1) && (k != pilot_pos2))  {
+            //          multadd_complex_vector_real_scalar((int16_t*) ul_ch1,alpha,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+            //          multadd_complex_vector_real_scalar((int16_t*) ul_ch2,beta ,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+            //          multadd_complex_vector_real_scalar((int16_t*) ul_ch1,SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+            //          multadd_complex_vector_real_scalar((int16_t*) ul_ch2,SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+            //          msg("phase = %d\n",ru[2*cmax(((delta_phase/7)*(k-3)),0)]);
+            // the phase is linearly interpolated
+            current_phase1 = (delta_phase/7)*(k-pilot_pos1);
+            current_phase2 = (delta_phase/7)*(k-pilot_pos2);
+            //          msg("sym: %d, current_phase1: %d, current_phase2: %d\n",k,current_phase1,current_phase2);
+            // set the right quadrant
+            (current_phase1 > 0) ? (ru1 = ru_90) : (ru1 = ru_90c);
+            (current_phase2 > 0) ? (ru2 = ru_90) : (ru2 = ru_90c);
+            // take absolute value and clip
+            current_phase1 = cmin(abs(current_phase1),127);
+            current_phase2 = cmin(abs(current_phase2),127);
+            //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
+            // rotate channel estimates by estimated phase
+            rotate_cpx_vector((int16_t *) ul_ch1,
+                              &ru1[2*current_phase1],
+                              (int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
+                              Msc_RS,
+                              15);
+            rotate_cpx_vector((int16_t *) ul_ch2,
+                              &ru2[2*current_phase2],
+                              (int16_t *) &tmp_estimates[0],
+                              Msc_RS,
+                              15);
+            // Combine the two rotated estimates
+            multadd_complex_vector_real_scalar((int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE,(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+            multadd_complex_vector_real_scalar((int16_t *) &tmp_estimates[0],SCALE,(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+            /*
+            if ((k<pilot_pos1) || ((k>pilot_pos2))) {
+
+                    multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+
+                    multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+
+            } else {
+
+                    multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+
+                    multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE>>1,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+
+                    //              multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],alpha,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+
+                    //              multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],beta ,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+
+            }
+            */
+            //      memcpy(&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],ul_ch1,Msc_RS*sizeof(int32_t));
+          }
+        } //for(k=...
+
+        // because of the scaling of alpha and beta we also need to scale the final channel estimate at the pilot positions
+        //    multadd_complex_vector_real_scalar((int16_t*) ul_ch1,SCALE,(int16_t*) ul_ch1,1,Msc_RS);
+        //    multadd_complex_vector_real_scalar((int16_t*) ul_ch2,SCALE,(int16_t*) ul_ch2,1,Msc_RS);
+      } //if (Ns&1)
     } //for(aa=...
-
   } //if(l==...
 
-
-
   return(0);
 }
 
 int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
-				  int32_t **ul_ch_estimates,
-				  int32_t **ul_ch_estimates_time,
-				  int32_t **rxdataF_ext,
-				  int N_rb_alloc,
-				  int frame_rx,
-				  int subframe_rx,
-				  uint32_t u,
-				  uint32_t v,
-				  uint32_t cyclic_shift,
-                                  unsigned char l,
-				  int interpolate,
-				  uint16_t rnti) {
-
+                                      int32_t **ul_ch_estimates,
+                                      int32_t **ul_ch_estimates_time,
+                                      int32_t **rxdataF_ext,
+                                      int N_rb_alloc,
+                                      int frame_rx,
+                                      int subframe_rx,
+                                      uint32_t u,
+                                      uint32_t v,
+                                      uint32_t cyclic_shift,
+                                      unsigned char l,
+                                      int interpolate,
+                                      uint16_t rnti) {
   int16_t delta_phase = 0;
   int16_t *ru1 = ru_90;
   int16_t *ru2 = ru_90;
   int16_t current_phase1,current_phase2;
   uint16_t aa,Msc_RS,Msc_RS_idx;
-  uint16_t * Msc_idx_ptr;
+  uint16_t *Msc_idx_ptr;
   int k,pilot_pos1 = 3 - frame_parms->Ncp, pilot_pos2 = 10 - 2*frame_parms->Ncp;
   int32_t *ul_ch1=NULL, *ul_ch2=NULL;
   int16_t ul_ch_estimates_re,ul_ch_estimates_im;
   uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
   uint32_t alpha_ind;
   int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
-
   int symbol_offset,i;
-
   //debug_msg("lte_ul_channel_estimation_RRU: cyclic shift %d\n",cyclicShift);
-
   int16_t alpha_re[12] = {32767, 28377, 16383,     0,-16384,  -28378,-32768,-28378,-16384,    -1, 16383, 28377};
   int16_t alpha_im[12] = {0,     16383, 28377, 32767, 28377,   16383,     0,-16384,-28378,-32768,-28378,-16384};
-
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *rxdataF128,*ul_ref128,*ul_ch128;
   __m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
@@ -474,18 +414,14 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
   int16x8_t *rxdataF128,*ul_ref128,*ul_ch128;
   int32x4_t mmtmp0,mmtmp1,mmtmp_re,mmtmp_im;
 #endif
-
   int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
-
   AssertFatal(l==pilot_pos1 || l==pilot_pos2,"%d is not a valid symbol for DMRS, should be %d or %d\n",
-	      l,pilot_pos1,pilot_pos2);
-
+              l,pilot_pos1,pilot_pos2);
   Msc_RS = N_rb_alloc*12;
   /*
 
   */
-
-  Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
+  Msc_idx_ptr = (uint16_t *) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
 
   if (Msc_idx_ptr)
     Msc_RS_idx = Msc_idx_ptr - dftsizes;
@@ -493,19 +429,19 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
     LOG_E(PHY,"lte_ul_channel_estimation_RRU: index for Msc_RS=%d not found\n",Msc_RS);
     return(-1);
   }
+
   LOG_D(PHY,"subframe %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe_rx,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
 #ifdef DEBUG_CH
+
   if (l==pilot_pos1)
     write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,1);
   else
     write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,1);
 
 #endif
-
   symbol_offset = frame_parms->N_RB_UL*12*l;
-  
+
   for (aa=0; aa<nb_antennas_rx; aa++) {
-    
 #if defined(__x86_64__) || defined(__i386__)
     rxdataF128 = (__m128i *)&rxdataF_ext[aa][symbol_offset];
     ul_ch128   = (__m128i *)&ul_ch_estimates[aa][symbol_offset];
@@ -515,7 +451,7 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
     ul_ch128   = (int16x8_t *)&ul_ch_estimates[aa][symbol_offset];
     ul_ref128  = (int16x8_t *)ul_ref_sigs_rx[u][v][Msc_RS_idx];
 #endif
-    
+
     for (i=0; i<Msc_RS/12; i++) {
 #if defined(__x86_64__) || defined(__i386__)
       // multiply by conjugated channel
@@ -523,14 +459,13 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[0],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)&conjugate[0]);
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)&conjugate[0]);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[0]);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
       mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
       mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-      
       ul_ch128[0] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
       //      printf("rb %d ch: %d %d\n",i,((int16_t*)ul_ch128)[0],((int16_t*)ul_ch128)[1]);
       // multiply by conjugated channel
@@ -538,248 +473,231 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[1],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[1]);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
       mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
       mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-      
       ul_ch128[1] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
-      
       mmtmpU0 = _mm_madd_epi16(ul_ref128[2],rxdataF128[2]);
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ref128[2],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[2]);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,15);
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,15);
       mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
       mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-      
       ul_ch128[2] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
 #elif defined(__arm__)
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
       mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
       mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      
       ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
       ul_ch128++;
       ul_ref128++;
       rxdataF128++;
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
       mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
       mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      
       ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
       ul_ch128++;
       ul_ref128++;
       rxdataF128++;
-      
-      mmtmp0 = vmull_s16(((int16x4_t*)ul_ref128)[0],((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(((int16x4_t*)ul_ref128)[1],((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(((int16x4_t *)ul_ref128)[0],((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(((int16x4_t *)ul_ref128)[1],((int16x4_t *)rxdataF128)[1]);
       mmtmp_re = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[0],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[0]);
-      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t*)ul_ref128)[1],*(int16x4_t*)conjugate)), ((int16x4_t*)rxdataF128)[1]);
+      mmtmp0 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[0],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[0]);
+      mmtmp1 = vmull_s16(vrev32_s16(vmul_s16(((int16x4_t *)ul_ref128)[1],*(int16x4_t *)conjugate)), ((int16x4_t *)rxdataF128)[1]);
       mmtmp_im = vcombine_s32(vpadd_s32(vget_low_s32(mmtmp0),vget_high_s32(mmtmp0)),
                               vpadd_s32(vget_low_s32(mmtmp1),vget_high_s32(mmtmp1)));
-      
       ul_ch128[0] = vcombine_s16(vmovn_s32(mmtmp_re),vmovn_s32(mmtmp_im));
       ul_ch128++;
       ul_ref128++;
       rxdataF128++;
-      
-      
 #endif
       ul_ch128+=3;
       ul_ref128+=3;
       rxdataF128+=3;
     }
-    
+
     alpha_ind = 0;
-    
+
     if((cyclic_shift != 0)) {
       // Compensating for the phase shift introduced at the transmitte
 #ifdef DEBUG_CH
       write_output("drs_est_pre.m","drsest_pre",ul_ch_estimates[0],300*12,1,1);
 #endif
-      
+
       for(i=symbol_offset; i<symbol_offset+Msc_RS; i++) {
-	ul_ch_estimates_re = ((int16_t*) ul_ch_estimates[aa])[i<<1];
-	ul_ch_estimates_im = ((int16_t*) ul_ch_estimates[aa])[(i<<1)+1];
-	//    ((int16_t*) ul_ch_estimates[aa])[i<<1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_re;
-	((int16_t*) ul_ch_estimates[aa])[i<<1] =
-	  (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_re) +
-		      (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_im))>>15);
-	
-	//((int16_t*) ul_ch_estimates[aa])[(i<<1)+1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_im;
-	((int16_t*) ul_ch_estimates[aa])[(i<<1)+1] =
-	  (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_im) -
-		      (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_re))>>15);
-	
-	alpha_ind+=cyclic_shift;
-	
-	if (alpha_ind>11)
-	  alpha_ind-=12;
+        ul_ch_estimates_re = ((int16_t *) ul_ch_estimates[aa])[i<<1];
+        ul_ch_estimates_im = ((int16_t *) ul_ch_estimates[aa])[(i<<1)+1];
+        //    ((int16_t*) ul_ch_estimates[aa])[i<<1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_re;
+        ((int16_t *) ul_ch_estimates[aa])[i<<1] =
+          (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_re) +
+                      (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_im))>>15);
+        //((int16_t*) ul_ch_estimates[aa])[(i<<1)+1] =  (i%2 == 1? 1:-1) * ul_ch_estimates_im;
+        ((int16_t *) ul_ch_estimates[aa])[(i<<1)+1] =
+          (int16_t) (((int32_t) (alpha_re[alpha_ind]) * (int32_t) (ul_ch_estimates_im) -
+                      (int32_t) (alpha_im[alpha_ind]) * (int32_t) (ul_ch_estimates_re))>>15);
+        alpha_ind+=cyclic_shift;
+
+        if (alpha_ind>11)
+          alpha_ind-=12;
       }
-      
+
 #ifdef DEBUG_CH
       write_output("drs_est_post.m","drsest_post",ul_ch_estimates[0],300*12,1,1);
 #endif
     }
-    
+
     if (ul_ch_estimates_time && ul_ch_estimates_time[aa]) {
       // Convert to time domain for visualization
       memset(temp_in_ifft_0,0,frame_parms->ofdm_symbol_size*sizeof(int32_t));
+
       for(i=0; i<Msc_RS; i++)
-	((int32_t*)temp_in_ifft_0)[i] = ul_ch_estimates[aa][symbol_offset+i];
-      
+        ((int32_t *)temp_in_ifft_0)[i] = ul_ch_estimates[aa][symbol_offset+i];
+
       switch(frame_parms->N_RB_DL) {
-      case 6:
-	idft128((int16_t*) temp_in_ifft_0,
-		(int16_t*) ul_ch_estimates_time[aa],
-		1);
-	break;
-      case 25:
-	idft512((int16_t*) temp_in_ifft_0,
-		(int16_t*) ul_ch_estimates_time[aa],
-		1);
-	break;
-      case 50:
-	idft1024((int16_t*) temp_in_ifft_0,
-		 (int16_t*) ul_ch_estimates_time[aa],
-		 1);
-	break;
-      case 100:
-	idft2048((int16_t*) temp_in_ifft_0,
-		 (int16_t*) ul_ch_estimates_time[aa],
-		 1);
-	break;
+        case 6:
+          idft128((int16_t *) temp_in_ifft_0,
+                  (int16_t *) ul_ch_estimates_time[aa],
+                  1);
+          break;
+
+        case 25:
+          idft512((int16_t *) temp_in_ifft_0,
+                  (int16_t *) ul_ch_estimates_time[aa],
+                  1);
+          break;
+
+        case 50:
+          idft1024((int16_t *) temp_in_ifft_0,
+                   (int16_t *) ul_ch_estimates_time[aa],
+                   1);
+          break;
+
+        case 100:
+          idft2048((int16_t *) temp_in_ifft_0,
+                   (int16_t *) ul_ch_estimates_time[aa],
+                   1);
+          break;
       }
-      
+
 #if T_TRACER
+
       if (aa == 0)
-	T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(rnti),
-	  T_INT(frame_rx), T_INT(subframe_rx),
-	  T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512  * 4));
+        T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(rnti),
+          T_INT(frame_rx), T_INT(subframe_rx),
+          T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512  * 4));
+
 #endif
     }
+
 #ifdef DEBUG_CH
-    
+
     if (aa==1) {
       if (l == pilot_pos1) {
-	write_output("rxdataF_ext.m","rxF_ext",&rxdataF_ext[aa][symbol_offset],512*2,2,1);
-	write_output("tmpin_ifft.m","drs_in",temp_in_ifft_0,512,1,1);
-	if (ul_ch_estimates_time[aa]) write_output("drs_est0.m","drs0",ul_ch_estimates_time[aa],512,1,1);
-      } else
-	if (ul_ch_estimates_time[aa]) write_output("drs_est1.m","drs1",ul_ch_estimates_time[aa],512,1,1);
+        write_output("rxdataF_ext.m","rxF_ext",&rxdataF_ext[aa][symbol_offset],512*2,2,1);
+        write_output("tmpin_ifft.m","drs_in",temp_in_ifft_0,512,1,1);
+
+        if (ul_ch_estimates_time[aa]) write_output("drs_est0.m","drs0",ul_ch_estimates_time[aa],512,1,1);
+      } else if (ul_ch_estimates_time[aa]) write_output("drs_est1.m","drs1",ul_ch_estimates_time[aa],512,1,1);
     }
-    
+
 #endif
-    
-    
-    
-    
+
     if (l==pilot_pos2 && interpolate==1) {//we are in the second slot of the sub-frame, so do the interpolation
-      
       ul_ch1 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos1];
       ul_ch2 = &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos2];
-      
-      
       // Estimation of phase difference between the 2 channel estimates
       delta_phase = lte_ul_freq_offset_estimation(frame_parms,
-						  ul_ch_estimates[aa],
-						  N_rb_alloc);
+                    ul_ch_estimates[aa],
+                    N_rb_alloc);
       // negative phase index indicates negative Im of ru
       //    msg("delta_phase: %d\n",delta_phase);
-      
 #ifdef DEBUG_CH
       LOG_D(PHY,"lte_ul_channel_estimation_RRU: ul_ch1 = %p, ul_ch2 = %p, pilot_pos1=%d, pilot_pos2=%d\n",ul_ch1, ul_ch2, pilot_pos1,pilot_pos2);
 #endif
-      
+
       for (k=0; k<frame_parms->symbols_per_tti; k++) {
-	
 #ifdef DEBUG_CH
-	//	LOG_D(PHY,"lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
+        //  LOG_D(PHY,"lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
 #endif
-	//symbol_offset_subframe = frame_parms->N_RB_UL*12*k;
-	
-	// interpolate between estimates
-	if ((k != pilot_pos1) && (k != pilot_pos2))  {
-	  
-	  // the phase is linearly interpolated
-	  current_phase1 = (delta_phase/7)*(k-pilot_pos1);
-	  current_phase2 = (delta_phase/7)*(k-pilot_pos2);
-	  //          msg("sym: %d, current_phase1: %d, current_phase2: %d\n",k,current_phase1,current_phase2);
-	  // set the right quadrant
-	  (current_phase1 > 0) ? (ru1 = ru_90) : (ru1 = ru_90c);
-	  (current_phase2 > 0) ? (ru2 = ru_90) : (ru2 = ru_90c);
-	  // take absolute value and clip
-	  current_phase1 = cmin(abs(current_phase1),127);
-	  current_phase2 = cmin(abs(current_phase2),127);
-	  
-	  //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
-	  
-	  // rotate channel estimates by estimated phase
-	  rotate_cpx_vector((int16_t*) ul_ch1,
-			    &ru1[2*current_phase1],
-			    (int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
-			    Msc_RS,
-			    15);
-	  
-	  rotate_cpx_vector((int16_t*) ul_ch2,
-			    &ru2[2*current_phase2],
-			    (int16_t*) &tmp_estimates[0],
-			    Msc_RS,
-			    15);
-	  
-	  // Combine the two rotated estimates
-	  multadd_complex_vector_real_scalar((int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
-	  multadd_complex_vector_real_scalar((int16_t*) &tmp_estimates[0],SCALE,(int16_t*) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
-	  
-	}
+        //symbol_offset_subframe = frame_parms->N_RB_UL*12*k;
+
+        // interpolate between estimates
+        if ((k != pilot_pos1) && (k != pilot_pos2))  {
+          // the phase is linearly interpolated
+          current_phase1 = (delta_phase/7)*(k-pilot_pos1);
+          current_phase2 = (delta_phase/7)*(k-pilot_pos2);
+          //          msg("sym: %d, current_phase1: %d, current_phase2: %d\n",k,current_phase1,current_phase2);
+          // set the right quadrant
+          (current_phase1 > 0) ? (ru1 = ru_90) : (ru1 = ru_90c);
+          (current_phase2 > 0) ? (ru2 = ru_90) : (ru2 = ru_90c);
+          // take absolute value and clip
+          current_phase1 = cmin(abs(current_phase1),127);
+          current_phase2 = cmin(abs(current_phase2),127);
+          //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
+          // rotate channel estimates by estimated phase
+          rotate_cpx_vector((int16_t *) ul_ch1,
+                            &ru1[2*current_phase1],
+                            (int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
+                            Msc_RS,
+                            15);
+          rotate_cpx_vector((int16_t *) ul_ch2,
+                            &ru2[2*current_phase2],
+                            (int16_t *) &tmp_estimates[0],
+                            Msc_RS,
+                            15);
+          // Combine the two rotated estimates
+          multadd_complex_vector_real_scalar((int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],SCALE,(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],1,Msc_RS);
+          multadd_complex_vector_real_scalar((int16_t *) &tmp_estimates[0],SCALE,(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],0,Msc_RS);
+        }
       } //for(k=...
-      
+
       // because of the scaling of alpha and beta we also need to scale the final channel estimate at the pilot positions
-      
       //    multadd_complex_vector_real_scalar((int16_t*) ul_ch1,SCALE,(int16_t*) ul_ch1,1,Msc_RS);
       //    multadd_complex_vector_real_scalar((int16_t*) ul_ch2,SCALE,(int16_t*) ul_ch2,1,Msc_RS);
-      
     } //if (Ns&1 && interpolate==1)
     else if (interpolate == 0 && l == pilot_pos1)
-      for (k=0;k<frame_parms->symbols_per_tti>>1;k++) { 
+      for (k=0; k<frame_parms->symbols_per_tti>>1; k++) {
         if (k==pilot_pos1) k++;
-	memcpy((void*)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
-	       (void*)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos1],
-	       frame_parms->N_RB_UL*12*sizeof(int));
+
+        memcpy((void *)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
+               (void *)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos1],
+               frame_parms->N_RB_UL*12*sizeof(int));
+      } else if (interpolate == 0 && l == pilot_pos2) {
+      for (k=0; k<frame_parms->symbols_per_tti>>1; k++) {
+        if (k==pilot_pos2) k++;
+
+        memcpy((void *)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*(k+(frame_parms->symbols_per_tti>>1))],
+               (void *)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos2],
+               frame_parms->N_RB_UL*12*sizeof(int));
       }
-    else if (interpolate == 0 && l == pilot_pos2) {
-      for (k=0;k<frame_parms->symbols_per_tti>>1;k++) {
-	if (k==pilot_pos2) k++;
-	memcpy((void*)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*(k+(frame_parms->symbols_per_tti>>1))],
-	       (void*)&ul_ch_estimates[aa][frame_parms->N_RB_UL*12*pilot_pos2],
-	       frame_parms->N_RB_UL*12*sizeof(int));
-      }	
+
       delta_phase = lte_ul_freq_offset_estimation(frame_parms,
-                                                  ul_ch_estimates[aa],
-                                                  N_rb_alloc);
+                    ul_ch_estimates[aa],
+                    N_rb_alloc);
       LOG_D(PHY,"delta_phase = %d\n",delta_phase);
     }
   } //for(aa=...
+
   return(0);
 }
 
@@ -791,19 +709,15 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
                                    LTE_eNB_SRS *srs_vars,
                                    SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
                                    unsigned char subframe,
-                                   unsigned char eNB_id)
-{
-
+                                   unsigned char eNB_id) {
   int aa;
   int N_symb,symbol;
   uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
 #ifdef DEBUG_SRS
   char fname[40], vname[40];
 #endif
-
   //uint8_t Ssrs  = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
   //uint8_t T_SFC = (Ssrs<=7 ? 5 : 10);
-
   N_symb = 2*7-frame_parms->Ncp;
   symbol = N_symb-1; //SRS is always in last symbol of subframe
 
@@ -819,39 +733,35 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
   //if ((1<<(sub_frame_number%T_SFC))&transmission_offset_tdd[Ssrs]) {
 
   if (generate_srs(frame_parms,
-		   soundingrs_ul_config_dedicated,
-		   &srs_vars->srs[eNB_id],
-		   0x7FFF,
-		   subframe)==-1) {
-      LOG_E(PHY,"lte_srs_channel_estimation: Error in generate_srs\n");
-      return(-1);
-    }
+                   soundingrs_ul_config_dedicated,
+                   &srs_vars->srs[eNB_id],
+                   0x7FFF,
+                   subframe)==-1) {
+    LOG_E(PHY,"lte_srs_channel_estimation: Error in generate_srs\n");
+    return(-1);
+  }
 
-    for (aa=0; aa<nb_antennas_rx; aa++) {
+  for (aa=0; aa<nb_antennas_rx; aa++) {
 #ifdef DEBUG_SRS
-      LOG_E(PHY,"SRS channel estimation eNB %d, subframs %d, aarx %d, %p, %p, %p\n",eNB_id,sub_frame_number,aa,
-	    &common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
-	    srs_vars->srs,
-	    srs_vars->srs_ch_estimates[aa]);
+    LOG_E(PHY,"SRS channel estimation eNB %d, subframs %d, aarx %d, %p, %p, %p\n",eNB_id,sub_frame_number,aa,
+          &common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
+          srs_vars->srs,
+          srs_vars->srs_ch_estimates[aa]);
 #endif
-      
-      //LOG_M("eNB_rxF.m","rxF",&common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
-      //LOG_M("eNB_srs.m","srs_eNB",common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
-
-
-      mult_cpx_conj_vector((int16_t*) &common_vars->rxdataF[aa][2*frame_parms->ofdm_symbol_size*symbol],
-			   (int16_t*) srs_vars->srs,
-			   (int16_t*) srs_vars->srs_ch_estimates[aa],
-			   frame_parms->ofdm_symbol_size,
-			   15,
-			   0);
-
+    //LOG_M("eNB_rxF.m","rxF",&common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
+    //LOG_M("eNB_srs.m","srs_eNB",common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
+    mult_cpx_conj_vector((int16_t *) &common_vars->rxdataF[aa][2*frame_parms->ofdm_symbol_size*symbol],
+                         (int16_t *) srs_vars->srs,
+                         (int16_t *) srs_vars->srs_ch_estimates[aa],
+                         frame_parms->ofdm_symbol_size,
+                         15,
+                         0);
 #ifdef DEBUG_SRS
-      sprintf(fname,"srs_ch_est%d.m",aa);
-      sprintf(vname,"srs_est%d",aa);
-      LOG_M(fname,vname,srs_vars->srs_ch_estimates[aa],frame_parms->ofdm_symbol_size,1,1);
+    sprintf(fname,"srs_ch_est%d.m",aa);
+    sprintf(vname,"srs_est%d",aa);
+    LOG_M(fname,vname,srs_vars->srs_ch_estimates[aa],frame_parms->ofdm_symbol_size,1,1);
 #endif
-    }
+  }
 
   /*
     else {
@@ -864,9 +774,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
 
 int16_t lte_ul_freq_offset_estimation(LTE_DL_FRAME_PARMS *frame_parms,
                                       int32_t *ul_ch_estimates,
-                                      uint16_t nb_rb)
-{
-
+                                      uint16_t nb_rb) {
 #if defined(__x86_64__) || defined(__i386__)
   int k, rb;
   int a_idx = 64;
@@ -874,18 +782,16 @@ int16_t lte_ul_freq_offset_estimation(LTE_DL_FRAME_PARMS *frame_parms,
   uint8_t output_shift;
   int pilot_pos1 = 3 - frame_parms->Ncp;
   int pilot_pos2 = 10 - 2*frame_parms->Ncp;
-  __m128i *ul_ch1 = (__m128i*)&ul_ch_estimates[pilot_pos1*frame_parms->N_RB_UL*12];
-  __m128i *ul_ch2 = (__m128i*)&ul_ch_estimates[pilot_pos2*frame_parms->N_RB_UL*12];
+  __m128i *ul_ch1 = (__m128i *)&ul_ch_estimates[pilot_pos1*frame_parms->N_RB_UL*12];
+  __m128i *ul_ch2 = (__m128i *)&ul_ch_estimates[pilot_pos2*frame_parms->N_RB_UL*12];
   int32_t avg[2];
   int16_t Ravg[2];
   Ravg[0]=0;
   Ravg[1]=0;
   int16_t iv, rv, phase_idx;
   __m128i avg128U1, avg128U2, R[3], mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3;
-
   // round(tan((pi/4)*[1:1:N]/N)*pow2(15))
   int16_t alpha[128] = {201, 402, 603, 804, 1006, 1207, 1408, 1610, 1811, 2013, 2215, 2417, 2619, 2822, 3024, 3227, 3431, 3634, 3838, 4042, 4246, 4450, 4655, 4861, 5066, 5272, 5479, 5686, 5893, 6101, 6309, 6518, 6727, 6937, 7147, 7358, 7570, 7782, 7995, 8208, 8422, 8637, 8852, 9068, 9285, 9503, 9721, 9940, 10160, 10381, 10603, 10825, 11049, 11273, 11498, 11725, 11952, 12180, 12410, 12640, 12872, 13104, 13338, 13573, 13809, 14046, 14285, 14525, 14766, 15009, 15253, 15498, 15745, 15993, 16243, 16494, 16747, 17001, 17257, 17515, 17774, 18035, 18298, 18563, 18829, 19098, 19368, 19640, 19915, 20191, 20470, 20750, 21033, 21318, 21605, 21895, 22187, 22481, 22778, 23078, 23380, 23685, 23992, 24302, 24615, 24931, 25250, 25572, 25897, 26226, 26557, 26892, 27230, 27572, 27917, 28266, 28618, 28975, 29335, 29699, 30067, 30440, 30817, 31198, 31583, 31973, 32368, 32767};
-
   // compute log2_maxh (output_shift)
   avg128U1 = _mm_setzero_si128();
   avg128U2 = _mm_setzero_si128();
@@ -894,83 +800,72 @@ int16_t lte_ul_freq_offset_estimation(LTE_DL_FRAME_PARMS *frame_parms,
     avg128U1 = _mm_add_epi32(avg128U1,_mm_madd_epi16(ul_ch1[0],ul_ch1[0]));
     avg128U1 = _mm_add_epi32(avg128U1,_mm_madd_epi16(ul_ch1[1],ul_ch1[1]));
     avg128U1 = _mm_add_epi32(avg128U1,_mm_madd_epi16(ul_ch1[2],ul_ch1[2]));
-
     avg128U2 = _mm_add_epi32(avg128U2,_mm_madd_epi16(ul_ch2[0],ul_ch2[0]));
     avg128U2 = _mm_add_epi32(avg128U2,_mm_madd_epi16(ul_ch2[1],ul_ch2[1]));
     avg128U2 = _mm_add_epi32(avg128U2,_mm_madd_epi16(ul_ch2[2],ul_ch2[2]));
-
     ul_ch1+=3;
     ul_ch2+=3;
   }
 
-  avg[0] = (((int*)&avg128U1)[0] +
-            ((int*)&avg128U1)[1] +
-            ((int*)&avg128U1)[2] +
-            ((int*)&avg128U1)[3])/(nb_rb*12);
-
-  avg[1] = (((int*)&avg128U2)[0] +
-            ((int*)&avg128U2)[1] +
-            ((int*)&avg128U2)[2] +
-            ((int*)&avg128U2)[3])/(nb_rb*12);
-
+  avg[0] = (((int *)&avg128U1)[0] +
+            ((int *)&avg128U1)[1] +
+            ((int *)&avg128U1)[2] +
+            ((int *)&avg128U1)[3])/(nb_rb*12);
+  avg[1] = (((int *)&avg128U2)[0] +
+            ((int *)&avg128U2)[1] +
+            ((int *)&avg128U2)[2] +
+            ((int *)&avg128U2)[3])/(nb_rb*12);
   //    msg("avg0 = %d, avg1 = %d\n",avg[0],avg[1]);
   avg[0] = cmax(avg[0],avg[1]);
   avg[1] = log2_approx(avg[0]);
   output_shift = cmax(0,avg[1]-10);
   //output_shift  = (log2_approx(avg[0])/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+1;
   //    msg("avg= %d, shift = %d\n",avg[0],output_shift);
-
-  ul_ch1 = (__m128i*)&ul_ch_estimates[pilot_pos1*frame_parms->N_RB_UL*12];
-  ul_ch2 = (__m128i*)&ul_ch_estimates[pilot_pos2*frame_parms->N_RB_UL*12];
+  ul_ch1 = (__m128i *)&ul_ch_estimates[pilot_pos1*frame_parms->N_RB_UL*12];
+  ul_ch2 = (__m128i *)&ul_ch_estimates[pilot_pos2*frame_parms->N_RB_UL*12];
 
   // correlate and average the 2 channel estimates ul_ch1*ul_ch2
   for (rb=0; rb<nb_rb; rb++) {
     mmtmpD0 = _mm_madd_epi16(ul_ch1[0],ul_ch2[0]);
     mmtmpD1 = _mm_shufflelo_epi16(ul_ch1[0],_MM_SHUFFLE(2,3,0,1));
     mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate);
+    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)&conjugate);
     mmtmpD1 = _mm_madd_epi16(mmtmpD1,ul_ch2[0]);
     mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
     mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
     mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1);
     mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1);
     R[0] = _mm_packs_epi32(mmtmpD2,mmtmpD3);
-
     mmtmpD0 = _mm_madd_epi16(ul_ch1[1],ul_ch2[1]);
     mmtmpD1 = _mm_shufflelo_epi16(ul_ch1[1],_MM_SHUFFLE(2,3,0,1));
     mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate);
+    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)&conjugate);
     mmtmpD1 = _mm_madd_epi16(mmtmpD1,ul_ch2[1]);
     mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
     mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
     mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1);
     mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1);
     R[1] = _mm_packs_epi32(mmtmpD2,mmtmpD3);
-
     mmtmpD0 = _mm_madd_epi16(ul_ch1[2],ul_ch2[2]);
     mmtmpD1 = _mm_shufflelo_epi16(ul_ch1[2],_MM_SHUFFLE(2,3,0,1));
     mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate);
+    mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)&conjugate);
     mmtmpD1 = _mm_madd_epi16(mmtmpD1,ul_ch2[2]);
     mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
     mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
     mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1);
     mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1);
     R[2] = _mm_packs_epi32(mmtmpD2,mmtmpD3);
-
     R[0] = _mm_add_epi16(_mm_srai_epi16(R[0],1),_mm_srai_epi16(R[1],1));
     R[0] = _mm_add_epi16(_mm_srai_epi16(R[0],1),_mm_srai_epi16(R[2],1));
-
-    Ravg[0] += (((short*)&R)[0] +
-                ((short*)&R)[2] +
-                ((short*)&R)[4] +
-                ((short*)&R)[6])/(nb_rb*4);
-
-    Ravg[1] += (((short*)&R)[1] +
-                ((short*)&R)[3] +
-                ((short*)&R)[5] +
-                ((short*)&R)[7])/(nb_rb*4);
-
+    Ravg[0] += (((short *)&R)[0] +
+                ((short *)&R)[2] +
+                ((short *)&R)[4] +
+                ((short *)&R)[6])/(nb_rb*4);
+    Ravg[1] += (((short *)&R)[1] +
+                ((short *)&R)[3] +
+                ((short *)&R)[5] +
+                ((short *)&R)[7])/(nb_rb*4);
     ul_ch1+=3;
     ul_ch2+=3;
   }
diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c
index f78da483de8e7a2dc6aca37c07877a48d0d67da1..ad81ceb2fe491056f9fa38a70e2af722fabb8798 100644
--- a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c
+++ b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c
@@ -131,67 +131,53 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
   return(0);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
-                 short amp,
-                 int subframe) 
-{
-
+                            short amp,
+                            int subframe) {
   unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
   unsigned short k=0,a;
   int32_t qpsk[4];
-
   a = (amp*ONE_OVER_SQRT2_Q15)>>15;
   ((short *)&qpsk[0])[0] = a;
   ((short *)&qpsk[0])[1] = a;
-
   ((short *)&qpsk[1])[0] = -a;
   ((short *)&qpsk[1])[1] = a;
   ((short *)&qpsk[2])[0] = a;
   ((short *)&qpsk[2])[1] = -a;
-
   ((short *)&qpsk[3])[0] = -a;
   ((short *)&qpsk[3])[1] = -a;
-
-
   mprime = 3*(110 - eNB->frame_parms.N_RB_DL);
 
-  for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
-  {
-      if ((subframe&0x1)==0) // n_sf mod 2 == 0: even 
-        k = 6*m;
-      else
-        k = 6*m + 3;
-
+  for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
+    if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
+      k = 6*m;
+    else
+      k = 6*m + 3;
 
-      k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
+    k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
+    mprime_dword     = mprime>>4;
+    mprime_qpsk_symb = mprime&0xf;
 
-      mprime_dword     = mprime>>4;
-      mprime_qpsk_symb = mprime&0xf;
+    if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
+      k++;  // skip DC carrier
+      k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
+    }
 
-      if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
-        k++;  // skip DC carrier
-        k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
-      }
-      output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
-      mprime++;
-   }
+    output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
+    mprime++;
+  }
 
   return(0);
 }
 
 
 int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
-                    int *output,
-                    int subframe) 
-{
-
+                               int *output,
+                               int subframe) {
   unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
   unsigned short k=0;
   unsigned int qpsk[4];
-
   // This includes complex conjugate for channel estimation
-
   ((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15;
   ((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15;
   ((short *)&qpsk[1])[0] = -ONE_OVER_SQRT2_Q15;
@@ -200,23 +186,18 @@ int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
   ((short *)&qpsk[2])[1] = ONE_OVER_SQRT2_Q15;
   ((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
   ((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
-
   mprime = 3*(110 - ue->frame_parms.N_RB_DL);
 
-  for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
-  { mprime_dword     = mprime>>4;
+  for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
+    mprime_dword     = mprime>>4;
     mprime_qpsk_symb = mprime&0xf;
-
     // this is r_mprime from 3GPP 36-211 6.10.1.2
     output[k] = qpsk[(ue->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
-
     mprime++;
     k++;
-
   }
 
   return(0);
 }
 
-#endif // MAKE Rel14
 
diff --git a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c
index a260a50dbe9c6558d677a68deab0466fc2b96806..b057f6a40343719a5b85c575889563d15d1842de 100644
--- a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c
+++ b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c
@@ -44,15 +44,12 @@
 
 #include "lte_refsig.h"
 
-void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn)
-{
-
+void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn) {
   unsigned char sfn,l;
   unsigned int n,x1,x2;//,x1tmp,x2tmp;
 
   for (sfn=0; sfn<10; sfn++) {
     for (l=0; l<3; l++) {
-
       if (l==0)
         x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit
       else
@@ -61,26 +58,21 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
       //x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
       //n = 0
       //      printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
-
       // Initializing the Sequence
-
       x1 = 1+ (1<<31);
       x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
       // skip first 50 double words (1600 bits)
       //      printf("n=0 : x1 %x, x2 %x\n",x1,x2);
 
       for (n=1; n<50; n++) {
-
         x1 = (x1>>1) ^ (x1>>4);
         x1 = x1 ^ (x1<<31) ^ (x1<<28);
         x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
         x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
         //  printf("x1 : %x, x2 : %x\n",x1,x2);
-
       }
 
       for (n=0; n<42; n++) {
-
         x1 = (x1>>1) ^ (x1>>4);
         x1 = x1 ^ (x1<<31) ^ (x1<<28);
         x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
@@ -88,15 +80,11 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
         lte_gold_mbsfn_table[sfn][l][n] = x1^x2;
         //  printf("n=%d : c %x\n",n,x1^x2);
       }
-
     }
-
   }
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn){
+void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn) {
   unsigned char sfn;
   unsigned int n,x1,x2;//,x1tmp,x2tmp;
 
@@ -104,12 +92,14 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
     x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
     x1 = 1+ (1<<31);
     x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
+
     for (n=1; n<50; n++) {
       x1 = (x1>>1) ^ (x1>>4);
       x1 = x1 ^ (x1<<31) ^ (x1<<28);
       x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
       x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
     }
+
     for (n=0; n<150; n++) {
       x1 = (x1>>1) ^ (x1>>4);
       x1 = x1 ^ (x1<<31) ^ (x1<<28);
@@ -119,16 +109,12 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
     }
   }
 }
-#endif
 
 
 
 #ifdef LTE_GOLD_MAIN
-main()
-{
-
+main() {
   lte_gold_mbsfn(423,0);
-
 }
 #endif
 
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index e48d726a8e954b2ee7cf90db9530a2b35704e4a0..4d296a78724ad758d36477a2accf28ca7287ad26 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -34,7 +34,7 @@
 #include "PHY/phy_extern.h"
 #include "SCHED/sched_eNB.h"
 #ifdef DEBUG_DCI_TOOLS
-#include "PHY/phy_vars.h"
+  #include "PHY/phy_vars.h"
 #endif
 #include "assertions.h"
 #include "nfapi_interface.h"
@@ -53,44 +53,50 @@
 //#undef LOG_D
 //#define LOG_D(A,B...) printf(B)
 
-int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
-{
+int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
   uint16_t i;
   int16_t first_free_index=-1;
-
   AssertFatal(eNB!=NULL,"eNB is null\n");
+
   for (i=0; i<NUMBER_OF_UE_MAX; i++) {
     AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i);
     AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i);
     LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index);
+
     if ((eNB->dlsch[i][0]->harq_mask >0) &&
         (eNB->dlsch[i][0]->rnti==rnti))       return i;
     else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
   }
+
   if (type == SEARCH_EXIST)
     return -1;
+
   if (first_free_index != -1)
     eNB->dlsch[first_free_index][0]->rnti = 0;
+
   return first_free_index;
 }
 
 
-int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
-{
+int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
   uint16_t i;
   int16_t first_free_index=-1;
-
   AssertFatal(eNB!=NULL,"eNB is null\n");
+
   for (i=0; i<NUMBER_OF_UE_MAX; i++) {
     AssertFatal(eNB->ulsch[i]!=NULL,"eNB->ulsch[%d] is null\n",i);
+
     if ((eNB->ulsch[i]->harq_mask >0) &&
         (eNB->ulsch[i]->rnti==rnti))       return i;
     else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
   }
+
   if (type == SEARCH_EXIST)
     return -1;
+
   if (first_free_index != -1)
     eNB->ulsch[first_free_index]->rnti = 0;
+
   return first_free_index;
 }
 
@@ -98,271 +104,22 @@ int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
 
 
 
-void fill_pdcch_order(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,nfapi_dl_config_dci_dl_pdu *pdu)
-{
+void fill_pdcch_order(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,nfapi_dl_config_dci_dl_pdu *pdu) {
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   uint8_t        *dci_pdu = &dci_alloc->dci_pdu[0];
   nfapi_dl_config_dci_dl_pdu_rel8_t *rel8 = &pdu->dci_dl_pdu_rel8;
-
   dci_alloc->firstCCE = rel8->cce_idx;
   dci_alloc->L = rel8->aggregation_level;
   dci_alloc->rnti = rel8->rnti;
   dci_alloc->harq_pid = rel8->harq_process;
   dci_alloc->ra_flag = 0;
   dci_alloc->format = format1A;
-
   LOG_D (PHY, "NFAPI: DCI format %d, nCCE %d, L %d, rnti %x,harq_pid %d\n", rel8->dci_format, rel8->cce_idx, rel8->aggregation_level, rel8->rnti, rel8->harq_process);
 
   switch (fp->N_RB_DL) {
-  case 6:
-    if (fp->frame_type == TDD) {
-
-      dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_TDD_1_6_t;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->type     = 1;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs      = rel8->mcs_1;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC      = rel8->tpc;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid = rel8->harq_process;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-      ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->padding  = 0;
-    } else {
-      dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_FDD_t;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->type         = 1;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->vrb_type     = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->mcs          = rel8->mcs_1;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->ndi          = rel8->new_data_indicator_1;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rv           = rel8->redundancy_version_1;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
-      ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->padding      = 0;
-
-      //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    }
-    break;
-  case 25:
-    if (fp->frame_type == TDD) {
-
-      dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_TDD_1_6_t;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->type       = 1;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type   = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->mcs        = rel8->mcs_1;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->ndi        = rel8->new_data_indicator_1;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rballoc    = rel8->resource_block_coding;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rv         = rel8->redundancy_version_1;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->TPC        = rel8->tpc;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid   = rel8->harq_process;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->dai        = rel8->downlink_assignment_index;
-      ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->padding    = 0;
-       //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    } else {
-      dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_FDD_t;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->type           = 1;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->vrb_type       = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->mcs            = rel8->mcs_1;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->ndi            = rel8->new_data_indicator_1;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->rballoc        = rel8->resource_block_coding;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->rv             = rel8->redundancy_version_1;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->TPC            = rel8->tpc;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->harq_pid       = rel8->harq_process;
-      ((DCI1A_5MHz_FDD_t *)dci_pdu)->padding        = 0;
-      //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    }
-    break;
-  case 50:
-    if (fp->frame_type == TDD) {
-
-      dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_TDD_1_6_t;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->TPC       = rel8->tpc;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-      ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
-      //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    } else {
-      dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_FDD_t;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->type          = 1;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
-      ((DCI1A_10MHz_FDD_t *)dci_pdu)->padding       = 0;
-
-      //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    }
-    break;
-  case 100:
-    if (fp->frame_type == TDD) {
-
-      dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_TDD_1_6_t;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->TPC       = rel8->tpc;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-      ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
-      //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    } else {
-      dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_FDD_t;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->type          = 1;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
-      ((DCI1A_20MHz_FDD_t *)dci_pdu)->padding       = 0;
-      //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-    }
-    break;
-  }
-
-
-  LOG_T(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
-        proc->frame_tx, proc->subframe_tx, rel8->rnti);
-}
-
-void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
-		                int frame,
-						int subframe,
-						L1_rxtx_proc_t *proc,
-						DCI_ALLOC_t *dci_alloc,
-						nfapi_dl_config_dci_dl_pdu *pdu)
-{
-  LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
-  uint8_t        *dci_pdu = &dci_alloc->dci_pdu[0];
-  nfapi_dl_config_dci_dl_pdu_rel8_t *rel8 = &pdu->dci_dl_pdu_rel8;
-
-  /* check if this is a DCI 1A PDCCH order for RAPROC */
-  if (rel8->dci_format == NFAPI_DL_DCI_FORMAT_1A && rel8->rnti_type == 1) {
-    int             full_rb;
-    switch (fp->N_RB_DL) {
-    case 6:
-      full_rb = 63;
-      break;
-    case 25:
-      full_rb = 511;
-      break;
-    case 50:
-      full_rb = 2047;
-      break;
-    case 100:
-      full_rb = 8191;
-      break;
-    default:
-      abort ();
-    }
-    if (rel8->resource_block_coding == full_rb)
-      return fill_pdcch_order (eNB, proc, dci_alloc, pdu);
-  }
-
-
-  LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
-  LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
-  int beamforming_mode = 0;
-  int UE_id=-1;
-  int NPRB;
-  int TB0_active;
-  int TB1_active;
-  uint16_t DL_pmi_single=0; // This should be taken from DLSCH parameters for PUSCH precoding
-  uint8_t I_mcs = 0;
- 
-
-  dci_alloc->firstCCE = rel8->cce_idx;
-  dci_alloc->L = rel8->aggregation_level;
-  dci_alloc->rnti = rel8->rnti;
-  dci_alloc->harq_pid = rel8->harq_process;
-  dci_alloc->ra_flag = 0;
-
-
-  LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:[SFN/SF:%04d%d] DCI format %d, nCCE %d, L %d, rnti %x, harq_pid %d\n",
-	frame,subframe,proc->frame_tx,proc->subframe_tx,rel8->dci_format,rel8->cce_idx,rel8->aggregation_level,rel8->rnti,rel8->harq_process);
-  if ((rel8->rnti_type == 2 ) && (rel8->rnti != SI_RNTI) && (rel8->rnti != P_RNTI)) dci_alloc->ra_flag = 1;
-
-  UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
-  if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ){
-    LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id);
-    return;
-  }
-  //AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
-  //AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
-  dlsch0 = eNB->dlsch[UE_id][0];
-  dlsch1 = eNB->dlsch[UE_id][1];
-
-  dlsch0->ue_type = 0;
-  dlsch1->ue_type = 0; 
-  beamforming_mode                          = eNB->transmission_mode[(uint8_t)UE_id]<7?0:eNB->transmission_mode[(uint8_t)UE_id];
-  dlsch0_harq                               = dlsch0->harq_processes[rel8->harq_process];
-  dlsch0_harq->codeword                     = 0;
-  dlsch1_harq                               = dlsch1->harq_processes[rel8->harq_process];
-  dlsch1_harq->codeword                     = 1;
-  dlsch0->subframe_tx[subframe]             = 1;
-
-  LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d dlsch0[rnti:%x harq_mask:%04x] dci_pdu[rnti:%x rnti_type:%d harq_process:%d ndi1:%d] dlsch0_harq[round:%d harq_mask:%x ndi:%d]\n", 
-      frame,subframe,
-      proc->frame_tx,proc->subframe_tx,
-      dlsch0->rnti,dlsch0->harq_mask,
-      rel8->rnti, rel8->rnti_type, rel8->harq_process, rel8->new_data_indicator_1,
-      dlsch0_harq->round, dlsch0->harq_mask, dlsch0_harq->ndi);
-
-  if (dlsch0->rnti != rel8->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
-    dlsch0_harq->round=0;
-    dlsch0->harq_mask=0;
-  }
-  if ((dlsch0->harq_mask & (1 << rel8->harq_process)) > 0) {
-    if (rel8->new_data_indicator_1 != dlsch0_harq->ndi)
-      dlsch0_harq->round = 0;
-  } else {                      // process is inactive, so activate and set round to 0
-    dlsch0_harq->round = 0;
-  }
-  dlsch0_harq->ndi = rel8->new_data_indicator_1;
-
-
-#ifdef PHY_TX_THREAD
-  dlsch0->active[subframe]        = 1;
-#else
-  dlsch0->active        = 1;
-#endif
-  if (rel8->rnti_type == 2)
-      dlsch0_harq->round    = 0;
-
-  LOG_D(PHY,"NFAPI: rel8[rnti %x dci_format %d harq_process %d ndi1 %d rnti type %d] dlsch0[rnti %x harq_mask %x] dlsch0_harq[round %d ndi %d]\n",
-      rel8->rnti,rel8->dci_format,rel8->harq_process, rel8->new_data_indicator_1, rel8->rnti_type,
-      dlsch0->rnti,dlsch0->harq_mask,
-      dlsch0_harq->round,dlsch0_harq->ndi
-      );
-
-  switch (rel8->dci_format) {
-
-  case NFAPI_DL_DCI_FORMAT_1A:
-
-    AssertFatal(rel8->resource_block_coding < 8192, "SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: rel8->resource_block_coding (%p) %u >= 8192 (rnti %x, rnti_type %d, format %d, harq_id %d\n",
-                frame,subframe,proc->frame_tx,subframe,
-                &rel8->resource_block_coding,rel8->resource_block_coding,rel8->rnti,rel8->rnti_type,rel8->dci_format,rel8->harq_process);
-  
-    dci_alloc->format = format1A;
-
-    switch (fp->N_RB_DL) {
     case 6:
       if (fp->frame_type == TDD) {
-
-	dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_TDD_1_6_t; 
+        dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_TDD_1_6_t;
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->type     = 1;
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs      = rel8->mcs_1;
@@ -373,10 +130,9 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid = rel8->harq_process;
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
         ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->padding  = 0;
-	
       } else {
-	dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_FDD_t; 
-	((DCI1A_1_5MHz_FDD_t *)dci_pdu)->type         = 1;
+        dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_FDD_t;
+        ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->type         = 1;
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->vrb_type     = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->mcs          = rel8->mcs_1;
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->ndi          = rel8->new_data_indicator_1;
@@ -385,17 +141,14 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
         ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->padding      = 0;
-
         //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       }
-      AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
-      dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rel8->resource_block_coding];
-      dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
-      dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rel8->resource_block_coding]; //NPRB;
+
       break;
+
     case 25:
       if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_TDD_1_6_t; 
+        dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_TDD_1_6_t;
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->type       = 1;
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type   = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->mcs        = rel8->mcs_1;
@@ -406,10 +159,10 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid   = rel8->harq_process;
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->dai        = rel8->downlink_assignment_index;
         ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->padding    = 0;
-         //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+        //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       } else {
-	dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_FDD_t; 
-	((DCI1A_5MHz_FDD_t *)dci_pdu)->type           = 1;
+        dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_FDD_t;
+        ((DCI1A_5MHz_FDD_t *)dci_pdu)->type           = 1;
         ((DCI1A_5MHz_FDD_t *)dci_pdu)->vrb_type       = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_5MHz_FDD_t *)dci_pdu)->mcs            = rel8->mcs_1;
         ((DCI1A_5MHz_FDD_t *)dci_pdu)->ndi            = rel8->new_data_indicator_1;
@@ -420,15 +173,12 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_5MHz_FDD_t *)dci_pdu)->padding        = 0;
         //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       }
-      AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
-      dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rel8->resource_block_coding];
-      dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
-      dlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rel8->resource_block_coding];        //NPRB;
+
       break;
+
     case 50:
       if (fp->frame_type == TDD) {
-
-	dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_TDD_1_6_t; 
+        dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_TDD_1_6_t;
         ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
         ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
@@ -441,8 +191,8 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
         //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       } else {
-	dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_FDD_t; 
-	((DCI1A_10MHz_FDD_t *)dci_pdu)->type          = 1;
+        dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_FDD_t;
+        ((DCI1A_10MHz_FDD_t *)dci_pdu)->type          = 1;
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
@@ -451,18 +201,14 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
         ((DCI1A_10MHz_FDD_t *)dci_pdu)->padding       = 0;
-	//      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+        //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       }
-      AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
-      dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rel8->resource_block_coding];
-      dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rel8->resource_block_coding];
-      dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
-      dlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rel8->resource_block_coding];        //NPRB;
+
       break;
+
     case 100:
       if (fp->frame_type == TDD) {
-
-	dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_TDD_1_6_t; 
+        dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_TDD_1_6_t;
         ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
         ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
@@ -475,8 +221,8 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
         //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       } else {
-	dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_FDD_t; 
-	((DCI1A_20MHz_FDD_t *)dci_pdu)->type          = 1;
+        dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_FDD_t;
+        ((DCI1A_20MHz_FDD_t *)dci_pdu)->type          = 1;
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
@@ -485,997 +231,1259 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
         ((DCI1A_20MHz_FDD_t *)dci_pdu)->padding       = 0;
-	//      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+        //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
       }
-      AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
-      dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rel8->resource_block_coding];
-      dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rel8->resource_block_coding];
-      dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rel8->resource_block_coding];
-      dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rel8->resource_block_coding];
-      dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
-      dlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rel8->resource_block_coding];       //NPRB;
+
       break;
-    }
+  }
 
-    if (rel8->rnti_type == 2) {
-      // see 36-212 V8.6.0 p. 45
-      NPRB = (rel8->tpc & 1) + 2;
-      // 36-213 sec.7.1.7.2 p.26
+  LOG_T(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
+        proc->frame_tx, proc->subframe_tx, rel8->rnti);
+}
 
-      I_mcs     = rel8->mcs_1;
-    }
-    else {
-      NPRB      = dlsch0_harq->nb_rb;
-      I_mcs     = get_I_TBS(rel8->mcs_1);
+void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
+                        int frame,
+                        int subframe,
+                        L1_rxtx_proc_t *proc,
+                        DCI_ALLOC_t *dci_alloc,
+                        nfapi_dl_config_dci_dl_pdu *pdu) {
+  LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
+  uint8_t        *dci_pdu = &dci_alloc->dci_pdu[0];
+  nfapi_dl_config_dci_dl_pdu_rel8_t *rel8 = &pdu->dci_dl_pdu_rel8;
+
+  /* check if this is a DCI 1A PDCCH order for RAPROC */
+  if (rel8->dci_format == NFAPI_DL_DCI_FORMAT_1A && rel8->rnti_type == 1) {
+    int             full_rb;
+
+    switch (fp->N_RB_DL) {
+      case 6:
+        full_rb = 63;
+        break;
+
+      case 25:
+        full_rb = 511;
+        break;
+
+      case 50:
+        full_rb = 2047;
+        break;
+
+      case 100:
+        full_rb = 8191;
+        break;
+
+      default:
+        abort ();
     }
-    AssertFatal(NPRB>0,"DCI 1A: NPRB = 0 (rnti %x, rnti type %d, tpc %d, round %d, resource_block_coding %d, harq process %d)\n",rel8->rnti,rel8->rnti_type,rel8->tpc,dlsch0_harq->round,rel8->resource_block_coding,rel8->harq_process);
-    dlsch0_harq->rvidx         = rel8->redundancy_version_1;
-    dlsch0_harq->Nl            = 1;
-    dlsch0_harq->mimo_mode     = (fp->nb_antenna_ports_eNB == 1) ? SISO : ALAMOUTI;
-    dlsch0_harq->dl_power_off  = 1;
-    
-    
-
-    dlsch0_harq->mcs             = rel8->mcs_1;
-    dlsch0_harq->Qm              = 2;
-    dlsch0_harq->TBS             = TBStable[I_mcs][NPRB-1];
-    dlsch0->harq_ids[frame%2][subframe]   = rel8->harq_process;
-#ifdef PHY_TX_THREAD
-    dlsch0->active[subframe]     = 1;
-#else
-    dlsch0->active               = 1;
-#endif
-    dlsch0->rnti                 = rel8->rnti;
-    //dlsch0->harq_ids[subframe]   = rel8->harq_process;
 
-    if (dlsch0_harq->round == 0)
-      dlsch0_harq->status = ACTIVE;
+    if (rel8->resource_block_coding == full_rb)
+      return fill_pdcch_order (eNB, proc, dci_alloc, pdu);
+  }
 
-    dlsch0->harq_mask |= (1 << rel8->harq_process);
+  LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
+  LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
+  int beamforming_mode = 0;
+  int UE_id=-1;
+  int NPRB;
+  int TB0_active;
+  int TB1_active;
+  uint16_t DL_pmi_single=0; // This should be taken from DLSCH parameters for PUSCH precoding
+  uint8_t I_mcs = 0;
+  dci_alloc->firstCCE = rel8->cce_idx;
+  dci_alloc->L = rel8->aggregation_level;
+  dci_alloc->rnti = rel8->rnti;
+  dci_alloc->harq_pid = rel8->harq_process;
+  dci_alloc->ra_flag = 0;
+  LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:[SFN/SF:%04d%d] DCI format %d, nCCE %d, L %d, rnti %x, harq_pid %d\n",
+        frame,subframe,proc->frame_tx,proc->subframe_tx,rel8->dci_format,rel8->cce_idx,rel8->aggregation_level,rel8->rnti,rel8->harq_process);
+
+  if ((rel8->rnti_type == 2 ) && (rel8->rnti != SI_RNTI) && (rel8->rnti != P_RNTI)) dci_alloc->ra_flag = 1;
+
+  UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
+
+  if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ) {
+    LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id);
+    return;
+  }
+
+  //AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
+  //AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
+  dlsch0 = eNB->dlsch[UE_id][0];
+  dlsch1 = eNB->dlsch[UE_id][1];
+  dlsch0->ue_type = 0;
+  dlsch1->ue_type = 0;
+  beamforming_mode                          = eNB->transmission_mode[(uint8_t)UE_id]<7?0:eNB->transmission_mode[(uint8_t)UE_id];
+  dlsch0_harq                               = dlsch0->harq_processes[rel8->harq_process];
+  dlsch0_harq->codeword                     = 0;
+  dlsch1_harq                               = dlsch1->harq_processes[rel8->harq_process];
+  dlsch1_harq->codeword                     = 1;
+  dlsch0->subframe_tx[subframe]             = 1;
+  LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d dlsch0[rnti:%x harq_mask:%04x] dci_pdu[rnti:%x rnti_type:%d harq_process:%d ndi1:%d] dlsch0_harq[round:%d harq_mask:%x ndi:%d]\n",
+        frame,subframe,
+        proc->frame_tx,proc->subframe_tx,
+        dlsch0->rnti,dlsch0->harq_mask,
+        rel8->rnti, rel8->rnti_type, rel8->harq_process, rel8->new_data_indicator_1,
+        dlsch0_harq->round, dlsch0->harq_mask, dlsch0_harq->ndi);
 
-    if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding,rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
+  if (dlsch0->rnti != rel8->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
+    dlsch0_harq->round=0;
+    dlsch0->harq_mask=0;
+  }
 
-    break;
-  case NFAPI_DL_DCI_FORMAT_1:
+  if ((dlsch0->harq_mask & (1 << rel8->harq_process)) > 0) {
+    if (rel8->new_data_indicator_1 != dlsch0_harq->ndi)
+      dlsch0_harq->round = 0;
+  } else {                      // process is inactive, so activate and set round to 0
+    dlsch0_harq->round = 0;
+  }
 
-    dci_alloc->format           = format1;
+  dlsch0_harq->ndi = rel8->new_data_indicator_1;
 #ifdef PHY_TX_THREAD
-    dlsch0->active[subframe]    = 1;
+  dlsch0->active[subframe]        = 1;
 #else
-    dlsch0->active              = 1;
+  dlsch0->active        = 1;
 #endif
 
-    LOG_D(PHY,"SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: Programming DLSCH for Format 1 DCI, harq_pid %d\n",frame,subframe,proc->frame_tx,subframe,rel8->harq_process);
+  if (rel8->rnti_type == 2)
+    dlsch0_harq->round    = 0;
 
-    switch (fp->N_RB_DL) {
-    case 6:
-      if (fp->frame_type == TDD) {
+  LOG_D(PHY,"NFAPI: rel8[rnti %x dci_format %d harq_process %d ndi1 %d rnti type %d] dlsch0[rnti %x harq_mask %x] dlsch0_harq[round %d ndi %d]\n",
+        rel8->rnti,rel8->dci_format,rel8->harq_process, rel8->new_data_indicator_1, rel8->rnti_type,
+        dlsch0->rnti,dlsch0->harq_mask,
+        dlsch0_harq->round,dlsch0_harq->ndi
+       );
 
-	dci_alloc->dci_length                     = sizeof_DCI1_1_5MHz_TDD_t; 
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->mcs       = rel8->mcs_1;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-        ((DCI1_1_5MHz_TDD_t *)dci_pdu)->padding   = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                         = sizeof_DCI1_1_5MHz_FDD_t; 
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
-        ((DCI1_1_5MHz_FDD_t *)dci_pdu)->padding       = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      }
-      break;
-    case 25:
-      if (fp->frame_type == TDD) {
+  switch (rel8->dci_format) {
+    case NFAPI_DL_DCI_FORMAT_1A:
+      AssertFatal(rel8->resource_block_coding < 8192, "SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: rel8->resource_block_coding (%p) %u >= 8192 (rnti %x, rnti_type %d, format %d, harq_id %d\n",
+                  frame,subframe,proc->frame_tx,subframe,
+                  &rel8->resource_block_coding,rel8->resource_block_coding,rel8->rnti,rel8->rnti_type,rel8->dci_format,rel8->harq_process);
+      dci_alloc->format = format1A;
 
-	dci_alloc->dci_length                      = sizeof_DCI1_5MHz_TDD_t; 
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        ((DCI1_5MHz_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                  = sizeof_DCI1_5MHz_FDD_t; 
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_5MHz_FDD_t *)dci_pdu)->padding  = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      }
-      break;
-    case 50:
-      if (fp->frame_type == TDD) {
+      switch (fp->N_RB_DL) {
+        case 6:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_TDD_1_6_t;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->type     = 1;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->padding  = 0;
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI1A_1_5MHz_FDD_t;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->type         = 1;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->vrb_type     = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->mcs          = rel8->mcs_1;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->ndi          = rel8->new_data_indicator_1;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rv           = rel8->redundancy_version_1;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
+            ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->padding      = 0;
+            //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-	dci_alloc->dci_length                       = sizeof_DCI1_10MHz_TDD_t; 
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        ((DCI1_10MHz_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                   = sizeof_DCI1_10MHz_FDD_t; 
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_10MHz_FDD_t *)dci_pdu)->padding  = 0;
-      }
-      break;
-    case 100:
-      if (fp->frame_type == TDD) {
+          AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
+          dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rel8->resource_block_coding];
+          dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
+          dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rel8->resource_block_coding]; //NPRB;
+          break;
 
-	dci_alloc->dci_length                       = sizeof_DCI1_20MHz_TDD_t; 
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        ((DCI1_20MHz_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                   = sizeof_DCI1_20MHz_FDD_t; 
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-        ((DCI1_20MHz_FDD_t *)dci_pdu)->padding  = 0;
-      }
-      break;
-    }
+        case 25:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_TDD_1_6_t;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->type       = 1;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type   = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->mcs        = rel8->mcs_1;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->ndi        = rel8->new_data_indicator_1;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rballoc    = rel8->resource_block_coding;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rv         = rel8->redundancy_version_1;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->TPC        = rel8->tpc;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid   = rel8->harq_process;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->dai        = rel8->downlink_assignment_index;
+            ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->padding    = 0;
+            //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI1A_5MHz_FDD_t;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->type           = 1;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->vrb_type       = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->mcs            = rel8->mcs_1;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->ndi            = rel8->new_data_indicator_1;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->rballoc        = rel8->resource_block_coding;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->rv             = rel8->redundancy_version_1;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->TPC            = rel8->tpc;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->harq_pid       = rel8->harq_process;
+            ((DCI1A_5MHz_FDD_t *)dci_pdu)->padding        = 0;
+            //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    AssertFatal (rel8->harq_process < 8, "Format 1: harq_pid=%d >= 8\n", rel8->harq_process);
+          AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
+          dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rel8->resource_block_coding];
+          dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
+          dlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rel8->resource_block_coding];        //NPRB;
+          break;
 
+        case 50:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_TDD_1_6_t;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI1A_10MHz_FDD_t;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->type          = 1;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
+            ((DCI1A_10MHz_FDD_t *)dci_pdu)->padding       = 0;
+            //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
-    dlsch0_harq->codeword = 0;
+          AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
+          dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rel8->resource_block_coding];
+          dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rel8->resource_block_coding];
+          dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
+          dlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rel8->resource_block_coding];        //NPRB;
+          break;
 
-    // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
-    dlsch0->subframe_tx[subframe] = 1;
+        case 100:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_TDD_1_6_t;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->type      = 1;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->vrb_type  = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->mcs       = rel8->mcs_1;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI1A_20MHz_FDD_t;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->type          = 1;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->vrb_type      = rel8->virtual_resource_block_assignment_flag;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->ndi           = rel8->new_data_indicator_1;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
+            ((DCI1A_20MHz_FDD_t *)dci_pdu)->padding       = 0;
+            //      printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+          AssertFatal (rel8->virtual_resource_block_assignment_flag == LOCALIZED, "Distributed RB allocation not done yet\n");
+          dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rel8->resource_block_coding];
+          dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rel8->resource_block_coding];
+          dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rel8->resource_block_coding];
+          dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rel8->resource_block_coding];
+          dlsch0_harq->vrb_type = rel8->virtual_resource_block_assignment_flag;
+          dlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rel8->resource_block_coding];       //NPRB;
+          break;
+      }
 
-    dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
+      if (rel8->rnti_type == 2) {
+        // see 36-212 V8.6.0 p. 45
+        NPRB = (rel8->tpc & 1) + 2;
+        // 36-213 sec.7.1.7.2 p.26
+        I_mcs     = rel8->mcs_1;
+      } else {
+        NPRB      = dlsch0_harq->nb_rb;
+        I_mcs     = get_I_TBS(rel8->mcs_1);
+      }
 
-    NPRB = dlsch0_harq->nb_rb;
+      AssertFatal(NPRB>0,"DCI 1A: NPRB = 0 (rnti %x, rnti type %d, tpc %d, round %d, resource_block_coding %d, harq process %d)\n",rel8->rnti,rel8->rnti_type,rel8->tpc,dlsch0_harq->round,
+                  rel8->resource_block_coding,rel8->harq_process);
+      dlsch0_harq->rvidx         = rel8->redundancy_version_1;
+      dlsch0_harq->Nl            = 1;
+      dlsch0_harq->mimo_mode     = (fp->nb_antenna_ports_eNB == 1) ? SISO : ALAMOUTI;
+      dlsch0_harq->dl_power_off  = 1;
+      dlsch0_harq->mcs             = rel8->mcs_1;
+      dlsch0_harq->Qm              = 2;
+      dlsch0_harq->TBS             = TBStable[I_mcs][NPRB-1];
+      dlsch0->harq_ids[frame%2][subframe]   = rel8->harq_process;
+#ifdef PHY_TX_THREAD
+      dlsch0->active[subframe]     = 1;
+#else
+      dlsch0->active               = 1;
+#endif
+      dlsch0->rnti                 = rel8->rnti;
 
+      //dlsch0->harq_ids[subframe]   = rel8->harq_process;
 
-    AssertFatal (NPRB > 0, "NPRB == 0\n");
+      if (dlsch0_harq->round == 0)
+        dlsch0_harq->status = ACTIVE;
 
-    dlsch0_harq->rvidx = rel8->redundancy_version_1;
+      dlsch0->harq_mask |= (1 << rel8->harq_process);
 
-    dlsch0_harq->Nl = 1;
-    //    dlsch[0]->layer_index = 0;
-    if (beamforming_mode == 0)
-      dlsch0_harq->mimo_mode = (fp->nb_antenna_ports_eNB == 1) ? SISO : ALAMOUTI;
-    else if (beamforming_mode == 7)
-      dlsch0_harq->mimo_mode = TM7;
-    else
-      LOG_E (PHY, "Invalid beamforming mode %dL\n", beamforming_mode);
+      if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding,
+                                        rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
 
-    dlsch0_harq->dl_power_off = 1;
+      break;
 
+    case NFAPI_DL_DCI_FORMAT_1:
+      dci_alloc->format           = format1;
 #ifdef PHY_TX_THREAD
-    dlsch0->active[subframe] = 1;
+      dlsch0->active[subframe]    = 1;
 #else
-    dlsch0->active = 1;
+      dlsch0->active              = 1;
 #endif
+      LOG_D(PHY,"SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: Programming DLSCH for Format 1 DCI, harq_pid %d\n",frame,subframe,proc->frame_tx,subframe,rel8->harq_process);
 
+      switch (fp->N_RB_DL) {
+        case 6:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                     = sizeof_DCI1_1_5MHz_TDD_t;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->mcs       = rel8->mcs_1;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rv        = rel8->redundancy_version_1;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI1_1_5MHz_TDD_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI1_1_5MHz_FDD_t;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->mcs           = rel8->mcs_1;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->ndi       = rel8->new_data_indicator_1;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rv            = rel8->redundancy_version_1;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
+            ((DCI1_1_5MHz_FDD_t *)dci_pdu)->padding       = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
+          break;
 
-    if (dlsch0_harq->round == 0) {
-      dlsch0_harq->status = ACTIVE;
-
-      //            printf("Setting DLSCH process %d to ACTIVE\n",rel8->harq_process);
-      // MCS and TBS don't change across HARQ rounds
-      dlsch0_harq->mcs = rel8->mcs_1;
-      dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
-      dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][NPRB - 1];
+        case 25:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                      = sizeof_DCI1_5MHz_TDD_t;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI1_5MHz_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                  = sizeof_DCI1_5MHz_FDD_t;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_5MHz_FDD_t *)dci_pdu)->padding  = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    }
+          break;
 
+        case 50:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                       = sizeof_DCI1_10MHz_TDD_t;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI1_10MHz_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                   = sizeof_DCI1_10MHz_FDD_t;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_10MHz_FDD_t *)dci_pdu)->padding  = 0;
+          }
 
-    LOG_D(PHY,"DCI: Set harq_ids[%d] to %d (%p)\n",subframe,rel8->harq_process,dlsch0);
-    dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
+          break;
 
-    dlsch0->harq_mask |= (1 << rel8->harq_process);
+        case 100:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                       = sizeof_DCI1_20MHz_TDD_t;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI1_20MHz_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                   = sizeof_DCI1_20MHz_FDD_t;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->mcs      = rel8->mcs_1;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->ndi      = rel8->new_data_indicator_1;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->rv       = rel8->redundancy_version_1;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI1_20MHz_FDD_t *)dci_pdu)->padding  = 0;
+          }
 
+          break;
+      }
 
-    dlsch0->rnti = rel8->rnti;
+      AssertFatal (rel8->harq_process < 8, "Format 1: harq_pid=%d >= 8\n", rel8->harq_process);
+      dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
+      dlsch0_harq->codeword = 0;
+      // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
+      dlsch0->subframe_tx[subframe] = 1;
+      conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+      dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
+      NPRB = dlsch0_harq->nb_rb;
+      AssertFatal (NPRB > 0, "NPRB == 0\n");
+      dlsch0_harq->rvidx = rel8->redundancy_version_1;
+      dlsch0_harq->Nl = 1;
 
+      //    dlsch[0]->layer_index = 0;
+      if (beamforming_mode == 0)
+        dlsch0_harq->mimo_mode = (fp->nb_antenna_ports_eNB == 1) ? SISO : ALAMOUTI;
+      else if (beamforming_mode == 7)
+        dlsch0_harq->mimo_mode = TM7;
+      else
+        LOG_E (PHY, "Invalid beamforming mode %dL\n", beamforming_mode);
 
-    break;
-  case NFAPI_DL_DCI_FORMAT_2A:
+      dlsch0_harq->dl_power_off = 1;
+#ifdef PHY_TX_THREAD
+      dlsch0->active[subframe] = 1;
+#else
+      dlsch0->active = 1;
+#endif
 
-    dci_alloc->format = format2A;
-    switch (fp->N_RB_DL) {
-    case 6:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                         = sizeof_DCI2A_1_5MHz_2A_TDD_t; 
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-	((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        /* there is no padding in this structure, it is exactly 32 bits */
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                         = sizeof_DCI2A_1_5MHz_2A_FDD_t; 
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
-        ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
-	((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
-	((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->padding      = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+      if (dlsch0_harq->round == 0) {
+        dlsch0_harq->status = ACTIVE;
+        //            printf("Setting DLSCH process %d to ACTIVE\n",rel8->harq_process);
+        // MCS and TBS don't change across HARQ rounds
+        dlsch0_harq->mcs = rel8->mcs_1;
+        dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
+        dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][NPRB - 1];
       }
-      break;
-    case 25:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2A_5MHz_2A_TDD_t; 
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-        ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                           = sizeof_DCI2A_5MHz_2A_FDD_t; 
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs1          = rel8->mcs_1;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs2          = rel8->mcs_2;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi1          = rel8->new_data_indicator_1;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi2          = rel8->new_data_indicator_2;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv1           = rel8->redundancy_version_1;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv2           = rel8->redundancy_version_2;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
-        ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
-	((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->tb_swap       = rel8->transport_block_to_codeword_swap_flag;	
-	((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->padding       = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      }
-      break;
-    case 50:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2A_10MHz_2A_TDD_t; 
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-	((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                        = sizeof_DCI2A_10MHz_2A_FDD_t; 
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
-	((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->padding   = 0;
-      }
-      break;
-    case 100:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2A_20MHz_2A_TDD_t; 
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-        ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                           = sizeof_DCI2A_20MHz_2A_FDD_t; 
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
-        ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
-	((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
-	((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->padding      = 0;
-      }
-      break;
 
-    }
+      LOG_D(PHY,"DCI: Set harq_ids[%d] to %d (%p)\n",subframe,rel8->harq_process,dlsch0);
+      dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
+      dlsch0->harq_mask |= (1 << rel8->harq_process);
+      dlsch0->rnti = rel8->rnti;
+      break;
 
-    AssertFatal (rel8->harq_process < 8, "Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process);
+    case NFAPI_DL_DCI_FORMAT_2A:
+      dci_alloc->format = format2A;
 
+      switch (fp->N_RB_DL) {
+        case 6:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                         = sizeof_DCI2A_1_5MHz_2A_TDD_t;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            /* there is no padding in this structure, it is exactly 32 bits */
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI2A_1_5MHz_2A_FDD_t;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->padding      = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0
-    // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated
+          break;
 
-    // This must be set as in TM4, does not work properly now.
-    if (rel8->transport_block_to_codeword_swap_flag == 1) {
-      dlsch0 = eNB->dlsch[UE_id][1];
-      dlsch1 = eNB->dlsch[UE_id][0];
-    }
+        case 25:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2A_5MHz_2A_TDD_t;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                           = sizeof_DCI2A_5MHz_2A_FDD_t;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs1          = rel8->mcs_1;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs2          = rel8->mcs_2;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi1          = rel8->new_data_indicator_1;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi2          = rel8->new_data_indicator_2;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv1           = rel8->redundancy_version_1;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv2           = rel8->redundancy_version_2;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->tb_swap       = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->padding       = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
-    dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
+          break;
 
-    dlsch0->subframe_tx[subframe] = 1;
+        case 50:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2A_10MHz_2A_TDD_t;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                        = sizeof_DCI2A_10MHz_2A_FDD_t;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->padding   = 0;
+          }
 
-    dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
-    dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
-    //    printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe);
+          break;
 
+        case 100:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2A_20MHz_2A_TDD_t;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                           = sizeof_DCI2A_20MHz_2A_FDD_t;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
+            ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->padding      = 0;
+          }
 
-    conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+          break;
+      }
 
-    dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
-    dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
-    dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
+      AssertFatal (rel8->harq_process < 8, "Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process);
 
-    AssertFatal (dlsch0_harq->nb_rb > 0, "nb_rb=0\n");
+      // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0
+      // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated
 
-    dlsch0_harq->mcs = rel8->mcs_1;
-    dlsch1_harq->mcs = rel8->mcs_2;
-    dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
-    dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
-    dlsch0_harq->rvidx = rel8->redundancy_version_1;
-    dlsch1_harq->rvidx = rel8->redundancy_version_2;
+      // This must be set as in TM4, does not work properly now.
+      if (rel8->transport_block_to_codeword_swap_flag == 1) {
+        dlsch0 = eNB->dlsch[UE_id][1];
+        dlsch1 = eNB->dlsch[UE_id][0];
+      }
 
-    // assume both TBs are active
-    dlsch0_harq->Nl        = 1;
-    dlsch1_harq->Nl        = 1;
+      dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
+      dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
+      dlsch0->subframe_tx[subframe] = 1;
+      dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
+      dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
+      //    printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe);
+      conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+      dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
+      dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
+      dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
+      AssertFatal (dlsch0_harq->nb_rb > 0, "nb_rb=0\n");
+      dlsch0_harq->mcs = rel8->mcs_1;
+      dlsch1_harq->mcs = rel8->mcs_2;
+      dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
+      dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
+      dlsch0_harq->rvidx = rel8->redundancy_version_1;
+      dlsch1_harq->rvidx = rel8->redundancy_version_2;
+      // assume both TBs are active
+      dlsch0_harq->Nl        = 1;
+      dlsch1_harq->Nl        = 1;
 #ifdef PHY_TX_THREAD
-    dlsch0->active[subframe] = 1;
-    dlsch1->active[subframe] = 1;
+      dlsch0->active[subframe] = 1;
+      dlsch1->active[subframe] = 1;
 #else
-    dlsch0->active = 1;
-    dlsch1->active = 1;
+      dlsch0->active = 1;
+      dlsch1->active = 1;
 #endif
-    dlsch0->harq_mask                         |= (1<<rel8->harq_process);
-    dlsch1->harq_mask                         |= (1<<rel8->harq_process);
+      dlsch0->harq_mask                         |= (1<<rel8->harq_process);
+      dlsch1->harq_mask                         |= (1<<rel8->harq_process);
 
-    // check if either TB is disabled (see 36-213 V11.3 Section )
-    if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) {
+      // check if either TB is disabled (see 36-213 V11.3 Section )
+      if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) {
 #ifdef PHY_TX_THREAD
-      dlsch0->active[subframe] = 0;
+        dlsch0->active[subframe] = 0;
 #else
-      dlsch0->active = 0;
+        dlsch0->active = 0;
 #endif
-      dlsch0->harq_mask                         &= ~(1<<rel8->harq_process);
-    }
+        dlsch0->harq_mask                         &= ~(1<<rel8->harq_process);
+      }
 
-    if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) {
+      if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) {
 #ifdef PHY_TX_THREAD
-      dlsch1->active[subframe]= 0;
+        dlsch1->active[subframe]= 0;
 #else
-      dlsch1->active = 0;
+        dlsch1->active = 0;
 #endif
-      dlsch1->harq_mask                         &= ~(1<<rel8->harq_process);
-    }
-    // dlsch0_harq->dl_power_off = 0;
-    // dlsch1_harq->dl_power_off = 0;
-
+        dlsch1->harq_mask                         &= ~(1<<rel8->harq_process);
+      }
 
-    if (fp->nb_antenna_ports_eNB == 2) {
-      dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-      dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch0_harq->nb_rb - 1];
+      // dlsch0_harq->dl_power_off = 0;
+      // dlsch1_harq->dl_power_off = 0;
 
+      if (fp->nb_antenna_ports_eNB == 2) {
+        dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
+        dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch0_harq->nb_rb - 1];
 #ifdef PHY_TX_THREAD
-      if ((dlsch0->active[subframe]==1) && (dlsch1->active[subframe]==1)) {
-#else
-      if ((dlsch0->active==1) && (dlsch1->active==1)) {
-#endif
-        dlsch0_harq->mimo_mode = LARGE_CDD;
-        dlsch1_harq->mimo_mode = LARGE_CDD;
-        dlsch0_harq->dl_power_off = 1;
-        dlsch1_harq->dl_power_off = 1;
-      } else {
-        dlsch0_harq->mimo_mode = ALAMOUTI;
-        dlsch1_harq->mimo_mode = ALAMOUTI;
-      }
-    } else if (fp->nb_antenna_ports_eNB == 4) { // 4 antenna case
-#ifdef PHY_TX_THREAD
-      if ((dlsch0->active[subframe]==1) && (dlsch1->active[subframe]==1)) {
+
+        if ((dlsch0->active[subframe]==1) && (dlsch1->active[subframe]==1)) {
 #else
-      if ((dlsch0->active==1) && (dlsch1->active==1)) {
-#endif
-        switch (rel8->precoding_information) {
-        case 0:                // one layer per transport block
-          dlsch0_harq->mimo_mode = LARGE_CDD;
-          dlsch1_harq->mimo_mode = LARGE_CDD;
-          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-          dlsch0_harq->dl_power_off = 1;
-          dlsch1_harq->dl_power_off = 1;
-          break;
 
-        case 1:                // one-layers on TB 0, two on TB 1
+        if ((dlsch0->active==1) && (dlsch1->active==1)) {
+#endif
           dlsch0_harq->mimo_mode = LARGE_CDD;
           dlsch1_harq->mimo_mode = LARGE_CDD;
-          dlsch1_harq->Nl = 2;
-          dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
           dlsch0_harq->dl_power_off = 1;
           dlsch1_harq->dl_power_off = 1;
-          break;
+        } else {
+          dlsch0_harq->mimo_mode = ALAMOUTI;
+          dlsch1_harq->mimo_mode = ALAMOUTI;
+        }
+      } else if (fp->nb_antenna_ports_eNB == 4) { // 4 antenna case
+#ifdef PHY_TX_THREAD
+        if ((dlsch0->active[subframe]==1) && (dlsch1->active[subframe]==1)) {
+#else
 
-        case 2:                // two-layers on TB 0, two on TB 1
-          dlsch0_harq->mimo_mode = LARGE_CDD;
-          dlsch1_harq->mimo_mode = LARGE_CDD;
-          dlsch0_harq->Nl = 2;
-          dlsch0_harq->dl_power_off = 1;
-          dlsch1_harq->dl_power_off = 1;
+        if ((dlsch0->active==1) && (dlsch1->active==1)) {
+#endif
 
-          if (fp->N_RB_DL <= 56) {
-            dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][(dlsch0_harq->nb_rb << 1) - 1];
-            dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
-          } else {
-            LOG_E (PHY, "Add implementation of Table 7.1.7.2.2-1 for two-layer TBS conversion with N_RB_DL > 56\n");
+          switch (rel8->precoding_information) {
+            case 0:                // one layer per transport block
+              dlsch0_harq->mimo_mode = LARGE_CDD;
+              dlsch1_harq->mimo_mode = LARGE_CDD;
+              dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
+              dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
+              dlsch0_harq->dl_power_off = 1;
+              dlsch1_harq->dl_power_off = 1;
+              break;
+
+            case 1:                // one-layers on TB 0, two on TB 1
+              dlsch0_harq->mimo_mode = LARGE_CDD;
+              dlsch1_harq->mimo_mode = LARGE_CDD;
+              dlsch1_harq->Nl = 2;
+              dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
+              dlsch0_harq->dl_power_off = 1;
+              dlsch1_harq->dl_power_off = 1;
+              break;
+
+            case 2:                // two-layers on TB 0, two on TB 1
+              dlsch0_harq->mimo_mode = LARGE_CDD;
+              dlsch1_harq->mimo_mode = LARGE_CDD;
+              dlsch0_harq->Nl = 2;
+              dlsch0_harq->dl_power_off = 1;
+              dlsch1_harq->dl_power_off = 1;
+
+              if (fp->N_RB_DL <= 56) {
+                dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][(dlsch0_harq->nb_rb << 1) - 1];
+                dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
+              } else {
+                LOG_E (PHY, "Add implementation of Table 7.1.7.2.2-1 for two-layer TBS conversion with N_RB_DL > 56\n");
+              }
+
+              break;
+
+            case 3:                //
+              LOG_E (PHY, "Illegal value (3) for TPMI in Format 2A DCI\n");
+              break;
           }
 
-          break;
-
-        case 3:                //
-          LOG_E (PHY, "Illegal value (3) for TPMI in Format 2A DCI\n");
-          break;
-        }
 #ifdef PHY_TX_THREAD
-      } else if (dlsch0->active[subframe] == 1) {
+        } else if (dlsch0->active[subframe] == 1) {
 #else
-      } else if (dlsch0->active == 1) {
+        } else if (dlsch0->active == 1) {
 #endif
-        switch (rel8->precoding_information) {
-        case 0:                // one layer per transport block
-          dlsch0_harq->mimo_mode = ALAMOUTI;
-          dlsch1_harq->mimo_mode = ALAMOUTI;
-          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-          break;
 
-        case 1:                // two-layers on TB 0
-          dlsch0_harq->mimo_mode = LARGE_CDD;
-          dlsch0_harq->Nl = 2;
-          dlsch0_harq->dl_power_off = 1;
-          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][(dlsch0_harq->nb_rb << 1) - 1];
-          break;
+          switch (rel8->precoding_information) {
+            case 0:                // one layer per transport block
+              dlsch0_harq->mimo_mode = ALAMOUTI;
+              dlsch1_harq->mimo_mode = ALAMOUTI;
+              dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
+              break;
+
+            case 1:                // two-layers on TB 0
+              dlsch0_harq->mimo_mode = LARGE_CDD;
+              dlsch0_harq->Nl = 2;
+              dlsch0_harq->dl_power_off = 1;
+              dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][(dlsch0_harq->nb_rb << 1) - 1];
+              break;
+
+            case 2:                // two-layers on TB 0, two on TB 1
+            case 3:                //
+              LOG_E (PHY, "Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n", rel8->precoding_information);
+              break;
+          }
 
-        case 2:                // two-layers on TB 0, two on TB 1
-        case 3:                //
-          LOG_E (PHY, "Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n", rel8->precoding_information);
-          break;
-        }
 #ifdef PHY_TX_THREAD
-      } else if (dlsch1->active[subframe] == 1) {
+        } else if (dlsch1->active[subframe] == 1) {
 #else
-      } else if (dlsch1->active == 1) {
+        } else if (dlsch1->active == 1) {
 #endif
-        switch (rel8->precoding_information) {
-        case 0:                // one layer per transport block
-          dlsch0_harq->mimo_mode = ALAMOUTI;
-          dlsch1_harq->mimo_mode = ALAMOUTI;
-          dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
-          break;
-
-        case 1:                // two-layers on TB 0
-          dlsch1_harq->mimo_mode = LARGE_CDD;
-          dlsch1_harq->Nl = 2;
-          dlsch1_harq->dl_power_off = 1;
-          dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
-          break;
 
-        case 2:                // two-layers on TB 0, two on TB 1
-        case 3:                //
-          LOG_E (PHY, "Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n", rel8->precoding_information);
-          break;
+          switch (rel8->precoding_information) {
+            case 0:                // one layer per transport block
+              dlsch0_harq->mimo_mode = ALAMOUTI;
+              dlsch1_harq->mimo_mode = ALAMOUTI;
+              dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
+              break;
+
+            case 1:                // two-layers on TB 0
+              dlsch1_harq->mimo_mode = LARGE_CDD;
+              dlsch1_harq->Nl = 2;
+              dlsch1_harq->dl_power_off = 1;
+              dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][(dlsch1_harq->nb_rb << 1) - 1];
+              break;
+
+            case 2:                // two-layers on TB 0, two on TB 1
+            case 3:                //
+              LOG_E (PHY, "Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n", rel8->precoding_information);
+              break;
+          }
         }
+      } else {
+        LOG_E (PHY, "Illegal number of antennas for eNB %d\n", fp->nb_antenna_ports_eNB);
       }
-    } else {
-      LOG_E (PHY, "Illegal number of antennas for eNB %d\n", fp->nb_antenna_ports_eNB);
-    }
 
-    // reset HARQ process if this is the first transmission
+      // reset HARQ process if this is the first transmission
 #ifdef PHY_TX_THREAD
-    if ((dlsch0->active[subframe]==1) && (dlsch0_harq->round == 0))
+
+      if ((dlsch0->active[subframe]==1) && (dlsch0_harq->round == 0))
 #else
-    if ((dlsch0->active==1) && (dlsch0_harq->round == 0))
+      if ((dlsch0->active==1) && (dlsch0_harq->round == 0))
 #endif
-      dlsch0_harq->status = ACTIVE;
+        dlsch0_harq->status = ACTIVE;
 
 #ifdef PHY_TX_THREAD
-    if ((dlsch1->active[subframe]==1) && (dlsch1_harq->round == 0))
+
+      if ((dlsch1->active[subframe]==1) && (dlsch1_harq->round == 0))
 #else
-    if ((dlsch1->active==1) && (dlsch1_harq->round == 0))
+      if ((dlsch1->active==1) && (dlsch1_harq->round == 0))
 #endif
-      dlsch1_harq->status = ACTIVE;
+        dlsch1_harq->status = ACTIVE;
 
-    dlsch0->rnti = rel8->rnti;
-    dlsch1->rnti = rel8->rnti;
+      dlsch0->rnti = rel8->rnti;
+      dlsch1->rnti = rel8->rnti;
+      break;
 
+    case NFAPI_DL_DCI_FORMAT_2:
+      dci_alloc->format = format2;
 
-    break;
+      switch (fp->N_RB_DL) {
+        case 6:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                       = sizeof_DCI2_1_5MHz_2A_TDD_t;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tpmi     = rel8->precoding_information;
+            ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                         = sizeof_DCI2_1_5MHz_2A_FDD_t;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tpmi         = rel8->precoding_information;
+            ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->padding      = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-  case NFAPI_DL_DCI_FORMAT_2:
+          break;
 
-    dci_alloc->format = format2;
-    switch (fp->N_RB_DL) {
-    case 6:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                       = sizeof_DCI2_1_5MHz_2A_TDD_t; 
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-	((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tpmi     = rel8->precoding_information;
-        ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                         = sizeof_DCI2_1_5MHz_2A_FDD_t; 
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
-	((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tpmi         = rel8->precoding_information;
-        ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->padding      = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      }
-      break;
-    case 25:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2_5MHz_2A_TDD_t; 
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;	
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;	
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
-        ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                           = sizeof_DCI2_5MHz_2A_FDD_t; 
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs1          = rel8->mcs_1;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs2          = rel8->mcs_2;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi1          = rel8->new_data_indicator_1;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi2          = rel8->new_data_indicator_2;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv1           = rel8->redundancy_version_1;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv2           = rel8->redundancy_version_2;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
-	((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap       = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi          = rel8->precoding_information;
-        ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->padding       = 0;
-        //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      }
-      break;
-    case 50:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2_10MHz_2A_TDD_t; 
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
-	((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;	
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;	
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi     = rel8->precoding_information;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                        = sizeof_DCI2_10MHz_2A_FDD_t; 
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
-        ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
-      }
-      break;
-    case 100:
-      if (fp->frame_type == TDD) {
-	dci_alloc->dci_length                        = sizeof_DCI2_20MHz_2A_TDD_t;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
-	((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
-        //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
-      } else {
-	dci_alloc->dci_length                           = sizeof_DCI2_20MHz_2A_FDD_t;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
-        ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
-	((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi         = rel8->precoding_information;
-        ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->padding      = 0;
-      }
-      break;
+        case 25:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2_5MHz_2A_TDD_t;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
+            ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                           = sizeof_DCI2_5MHz_2A_FDD_t;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rah           = rel8->resource_allocation_type;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs1          = rel8->mcs_1;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs2          = rel8->mcs_2;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi1          = rel8->new_data_indicator_1;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi2          = rel8->new_data_indicator_2;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rballoc       = rel8->resource_block_coding;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv1           = rel8->redundancy_version_1;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv2           = rel8->redundancy_version_2;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->TPC           = rel8->tpc;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->harq_pid      = rel8->harq_process;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap       = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi          = rel8->precoding_information;
+            ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->padding       = 0;
+            //      printf("FDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          }
 
-    }
+          break;
 
-    AssertFatal (rel8->harq_process >= 8, "Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process);
+        case 50:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2_10MHz_2A_TDD_t;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rah      = rel8->resource_allocation_type;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs1     = rel8->mcs_1;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs2     = rel8->mcs_2;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi1     = rel8->new_data_indicator_1;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi2     = rel8->new_data_indicator_2;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rballoc  = rel8->resource_block_coding;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv1      = rel8->redundancy_version_1;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv2      = rel8->redundancy_version_2;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->TPC      = rel8->tpc;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->harq_pid = rel8->harq_process;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tb_swap  = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->dai      = rel8->downlink_assignment_index;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi     = rel8->precoding_information;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->padding  = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                        = sizeof_DCI2_10MHz_2A_FDD_t;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
+            ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
+          }
 
+          break;
 
-    // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0
-    // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated
-    TB0_active = 1;
-    TB1_active = 1;
+        case 100:
+          if (fp->frame_type == TDD) {
+            dci_alloc->dci_length                        = sizeof_DCI2_20MHz_2A_TDD_t;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rah       = rel8->resource_allocation_type;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs1      = rel8->mcs_1;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs2      = rel8->mcs_2;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi1      = rel8->new_data_indicator_1;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi2      = rel8->new_data_indicator_2;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rballoc   = rel8->resource_block_coding;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv1       = rel8->redundancy_version_1;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv2       = rel8->redundancy_version_2;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->TPC       = rel8->tpc;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->harq_pid  = rel8->harq_process;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tb_swap   = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->dai       = rel8->downlink_assignment_index;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi      = rel8->precoding_information;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->padding   = 0;
+            //        printf("TDD 1: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
+          } else {
+            dci_alloc->dci_length                           = sizeof_DCI2_20MHz_2A_FDD_t;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rah          = rel8->resource_allocation_type;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs1         = rel8->mcs_1;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs2         = rel8->mcs_2;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi1         = rel8->new_data_indicator_1;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi2         = rel8->new_data_indicator_2;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rballoc      = rel8->resource_block_coding;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv1          = rel8->redundancy_version_1;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv2          = rel8->redundancy_version_2;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->TPC          = rel8->tpc;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->harq_pid     = rel8->harq_process;
+            ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tb_swap      = rel8->transport_block_to_codeword_swap_flag;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi         = rel8->precoding_information;
+            ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->padding      = 0;
+          }
+
+          break;
+      }
+
+      AssertFatal (rel8->harq_process >= 8, "Format 2_2A: harq_pid=%d >= 8\n", rel8->harq_process);
+      // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0
+      // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated
+      TB0_active = 1;
+      TB1_active = 1;
+
+      if ((rel8->redundancy_version_1 == 1) && (rel8->mcs_1 == 0)) {
+        TB0_active = 0;
+      }
+
+      if ((rel8->redundancy_version_2 == 1) && (rel8->mcs_2 == 0)) {
+        TB1_active = 0;
+      }
 
-    if ((rel8->redundancy_version_1 == 1) && (rel8->mcs_1 == 0)) {
-      TB0_active = 0;
-    }
-    if ((rel8->redundancy_version_2 == 1) && (rel8->mcs_2 == 0)) {
-      TB1_active = 0;
-    }
 #ifdef DEBUG_HARQ
-    printf ("RV0 = %d, RV1 = %d. MCS0 = %d, MCS1=%d\n", rel8->redundancy_version_1, rel8->redundancy_version_2, rel8->mcs_1, rel8->mcs_2);
+      printf ("RV0 = %d, RV1 = %d. MCS0 = %d, MCS1=%d\n", rel8->redundancy_version_1, rel8->redundancy_version_2, rel8->mcs_1, rel8->mcs_2);
 #endif
-    if (TB0_active && TB1_active && rel8->transport_block_to_codeword_swap_flag==0) {
+
+      if (TB0_active && TB1_active && rel8->transport_block_to_codeword_swap_flag==0) {
 #ifdef PHY_TX_THREAD
-      dlsch0->active[subframe] = 1;
-      dlsch1->active[subframe] = 1;
+        dlsch0->active[subframe] = 1;
+        dlsch1->active[subframe] = 1;
 #else
-      dlsch0->active = 1;
-      dlsch1->active = 1;
+        dlsch0->active = 1;
+        dlsch1->active = 1;
 #endif
-      dlsch0->harq_mask                         |= (1<<rel8->harq_process);
-      dlsch1->harq_mask                         |= (1<<rel8->harq_process);
-      dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
-      dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
-      dlsch0_harq->mcs = rel8->mcs_1;
-      dlsch1_harq->mcs = rel8->mcs_2;
-      dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
-      dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
-      dlsch0_harq->rvidx = rel8->redundancy_version_1;
-      dlsch1_harq->rvidx = rel8->redundancy_version_2;
-      dlsch0_harq->status = ACTIVE;
-      dlsch1_harq->status = ACTIVE;
-      dlsch0_harq->codeword = 0;
-      dlsch1_harq->codeword = 1;
+        dlsch0->harq_mask                         |= (1<<rel8->harq_process);
+        dlsch1->harq_mask                         |= (1<<rel8->harq_process);
+        dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
+        dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
+        dlsch0_harq->mcs = rel8->mcs_1;
+        dlsch1_harq->mcs = rel8->mcs_2;
+        dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
+        dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
+        dlsch0_harq->rvidx = rel8->redundancy_version_1;
+        dlsch1_harq->rvidx = rel8->redundancy_version_2;
+        dlsch0_harq->status = ACTIVE;
+        dlsch1_harq->status = ACTIVE;
+        dlsch0_harq->codeword = 0;
+        dlsch1_harq->codeword = 1;
 #ifdef DEBUG_HARQ
-      printf ("\n ENB: BOTH ACTIVE\n");
+        printf ("\n ENB: BOTH ACTIVE\n");
 #endif
-    } else if (TB0_active && TB1_active && rel8->transport_block_to_codeword_swap_flag == 1) {
-      dlsch0 = eNB->dlsch[UE_id][1];
-      dlsch1 = eNB->dlsch[UE_id][0];
+      } else if (TB0_active && TB1_active && rel8->transport_block_to_codeword_swap_flag == 1) {
+        dlsch0 = eNB->dlsch[UE_id][1];
+        dlsch1 = eNB->dlsch[UE_id][0];
 #ifdef PHY_TX_THREAD
-      dlsch0->active[subframe] = 1;
-      dlsch1->active[subframe] = 1;
+        dlsch0->active[subframe] = 1;
+        dlsch1->active[subframe] = 1;
 #else
-      dlsch0->active = 1;
-      dlsch1->active = 1;
+        dlsch0->active = 1;
+        dlsch1->active = 1;
 #endif
-
-      dlsch0->harq_mask |= (1 << rel8->harq_process);
-      dlsch1->harq_mask |= (1 << rel8->harq_process);
-
-      dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
-      dlsch0_harq->mcs = rel8->mcs_1;
-      dlsch1_harq->mcs = rel8->mcs_2;
-      dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
-      dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
-      dlsch0_harq->rvidx = rel8->redundancy_version_1;
-      dlsch1_harq->rvidx = rel8->redundancy_version_2;
-      dlsch0_harq->status = ACTIVE;
-      dlsch1_harq->status = ACTIVE;
-      dlsch0_harq->codeword=1;
-      dlsch1_harq->codeword=0;
-    }
-    else if (TB0_active && (TB1_active==0)) {
+        dlsch0->harq_mask |= (1 << rel8->harq_process);
+        dlsch1->harq_mask |= (1 << rel8->harq_process);
+        dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
+        dlsch0_harq->mcs = rel8->mcs_1;
+        dlsch1_harq->mcs = rel8->mcs_2;
+        dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
+        dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
+        dlsch0_harq->rvidx = rel8->redundancy_version_1;
+        dlsch1_harq->rvidx = rel8->redundancy_version_2;
+        dlsch0_harq->status = ACTIVE;
+        dlsch1_harq->status = ACTIVE;
+        dlsch0_harq->codeword=1;
+        dlsch1_harq->codeword=0;
+      } else if (TB0_active && (TB1_active==0)) {
 #ifdef PHY_TX_THREAD
-      dlsch0->active[subframe] = 1;
+        dlsch0->active[subframe] = 1;
 #else
-      dlsch0->active = 1;
+        dlsch0->active = 1;
 #endif
-      dlsch0->harq_mask                         |= (1<<rel8->harq_process);
-      dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
-      dlsch0_harq->mcs = rel8->mcs_1;
-      dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
-      dlsch0_harq->rvidx = rel8->redundancy_version_1;
-      dlsch0_harq->status = ACTIVE;
-      dlsch0_harq->codeword = 0;
-      dlsch1 = NULL;
-      dlsch1_harq = NULL;
+        dlsch0->harq_mask                         |= (1<<rel8->harq_process);
+        dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
+        dlsch0_harq->mcs = rel8->mcs_1;
+        dlsch0_harq->Qm = get_Qm (rel8->mcs_1);
+        dlsch0_harq->rvidx = rel8->redundancy_version_1;
+        dlsch0_harq->status = ACTIVE;
+        dlsch0_harq->codeword = 0;
+        dlsch1 = NULL;
+        dlsch1_harq = NULL;
 #ifdef DEBUG_HARQ
-      printf ("\n ENB: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
+        printf ("\n ENB: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
 #endif
-    }
-    else if ((TB0_active==0) && TB1_active) {
+      } else if ((TB0_active==0) && TB1_active) {
 #ifdef PHY_TX_THREAD
-      dlsch1->active[subframe] = 1;
+        dlsch1->active[subframe] = 1;
 #else
-      dlsch1->active = 1;
+        dlsch1->active = 1;
 #endif
-      dlsch1->harq_mask                         |= (1<<rel8->harq_process);
-      dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
-      dlsch1_harq->mcs = rel8->mcs_2;
-      dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
-      dlsch1_harq->rvidx = rel8->redundancy_version_2;
-      dlsch1_harq->status = ACTIVE;
-      dlsch1_harq->codeword = 0;
-      dlsch0 = NULL;
-      dlsch0_harq = NULL;
-#ifdef DEBUG_HARQ
-      printf ("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
-#endif
-    }
-
-    if (dlsch0 != NULL) {
-      dlsch0->subframe_tx[subframe] = 1;
-
-      dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
-    }
-
-    if (dlsch1_harq != NULL){
-      dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
-    }
+        dlsch1->harq_mask                         |= (1<<rel8->harq_process);
+        dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
+        dlsch1_harq->mcs = rel8->mcs_2;
+        dlsch1_harq->Qm = get_Qm (rel8->mcs_2);
+        dlsch1_harq->rvidx = rel8->redundancy_version_2;
+        dlsch1_harq->status = ACTIVE;
+        dlsch1_harq->codeword = 0;
+        dlsch0 = NULL;
+        dlsch0_harq = NULL;
+#ifdef DEBUG_HARQ
+        printf ("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
+#endif
+      }
 
+      if (dlsch0 != NULL) {
+        dlsch0->subframe_tx[subframe] = 1;
+        dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
+      }
 
-    if (dlsch0 != NULL) {
-      conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+      if (dlsch1_harq != NULL) {
+        dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
+      }
 
-      dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
+      if (dlsch0 != NULL) {
+        conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
+        dlsch0_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
 
-      if (dlsch1 != NULL) {
-        dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
-        dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
+        if (dlsch1 != NULL) {
+          dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
+          dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
+        }
+      } else if ((dlsch0 == NULL) && (dlsch1 != NULL)) {
+        conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch1_harq->rb_alloc);
+        dlsch1_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
       }
-    } else if ((dlsch0 == NULL) && (dlsch1 != NULL)) {
-      conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch1_harq->rb_alloc);
 
-      dlsch1_harq->nb_rb = conv_nprb (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL);
-    }
+      // assume both TBs are active
+      if (dlsch0_harq != NULL)
+        dlsch0_harq->Nl = 1;
 
-    // assume both TBs are active
-    if (dlsch0_harq != NULL)
-      dlsch0_harq->Nl = 1;
-    if (dlsch1_harq != NULL)
-      dlsch1_harq->Nl = 1;
+      if (dlsch1_harq != NULL)
+        dlsch1_harq->Nl = 1;
 
+      // check if either TB is disabled (see 36-213 V11.3 Section )
 
-    // check if either TB is disabled (see 36-213 V11.3 Section )
+      if (fp->nb_antenna_ports_eNB == 2) {
+        if ((dlsch0 != NULL) && (dlsch1 != NULL)) {       //two CW active
+          dlsch0_harq->dl_power_off = 1;
+          dlsch1_harq->dl_power_off = 1;
+          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
+          dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
 
-    if (fp->nb_antenna_ports_eNB == 2) {
-      if ((dlsch0 != NULL) && (dlsch1 != NULL)) {       //two CW active
+          switch (rel8->precoding_information) {
+            case 0:
+              dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
+              dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 0, 1);
+              dlsch1_harq->pmi_alloc = pmi_extend (fp, 0, 1);
+              break;
+
+            case 1:
+              dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
+              dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 1);
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 1);
+              break;
+
+            case 2:                // PUSCH precoding
+              dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
+              dlsch0_harq->pmi_alloc = DL_pmi_single;
+              dlsch1_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
+              dlsch1_harq->pmi_alloc = DL_pmi_single;
+              break;
+
+            default:
+              break;
+          }
+        } else if ((dlsch0 != NULL) && (dlsch1 == NULL)) {        // only CW 0 active
+          dlsch0_harq->dl_power_off = 1;
+          dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
 
-        dlsch0_harq->dl_power_off = 1;
-        dlsch1_harq->dl_power_off = 1;
-        dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-        dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
-        switch (rel8->precoding_information) {
-        case 0:
-          dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
-          dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 0, 1);
-          dlsch1_harq->pmi_alloc = pmi_extend (fp, 0, 1);
-          break;
-        case 1:
-          dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
-          dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 1);
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 1);
+          switch (rel8->precoding_information) {
+            case 0:
+              dlsch0_harq->mimo_mode = ALAMOUTI;
+              break;
+
+            case 1:
+              dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 0, 0);
+              break;
+
+            case 2:
+              dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 0);
+              break;
+
+            case 3:
+              dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 2, 0);
+              break;
+
+            case 4:
+              dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
+              dlsch0_harq->pmi_alloc = pmi_extend (fp, 3, 0);
+              break;
+
+            case 5:
+              dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
+              dlsch0_harq->pmi_alloc = DL_pmi_single;
+              break;
+
+            case 6:
+              dlsch0_harq->mimo_mode = PUSCH_PRECODING1;
+              dlsch0_harq->pmi_alloc = DL_pmi_single;
+              break;
+          }
+        } else if ((dlsch0 == NULL) && (dlsch1 != NULL)) {
+          dlsch1_harq->dl_power_off = 1;
+          dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
 
-          break;
-        case 2:                // PUSCH precoding
-          dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
-          dlsch0_harq->pmi_alloc = DL_pmi_single;
-          dlsch1_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
-          dlsch1_harq->pmi_alloc = DL_pmi_single;
-          break;
-        default:
-          break;
-        }
-      } else if ((dlsch0 != NULL) && (dlsch1 == NULL)) {        // only CW 0 active
-        dlsch0_harq->dl_power_off = 1;
-        dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
-        switch (rel8->precoding_information) {
-        case 0:
-          dlsch0_harq->mimo_mode = ALAMOUTI;
-          break;
-        case 1:
-          dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 0, 0);
-          break;
-        case 2:
-          dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 1, 0);
-          break;
-        case 3:
-          dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 2, 0);
-          break;
-        case 4:
-          dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
-          dlsch0_harq->pmi_alloc = pmi_extend (fp, 3, 0);
-          break;
-        case 5:
-          dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
-          dlsch0_harq->pmi_alloc = DL_pmi_single;
-          break;
-        case 6:
-          dlsch0_harq->mimo_mode = PUSCH_PRECODING1;
-          dlsch0_harq->pmi_alloc = DL_pmi_single;
-          break;
-        }
-      } else if ((dlsch0 == NULL) && (dlsch1 != NULL)) {
-        dlsch1_harq->dl_power_off = 1;
-        dlsch1_harq->TBS = TBStable[get_I_TBS (dlsch1_harq->mcs)][dlsch1_harq->nb_rb - 1];
-        switch (rel8->precoding_information) {
-        case 0:
-          dlsch1_harq->mimo_mode = ALAMOUTI;
-          break;
-        case 1:
-          dlsch1_harq->mimo_mode = UNIFORM_PRECODING11;
-          dlsch1_harq->pmi_alloc = pmi_extend (fp, 0, 0);
-          break;
-        case 2:
-          dlsch1_harq->mimo_mode = UNIFORM_PRECODING1m1;
-          dlsch1_harq->pmi_alloc = pmi_extend (fp, 1, 0);
-          break;
-        case 3:
-          dlsch1_harq->mimo_mode = UNIFORM_PRECODING1j;
-          dlsch1_harq->pmi_alloc = pmi_extend (fp, 2, 0);
-          break;
-        case 4:
-          dlsch1_harq->mimo_mode = UNIFORM_PRECODING1mj;
-          dlsch1_harq->pmi_alloc = pmi_extend (fp, 3, 0);
-          break;
-        case 5:
-          dlsch1_harq->mimo_mode = PUSCH_PRECODING0;
-          dlsch1_harq->pmi_alloc = DL_pmi_single;
-          break;
-        case 6:
-          dlsch1_harq->mimo_mode = PUSCH_PRECODING1;
-          dlsch1_harq->pmi_alloc = DL_pmi_single;
-          break;
+          switch (rel8->precoding_information) {
+            case 0:
+              dlsch1_harq->mimo_mode = ALAMOUTI;
+              break;
+
+            case 1:
+              dlsch1_harq->mimo_mode = UNIFORM_PRECODING11;
+              dlsch1_harq->pmi_alloc = pmi_extend (fp, 0, 0);
+              break;
+
+            case 2:
+              dlsch1_harq->mimo_mode = UNIFORM_PRECODING1m1;
+              dlsch1_harq->pmi_alloc = pmi_extend (fp, 1, 0);
+              break;
+
+            case 3:
+              dlsch1_harq->mimo_mode = UNIFORM_PRECODING1j;
+              dlsch1_harq->pmi_alloc = pmi_extend (fp, 2, 0);
+              break;
+
+            case 4:
+              dlsch1_harq->mimo_mode = UNIFORM_PRECODING1mj;
+              dlsch1_harq->pmi_alloc = pmi_extend (fp, 3, 0);
+              break;
+
+            case 5:
+              dlsch1_harq->mimo_mode = PUSCH_PRECODING0;
+              dlsch1_harq->pmi_alloc = DL_pmi_single;
+              break;
+
+            case 6:
+              dlsch1_harq->mimo_mode = PUSCH_PRECODING1;
+              dlsch1_harq->pmi_alloc = DL_pmi_single;
+              break;
+          }
         }
+      } else if (fp->nb_antenna_ports_eNB == 4) {
+        // fill in later
       }
 
-    } else if (fp->nb_antenna_ports_eNB == 4) {
-      // fill in later
-    }
-    // reset HARQ process if this is the first transmission
-    /* if (dlsch0_harq->round == 0)
-       dlsch0_harq->status = ACTIVE;
+      // reset HARQ process if this is the first transmission
+      /* if (dlsch0_harq->round == 0)
+         dlsch0_harq->status = ACTIVE;
 
-       if (dlsch1_harq->round == 0)
-       dlsch1_harq->status = ACTIVE; */
-    if (dlsch0_harq != NULL)
-      dlsch0->rnti = rel8->rnti;
-    if (dlsch1 != NULL)
-      dlsch1->rnti = rel8->rnti;
+         if (dlsch1_harq->round == 0)
+         dlsch1_harq->status = ACTIVE; */
+      if (dlsch0_harq != NULL)
+        dlsch0->rnti = rel8->rnti;
 
-    break;
+      if (dlsch1 != NULL)
+        dlsch1->rnti = rel8->rnti;
+
+      break;
   }
 
   if (dlsch0_harq) {
     dlsch0_harq->frame    = frame;
     dlsch0_harq->subframe = subframe;
   }
+
   if (dlsch1_harq) {
     dlsch1_harq->frame    = frame;
     dlsch1_harq->subframe = subframe;
   }
+
 #ifdef DEBUG_DCI
 
   if (dlsch0) {
@@ -1505,32 +1513,29 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
     printf ("dlsch1 eNB: tpmi %d\n", rel8->precoding_information);
     printf ("dlsch1 eNB: mimo_mode %d\n", dlsch1_harq->mimo_mode);
   }
+
 #endif
-//printf("DCI %d.%d rnti %d harq %d TBS %d\n", frame, subframe, rel8->rnti, rel8->harq_process, dlsch0_harq->TBS);
+  //printf("DCI %d.%d rnti %d harq %d TBS %d\n", frame, subframe, rel8->rnti, rel8->harq_process, dlsch0_harq->TBS);
 #if T_TRACER
+
   if (dlsch0->active)
     T(T_ENB_PHY_DLSCH_UE_DCI, T_INT(0), T_INT(frame), T_INT(subframe),
       T_INT(rel8->rnti), T_INT(rel8->dci_format), T_INT(rel8->harq_process),
       T_INT(rel8->mcs_1), T_INT(dlsch0_harq->TBS));
-#endif
 
+#endif
 }
 
 
-void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dci_alloc,nfapi_dl_config_mpdcch_pdu *pdu){
-
+void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dci_alloc,nfapi_dl_config_mpdcch_pdu *pdu) {
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
-
   uint8_t        *dci_pdu = &dci_alloc->dci_pdu[0];
   nfapi_dl_config_mpdcch_pdu_rel13_t *rel13 = &pdu->mpdcch_pdu_rel13;
-
-
   LTE_eNB_DLSCH_t *dlsch0 = NULL;
   LTE_DL_eNB_HARQ_t *dlsch0_harq = NULL;
   int             UE_id;
   int             subframe = proc->subframe_tx;
   int             frame = proc->frame_tx;
-
   dci_alloc->firstCCE = rel13->ecce_index;
   dci_alloc->L = rel13->aggregation_level;
   dci_alloc->rnti = rel13->rnti;
@@ -1543,14 +1548,11 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
   dci_alloc->ce_mode = rel13->ce_mode;
   dci_alloc->dmrs_scrambling_init = rel13->drms_scrambling_init;
   dci_alloc->i0 = rel13->initial_transmission_sf_io;
-
-
   UE_id = find_dlsch (rel13->rnti, eNB, SEARCH_EXIST_OR_FREE);
   AssertFatal (UE_id != -1, "no free or exiting dlsch_context\n");
   AssertFatal (UE_id < NUMBER_OF_UE_MAX, "returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX);
   dlsch0 = eNB->dlsch[UE_id][0];
   dlsch0_harq = dlsch0->harq_processes[rel13->harq_process];
-
   dci_alloc->ra_flag = 0;
 
   if (rel13->rnti_type == 2) {
@@ -1561,185 +1563,186 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
   AssertFatal (fp->N_RB_DL == 25 || fp->N_RB_DL == 50 || fp->N_RB_DL == 100, "eMTC only with N_RB_DL = 25,50,100\n");
 
   switch (rel13->dci_format) {
+    case 10:                     // Format 6-1A
+      dci_alloc->format = format6_1A;
+
+      switch (fp->N_RB_DL) {
+        case 25:
+          dci_alloc->dci_length = sizeof_DCI6_1A_5MHz_t;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->TPC = rel13->tpc;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1A_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          break;
 
+        case 50:
+          dci_alloc->dci_length = sizeof_DCI6_1A_10MHz_t;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding&31;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->narrowband = rel13->resource_block_coding>>5;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->rep = (rel13->pdsch_reptition_levels);
+          ((DCI6_1A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->TPC = rel13->tpc;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          LOG_D(PHY,
+                "Frame %d, Subframe %d : Programming Format 6-1A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, srs_req %d, harq_ack_off %d, dci_rep r%d => %x\n",
+                frame,subframe,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->type,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->hopping,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->narrowband,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->rballoc,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->mcs,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->rep,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->harq_pid,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->ndi,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->rv,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->TPC,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->srs_req,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off,
+                ((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep,
+                ((uint32_t *)dci_pdu)[0]);
+          break;
 
-  case 10:                     // Format 6-1A
-    dci_alloc->format = format6_1A;
-    switch (fp->N_RB_DL) {
-
-    case 25:
-      dci_alloc->dci_length = sizeof_DCI6_1A_5MHz_t;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->TPC = rel13->tpc;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1A_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+        case 100:
+          dci_alloc->dci_length = sizeof_DCI6_1A_20MHz_t;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->TPC = rel13->tpc;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1A_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          break;
+      }
 
       break;
-    case 50:
-      dci_alloc->dci_length = sizeof_DCI6_1A_10MHz_t;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding&31;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->narrowband = rel13->resource_block_coding>>5;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->rep = (rel13->pdsch_reptition_levels);
-      ((DCI6_1A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->TPC = rel13->tpc;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-
-      LOG_D(PHY,"Frame %d, Subframe %d : Programming Format 6-1A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, srs_req %d, harq_ack_off %d, dci_rep r%d => %x\n",
-	    frame,subframe,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->type,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->hopping,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->narrowband,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->rballoc,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->mcs,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->rep,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->harq_pid,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->ndi,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->rv,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->TPC,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->srs_req,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off,
-	    ((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep,
-	    ((uint32_t*)dci_pdu)[0]);
-      break;
-    case 100:
-      dci_alloc->dci_length = sizeof_DCI6_1A_20MHz_t;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->hopping = rel13->frequency_hopping_enabled_flag;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->rv = rel13->redundancy_version;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->TPC = rel13->tpc;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1A_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      break;
-    }
-    break;
-  case 11:                     // Format 6-1B
-    dci_alloc->format = format6_1B;
-    switch (fp->N_RB_DL) {
 
-    case 25:
-      dci_alloc->dci_length = sizeof_DCI6_1B_5MHz_t;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1B_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+    case 11:                     // Format 6-1B
+      dci_alloc->format = format6_1B;
+
+      switch (fp->N_RB_DL) {
+        case 25:
+          dci_alloc->dci_length = sizeof_DCI6_1B_5MHz_t;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1B_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          break;
 
-      break;
-    case 50:
-      dci_alloc->dci_length = sizeof_DCI6_1B_10MHz_t;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1B_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      break;
-    case 100:
-      dci_alloc->dci_length = sizeof_DCI6_1B_20MHz_t;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->type = 1;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
-      ((DCI6_1B_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      break;
-    }
-  case 12:                     // Format 6-2
-    dci_alloc->format = format6_2;
-    switch (fp->N_RB_DL) {
-    case 25:
-      dci_alloc->dci_length = sizeof_DCI6_2_5MHz_t;
-      if (rel13->paging_direct_indication_differentiation_flag == 0) {
-        ((DCI6_2_di_5MHz_t *) dci_pdu)->type = 0;
-        ((DCI6_2_di_5MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
-      } else {
-        ((DCI6_2_paging_5MHz_t *) dci_pdu)->type = 1;
-        ((DCI6_2_paging_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-        ((DCI6_2_paging_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
-        ((DCI6_2_paging_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-        ((DCI6_2_paging_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+        case 50:
+          dci_alloc->dci_length = sizeof_DCI6_1B_10MHz_t;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1B_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          break;
+
+        case 100:
+          dci_alloc->dci_length = sizeof_DCI6_1B_20MHz_t;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->type = 1;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->ndi = rel13->new_data_indicator;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
+          ((DCI6_1B_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          break;
       }
 
-      break;
-    case 50:
+    case 12:                     // Format 6-2
+      dci_alloc->format = format6_2;
 
-      dci_alloc->dci_length = sizeof_DCI6_2_10MHz_t;
-      if (rel13->paging_direct_indication_differentiation_flag == 0) {
-        ((DCI6_2_di_10MHz_t *) dci_pdu)->type = 0;
-        ((DCI6_2_di_10MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
-      } else {
-        ((DCI6_2_paging_10MHz_t *) dci_pdu)->type = 1;
-        ((DCI6_2_paging_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-        ((DCI6_2_paging_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
-        ((DCI6_2_paging_10MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-        ((DCI6_2_paging_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      }
+      switch (fp->N_RB_DL) {
+        case 25:
+          dci_alloc->dci_length = sizeof_DCI6_2_5MHz_t;
 
-      break;
-    case 100:
-      dci_alloc->dci_length = sizeof_DCI6_2_20MHz_t;
-      if (rel13->paging_direct_indication_differentiation_flag == 0) {
-        ((DCI6_2_di_20MHz_t *) dci_pdu)->type = 0;
-        ((DCI6_2_di_20MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
-      } else {
-        ((DCI6_2_paging_20MHz_t *) dci_pdu)->type = 1;
-        ((DCI6_2_paging_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
-        ((DCI6_2_paging_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
-        ((DCI6_2_paging_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
-        ((DCI6_2_paging_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      }
+          if (rel13->paging_direct_indication_differentiation_flag == 0) {
+            ((DCI6_2_di_5MHz_t *) dci_pdu)->type = 0;
+            ((DCI6_2_di_5MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
+          } else {
+            ((DCI6_2_paging_5MHz_t *) dci_pdu)->type = 1;
+            ((DCI6_2_paging_5MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+            ((DCI6_2_paging_5MHz_t *) dci_pdu)->mcs = rel13->mcs;
+            ((DCI6_2_paging_5MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+            ((DCI6_2_paging_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          }
 
-      break;
-    }
+          break;
+
+        case 50:
+          dci_alloc->dci_length = sizeof_DCI6_2_10MHz_t;
+
+          if (rel13->paging_direct_indication_differentiation_flag == 0) {
+            ((DCI6_2_di_10MHz_t *) dci_pdu)->type = 0;
+            ((DCI6_2_di_10MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
+          } else {
+            ((DCI6_2_paging_10MHz_t *) dci_pdu)->type = 1;
+            ((DCI6_2_paging_10MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+            ((DCI6_2_paging_10MHz_t *) dci_pdu)->mcs = rel13->mcs;
+            ((DCI6_2_paging_10MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+            ((DCI6_2_paging_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          }
+
+          break;
+
+        case 100:
+          dci_alloc->dci_length = sizeof_DCI6_2_20MHz_t;
+
+          if (rel13->paging_direct_indication_differentiation_flag == 0) {
+            ((DCI6_2_di_20MHz_t *) dci_pdu)->type = 0;
+            ((DCI6_2_di_20MHz_t *) dci_pdu)->di_info = rel13->direct_indication;
+          } else {
+            ((DCI6_2_paging_20MHz_t *) dci_pdu)->type = 1;
+            ((DCI6_2_paging_20MHz_t *) dci_pdu)->rballoc = rel13->resource_block_coding;
+            ((DCI6_2_paging_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
+            ((DCI6_2_paging_20MHz_t *) dci_pdu)->rep = rel13->pdsch_reptition_levels;
+            ((DCI6_2_paging_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+          }
+
+          break;
+      }
   }
-  AssertFatal (rel13->harq_process < 8, "ERROR: Format 6_1A: harq_pid=%d >= 8\n", rel13->harq_process);
 
+  AssertFatal (rel13->harq_process < 8, "ERROR: Format 6_1A: harq_pid=%d >= 8\n", rel13->harq_process);
   dlsch0->ue_type = rel13->ce_mode;
-
   dlsch0_harq = dlsch0->harq_processes[rel13->harq_process];
   dlsch0_harq->codeword = 0;
-
   // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
   dlsch0->subframe_tx[(subframe + 2) % 10] = 1;
   LOG_D(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding);
-
   conv_eMTC_rballoc (rel13->resource_block_coding,
-		     fp->N_RB_DL,
-		     dlsch0_harq->rb_alloc);
-
+                     fp->N_RB_DL,
+                     dlsch0_harq->rb_alloc);
   dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rel13->resource_block_coding & 31];       // this is the 6PRB RIV
-
-
   dlsch0_harq->rvidx = rel13->redundancy_version;
-
   dlsch0_harq->Nl = 1;
   //    dlsch[0]->layer_index = 0;
   //  if (beamforming_mode == 0)
@@ -1748,26 +1751,28 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
   //  dlsch0_harq->mimo_mode = TM7;
   //else
   //LOG_E(PHY,"Invalid beamforming mode %dL\n", beamforming_mode);
-
   dlsch0_harq->dl_power_off = 1;
-
   dlsch0->subframe_tx[subframe] = 1;
+
   if (dlsch0->rnti != rel13->rnti) {     // if rnti of dlsch is not the same as in the config, this is a new entry
     dlsch0_harq->round = 0;
     dlsch0->harq_mask =0;
     printf("*********************** rnti %x => %x, pos %d\n",rel13->rnti,dlsch0->rnti,UE_id);
   }
+
   if ((dlsch0->harq_mask & (1 << rel13->harq_process)) > 0) {
     if ((rel13->new_data_indicator != dlsch0_harq->ndi)||(dci_alloc->ra_flag==1))
       dlsch0_harq->round = 0;
   } else {                      // process is inactive, so activate and set round to 0
     dlsch0_harq->round = 0;
   }
+
   dlsch0_harq->ndi = rel13->new_data_indicator;
 
   if (dlsch0_harq->round == 0) {
     dlsch0_harq->status = ACTIVE;
     dlsch0_harq->mcs = rel13->mcs;
+
     if (dci_alloc->ra_flag == 0) // get TBS from table using mcs and nb_rb
       dlsch0_harq->TBS         = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1];
     else if (rel13->tpc == 0)  //N1A_PRB=2, get TBS from table using mcs and nb_rb=2
@@ -1775,35 +1780,25 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
     else if (rel13->tpc == 1)  //N1A_PRB=3, get TBS from table using mcs and nb_rb=3
       dlsch0_harq->TBS         = TBStable[get_I_TBS(dlsch0_harq->mcs)][2];
     else AssertFatal(1==0,"Don't know how to set TBS (TPC %d)\n",rel13->tpc);
+
     LOG_D(PHY,"fill_mdci_and_dlsch : TBS = %d(%d) %p, %x\n",dlsch0_harq->TBS,dlsch0_harq->mcs,dlsch0,rel13->rnti);
   }
+
   dlsch0->active = 1;
   dlsch0->harq_mask |= (1 << rel13->harq_process);
-
   dlsch0_harq->frame    = (subframe >= 8) ? ((frame + 1) & 1023) : frame;
   dlsch0_harq->subframe = (subframe + 2) % 10;
-
   LOG_D(PHY,"Setting DLSCH UEid %d harq_ids[%d] from %d to %d\n",UE_id,dlsch0_harq->subframe,dlsch0->harq_ids[frame%2][dlsch0_harq->subframe],rel13->harq_process);
   dlsch0->harq_ids[dlsch0_harq->frame%2][dlsch0_harq->subframe] = rel13->harq_process;
   dlsch0_harq->pdsch_start = rel13->start_symbol;
-
   LOG_D(PHY,"Setting DLSCH harq %d round %d to active for %d.%d\n",rel13->harq_process,dlsch0_harq->round,dlsch0_harq->frame,dlsch0_harq->subframe);
-
   dlsch0->rnti = rel13->rnti;
-
   dlsch0_harq->Qm = get_Qm(rel13->mcs);
-
-
-
-
-
 }
 
 void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
-    DCI_ALLOC_t *dci_alloc,nfapi_hi_dci0_dci_pdu *pdu)
-{
+               DCI_ALLOC_t *dci_alloc,nfapi_hi_dci0_dci_pdu *pdu) {
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
-
   uint32_t        cqi_req = pdu->dci_pdu_rel8.cqi_csi_request;
   uint32_t        dai = pdu->dci_pdu_rel8.dl_assignment_index;
   uint32_t        cshift = pdu->dci_pdu_rel8.cyclic_shift_2_for_drms;
@@ -1813,11 +1808,8 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
   uint32_t        rballoc = computeRIV (frame_parms->N_RB_DL,
                                         pdu->dci_pdu_rel8.resource_block_start,
                                         pdu->dci_pdu_rel8.number_of_resource_block);
-
   uint32_t        ndi = pdu->dci_pdu_rel8.new_data_indication_1;
-
   uint16_t UE_id   = -1;
-
 #ifdef T_TRACER
   T(T_ENB_PHY_ULSCH_UE_DCI, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
     T_INT(pdu->dci_pdu_rel8.rnti), T_INT(pdu->dci_pdu_rel8.harq_pid),
@@ -1828,15 +1820,12 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
     T_INT(pdu->dci_pdu_rel8.aggregation_level),
     T_INT(pdu->dci_pdu_rel8.cce_index));
 #endif
-
   void           *dci_pdu = (void *) dci_alloc->dci_pdu;
-
   LOG_D(PHY,"SFN/SF:%04d%d DCI0[rnti %x cqi %d mcs %d hopping %d rballoc %x (%d,%d) ndi %d TPC %d cshift %d]\n",
         frame,subframe,
         pdu->dci_pdu_rel8.rnti,cqi_req, mcs,hopping,rballoc,
         pdu->dci_pdu_rel8.resource_block_start,
         pdu->dci_pdu_rel8.number_of_resource_block, ndi,TPC,cshift);
-
   dci_alloc->format = format0;
   dci_alloc->firstCCE = pdu->dci_pdu_rel8.cce_index;
   dci_alloc->L = pdu->dci_pdu_rel8.aggregation_level;
@@ -1844,207 +1833,190 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
   dci_alloc->ra_flag = 0;
 
   switch (frame_parms->N_RB_DL) {
-  case 6:
-    if (frame_parms->frame_type == TDD) {
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->type = 0;
-      ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_1_5MHz_TDD_1_6_t;
-    } else {
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->type = 0;
-      ((DCI0_1_5MHz_FDD_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_1_5MHz_FDD_t;
-    }
+    case 6:
+      if (frame_parms->frame_type == TDD) {
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->type = 0;
+        ((DCI0_1_5MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_1_5MHz_TDD_1_6_t;
+      } else {
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->type = 0;
+        ((DCI0_1_5MHz_FDD_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_1_5MHz_FDD_t;
+      }
 
-    break;
-
-  case 25:
-    if (frame_parms->frame_type == TDD) {
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->type = 0;
-      ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_5MHz_TDD_1_6_t;
-    } else {
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->type = 0;
-      ((DCI0_5MHz_FDD_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_5MHz_FDD_t;
-    }
+      break;
 
-    break;
-
-  case 50:
-    if (frame_parms->frame_type == TDD) {
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->type = 0;
-      ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_10MHz_TDD_1_6_t;
-    } else {
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->type = 0;
-      ((DCI0_10MHz_FDD_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_10MHz_FDD_t;
-    }
+    case 25:
+      if (frame_parms->frame_type == TDD) {
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->type = 0;
+        ((DCI0_5MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_5MHz_TDD_1_6_t;
+      } else {
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->type = 0;
+        ((DCI0_5MHz_FDD_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_5MHz_FDD_t;
+      }
 
-    break;
-
-  case 100:
-    if (frame_parms->frame_type == TDD) {
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->type = 0;
-      ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
-
-      dci_alloc->dci_length = sizeof_DCI0_20MHz_TDD_1_6_t;
-    } else {
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->cshift = cshift;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->TPC = TPC;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->mcs = mcs;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->ndi = ndi;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->hopping = hopping;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->type = 0;
-      ((DCI0_20MHz_FDD_t *) dci_pdu)->padding = 0;
-      dci_alloc->dci_length = sizeof_DCI0_20MHz_FDD_t;
-    }
+      break;
+
+    case 50:
+      if (frame_parms->frame_type == TDD) {
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->type = 0;
+        ((DCI0_10MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_10MHz_TDD_1_6_t;
+      } else {
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->type = 0;
+        ((DCI0_10MHz_FDD_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_10MHz_FDD_t;
+      }
+
+      break;
+
+    case 100:
+      if (frame_parms->frame_type == TDD) {
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->dai = dai;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->type = 0;
+        ((DCI0_20MHz_TDD_1_6_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_20MHz_TDD_1_6_t;
+      } else {
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->cqi_req = cqi_req;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->cshift = cshift;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->TPC = TPC;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->mcs = mcs;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->ndi = ndi;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->hopping = hopping;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->type = 0;
+        ((DCI0_20MHz_FDD_t *) dci_pdu)->padding = 0;
+        dci_alloc->dci_length = sizeof_DCI0_20MHz_FDD_t;
+      }
 
-    //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc);
-    break;
+      //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc);
+      break;
 
-  default:
-    LOG_E (PHY, "Invalid N_RB_DL %d\n", frame_parms->N_RB_DL);
-    DevParam (frame_parms->N_RB_DL, 0, 0);
-    break;
+    default:
+      LOG_E (PHY, "Invalid N_RB_DL %d\n", frame_parms->N_RB_DL);
+      DevParam (frame_parms->N_RB_DL, 0, 0);
+      break;
   }
 
-  if(frame_parms->frame_type == TDD){
-     UE_id = find_ulsch(pdu->dci_pdu_rel8.rnti, eNB,SEARCH_EXIST_OR_FREE);
-     if(UE_id != -1){
-       eNB->ulsch[UE_id]->harq_processes[pdu->dci_pdu_rel8.harq_pid]->V_UL_DAI = dai +1;
-     }
+  if(frame_parms->frame_type == TDD) {
+    UE_id = find_ulsch(pdu->dci_pdu_rel8.rnti, eNB,SEARCH_EXIST_OR_FREE);
+
+    if(UE_id != -1) {
+      eNB->ulsch[UE_id]->harq_processes[pdu->dci_pdu_rel8.harq_pid]->V_UL_DAI = dai +1;
+    }
   }
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int get_narrowband_index(int N_RB_UL,int rb) {
-
   switch (N_RB_UL) {
-  case 6: // 6 PRBs, N_NB=1, i_0=0
-  case 25: // 25 PRBs, N_NB=4, i_0=0
-    return(rb/6);
-    break;
-  case 50: // 50 PRBs, N_NB=8, i_0=1
-  case 75: // 75 PRBs, N_NB=12, i_0=1
-  case 15: // 15 PRBs, N_NB=2, i_0=1
-    AssertFatal(rb>=1,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
-    return((rb-1)/6);
-    break;
-  case 100: // 100 PRBs, N_NB=16, i_0=2
-    AssertFatal(rb>=2,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
-    return(rb-2/6);
-    break;
-  default:
-    AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL);
-    break;
-  }
+    case 6: // 6 PRBs, N_NB=1, i_0=0
+    case 25: // 25 PRBs, N_NB=4, i_0=0
+      return(rb/6);
+      break;
+
+    case 50: // 50 PRBs, N_NB=8, i_0=1
+    case 75: // 75 PRBs, N_NB=12, i_0=1
+    case 15: // 15 PRBs, N_NB=2, i_0=1
+      AssertFatal(rb>=1,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
+      return((rb-1)/6);
+      break;
 
+    case 100: // 100 PRBs, N_NB=16, i_0=2
+      AssertFatal(rb>=2,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
+      return(rb-2/6);
+      break;
+
+    default:
+      AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL);
+      break;
+  }
 }
-#endif
 
-void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe)
-{
+void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe) {
   uint8_t harq_pid;
   //uint8_t UE_id;
   boolean_t new_ulsch = (find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST)==-1) ? TRUE : FALSE;
-
   //AssertFatal((UE_id=find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
   //        "No existing/free UE ULSCH for rnti %x\n",ulsch_pdu->ulsch_pdu_rel8.rnti);
-
   LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
-
   int use_srs = 0;
-
   harq_pid = ulsch_pdu->ulsch_pdu_rel8.harq_process_number;
-
   ulsch->harq_mask |= 1 << harq_pid;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LOG_D(PHY,"Filling ULSCH : ue_type %d, harq_pid %d\n",ulsch->ue_type,harq_pid);
   ulsch->ue_type = ulsch_pdu->ulsch_pdu_rel13.ue_type;
   AssertFatal(harq_pid ==0 || ulsch->ue_type == NOCE, "Harq PID is not zero for BL/CE UE\n");
-#else
-  ulsch->ue_type = 0;
-#endif
 
   //AssertFatal(ulsch->harq_processes[harq_pid]->nb_rb>0,"nb_rb = 0\n");
-  if(ulsch->harq_processes[harq_pid]->nb_rb == 0){
+  if(ulsch->harq_processes[harq_pid]->nb_rb == 0) {
     LOG_E(PHY, "fill_ulsch UE_id %d nb_rb = 0\n", UE_id);
   }
 
   ulsch->harq_processes[harq_pid]->frame                                 = frame;
   ulsch->harq_processes[harq_pid]->subframe                              = subframe;
   ulsch->harq_processes[harq_pid]->handled                               = 0;
-
   ulsch->harq_processes[harq_pid]->first_rb                              = ulsch_pdu->ulsch_pdu_rel8.resource_block_start;
   ulsch->harq_processes[harq_pid]->nb_rb                                 = ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
-
-
   ulsch->harq_processes[harq_pid]->dci_alloc                             = 1;
   ulsch->harq_processes[harq_pid]->rar_alloc                             = 0;
   ulsch->harq_processes[harq_pid]->n_DMRS                                = ulsch_pdu->ulsch_pdu_rel8.cyclic_shift_2_for_drms;
-  
   ulsch->harq_processes[harq_pid]->Nsymb_pusch                           = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
   ulsch->harq_processes[harq_pid]->srs_active                            = use_srs;
-  
+
   //Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1)
   if(ulsch->harq_processes[harq_pid]->n_DMRS == 0)
     ulsch->harq_processes[harq_pid]->n_DMRS2 = 0;
@@ -2062,28 +2034,28 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
     ulsch->harq_processes[harq_pid]->n_DMRS2 = 10;
   else if(ulsch->harq_processes[harq_pid]->n_DMRS == 7)
     ulsch->harq_processes[harq_pid]->n_DMRS2 = 9;
-  
-  LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d ulsch_pdu->ulsch_pdu_rel8.size %d\n",
-	eNB->Mod_id,harq_pid,frame,subframe,
+
+  LOG_D(PHY,
+        "[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d ulsch_pdu->ulsch_pdu_rel8.size %d\n",
+        eNB->Mod_id,harq_pid,frame,subframe,
         ulsch->harq_processes[harq_pid]->n_DMRS2,
         ulsch->harq_processes[harq_pid]->n_DMRS,
-	ulsch->harq_processes[harq_pid]->ndi, ulsch_pdu->ulsch_pdu_rel8.new_data_indication, new_ulsch, ulsch->harq_processes[harq_pid]->status,
-	ulsch_pdu->ulsch_pdu_rel8.redundancy_version,
+        ulsch->harq_processes[harq_pid]->ndi, ulsch_pdu->ulsch_pdu_rel8.new_data_indication, new_ulsch, ulsch->harq_processes[harq_pid]->status,
+        ulsch_pdu->ulsch_pdu_rel8.redundancy_version,
         ulsch_pdu->ulsch_pdu_rel8.size);
-  
   ulsch->harq_processes[harq_pid]->rvidx = ulsch_pdu->ulsch_pdu_rel8.redundancy_version;
+
   if(ulsch_pdu->ulsch_pdu_rel8.modulation_type!=0)
-  ulsch->harq_processes[harq_pid]->Qm    = ulsch_pdu->ulsch_pdu_rel8.modulation_type;
-  // Set O_ACK to 0 by default, will be set of DLSCH is scheduled and needs to be 
+    ulsch->harq_processes[harq_pid]->Qm    = ulsch_pdu->ulsch_pdu_rel8.modulation_type;
+
+  // Set O_ACK to 0 by default, will be set of DLSCH is scheduled and needs to be
   ulsch->harq_processes[harq_pid]->O_ACK         = 0;
 
   if ((ulsch->harq_processes[harq_pid]->status == SCH_IDLE) ||
       (ulsch->harq_processes[harq_pid]->ndi    != ulsch_pdu->ulsch_pdu_rel8.new_data_indication) ||
-	  (new_ulsch == TRUE)){
+      (new_ulsch == TRUE)) {
     ulsch->harq_processes[harq_pid]->status        = ACTIVE;
-    
     ulsch->harq_processes[harq_pid]->TBS           = ulsch_pdu->ulsch_pdu_rel8.size<<3;
-    
     ulsch->harq_processes[harq_pid]->Msc_initial   = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
     ulsch->harq_processes[harq_pid]->Nsymb_initial = ulsch->harq_processes[harq_pid]->Nsymb_pusch;
     ulsch->harq_processes[harq_pid]->round         = 0;
@@ -2093,64 +2065,64 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
     // will be set if MAC has activated ULSCH_CQI_RI_PDU or ULSCH_CQI_HARQ_RI_PDU
     ulsch->harq_processes[harq_pid]->Or1           = 0;
     ulsch->harq_processes[harq_pid]->Or2           = 0;
+  } else {
+    ulsch->harq_processes[harq_pid]->round++;
+    ulsch->harq_processes[harq_pid]->TBS           = ulsch_pdu->ulsch_pdu_rel8.size<<3;
+    ulsch->harq_processes[harq_pid]->Msc_initial   = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
   }
-  else {
-      ulsch->harq_processes[harq_pid]->round++;
-      ulsch->harq_processes[harq_pid]->TBS           = ulsch_pdu->ulsch_pdu_rel8.size<<3;
-      ulsch->harq_processes[harq_pid]->Msc_initial   = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
-  }
+
   ulsch->rnti = ulsch_pdu->ulsch_pdu_rel8.rnti;
   LOG_D(PHY,"Filling ULSCH %x (UE_id %d) (new_ulsch %d) for Frame %d, Subframe %d : harq_pid %d, status %d, handled %d, first_rb %d, nb_rb %d, rvidx %d, Qm %d, TBS %d, round %d \n",
-	ulsch->rnti,
+        ulsch->rnti,
         UE_id,
         new_ulsch,
-	frame,
-	subframe,
-	harq_pid,
-	ulsch->harq_processes[harq_pid]->status,
-	ulsch->harq_processes[harq_pid]->handled,
-	ulsch->harq_processes[harq_pid]->first_rb,
-	ulsch->harq_processes[harq_pid]->nb_rb,
-	ulsch->harq_processes[harq_pid]->rvidx,
-	ulsch->harq_processes[harq_pid]->Qm,
-	ulsch->harq_processes[harq_pid]->TBS,
-	ulsch->harq_processes[harq_pid]->round);  
+        frame,
+        subframe,
+        harq_pid,
+        ulsch->harq_processes[harq_pid]->status,
+        ulsch->harq_processes[harq_pid]->handled,
+        ulsch->harq_processes[harq_pid]->first_rb,
+        ulsch->harq_processes[harq_pid]->nb_rb,
+        ulsch->harq_processes[harq_pid]->rvidx,
+        ulsch->harq_processes[harq_pid]->Qm,
+        ulsch->harq_processes[harq_pid]->TBS,
+        ulsch->harq_processes[harq_pid]->round);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 
 int get_first_rb_in_narrowband(int N_RB_UL,
-		                       int rb)
-{
+                               int rb) {
   switch (N_RB_UL) {
-  case 6: // 6 PRBs, N_NB=1, i_0=0
-  case 25: // 25 PRBs, N_NB=4, i_0=0
-    return(rb - 6*(rb/6));
-    break;
-  case 50: // 50 PRBs, N_NB=8, i_0=1
-  case 75: // 75 PRBs, N_NB=12, i_0=1
-  case 15: // 15 PRBs, N_NB=2, i_0=1
-    AssertFatal(rb>=1,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
-    return(rb-1-(6*((rb-1)/6)));
-    break;
-  case 100: // 100 PRBs, N_NB=16, i_0=2
-    AssertFatal(rb>=2,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
-    return(rb-2-(6*((rb-2)/6)));
-    break;
-  default:
-    AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL);
-    break;
+    case 6: // 6 PRBs, N_NB=1, i_0=0
+    case 25: // 25 PRBs, N_NB=4, i_0=0
+      return(rb - 6*(rb/6));
+      break;
+
+    case 50: // 50 PRBs, N_NB=8, i_0=1
+    case 75: // 75 PRBs, N_NB=12, i_0=1
+    case 15: // 15 PRBs, N_NB=2, i_0=1
+      AssertFatal(rb>=1,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
+      return(rb-1-(6*((rb-1)/6)));
+      break;
+
+    case 100: // 100 PRBs, N_NB=16, i_0=2
+      AssertFatal(rb>=2,"rb %d is not possible for %d PRBs\n",rb,N_RB_UL);
+      return(rb-2-(6*((rb-2)/6)));
+      break;
+
+    default:
+      AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL);
+      break;
   }
 }
 
-void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB,
-		               L1_rxtx_proc_t * proc,
-					   mDCI_ALLOC_t * dci_alloc,
-					   nfapi_hi_dci0_mpdcch_dci_pdu * pdu)
-{
+void fill_mpdcch_dci0 (PHY_VARS_eNB *eNB,
+                       L1_rxtx_proc_t *proc,
+                       mDCI_ALLOC_t *dci_alloc,
+                       nfapi_hi_dci0_mpdcch_dci_pdu *pdu) {
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
   nfapi_hi_dci0_mpdcch_dci_pdu_rel13_t *rel13 = &pdu->mpdcch_dci_pdu_rel13;
-
   uint32_t        cqi_req = rel13->csi_request;
   uint32_t        TPC = rel13->tpc;
   uint32_t        mcs = rel13->mcs;
@@ -2159,9 +2131,7 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB,
   uint32_t        rballoc = computeRIV (6,
                                         get_first_rb_in_narrowband(frame_parms->N_RB_UL,rel13->resource_block_start),
                                         rel13->number_of_resource_blocks);
-
   uint32_t        ndi = rel13->new_data_indication;
-
 #ifdef T_TRACER
   T (T_ENB_PHY_ULSCH_UE_DCI, T_INT (eNB->Mod_id), T_INT (proc->frame_tx), T_INT (proc->subframe_tx),
      T_INT (rel13->rnti), T_INT (((proc->frame_tx * 10 + proc->subframe_tx + 4) % 8) /* TODO: correct harq pid */ ),
@@ -2170,15 +2140,10 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB,
      T_INT (rel13->number_of_resource_blocks),
      T_INT (get_TBS_UL (mcs, rel13->number_of_resource_blocks) * 8), T_INT (rel13->aggreagation_level), T_INT (rel13->ecce_index));
 #endif
-
   void           *dci_pdu = (void *) dci_alloc->dci_pdu;
-
   AssertFatal(rel13->ce_mode == 1 && rel13->dci_format == 4, "dci format 5 (CE_modeB) not supported yet\n");
-
-
   LOG_D (PHY, "Filling DCI6-0A with cqi %d, mcs %d, hopping %d, rballoc %x (%d,%d) ndi %d TPC %d\n", cqi_req,
          mcs, hopping, rballoc, rel13->resource_block_start, rel13->number_of_resource_blocks, ndi, TPC);
-
   dci_alloc->format = format6_0A;
   dci_alloc->firstCCE = rel13->ecce_index;
   dci_alloc->L = rel13->aggreagation_level;
@@ -2193,106 +2158,104 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB,
   dci_alloc->dmrs_scrambling_init = rel13->drms_scrambling_init;
   dci_alloc->i0 = rel13->initial_transmission_sf_io;
 
-
   switch (frame_parms->N_RB_DL) {
-  case 6:
-    if (frame_parms->frame_type == TDD) {
-      AssertFatal(1==0,"TDD not supported for eMTC yet\n");
-    } else {
-      AssertFatal(1==0,"6 PRBS not supported for eMTC\n");
-    }
+    case 6:
+      if (frame_parms->frame_type == TDD) {
+        AssertFatal(1==0,"TDD not supported for eMTC yet\n");
+      } else {
+        AssertFatal(1==0,"6 PRBS not supported for eMTC\n");
+      }
 
-    break;
-
-  case 25:
-    if (frame_parms->frame_type == TDD) {
-      AssertFatal(1==0,"TDD not supported for eMTC yet\n");
-    } else {
-      dci_alloc->dci_length = sizeof_DCI6_0A_5MHz_t;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->type = 0;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->hopping = hopping;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->narrowband = narrowband;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->mcs = mcs;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->ndi = ndi;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->TPC = TPC;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->csi_req = cqi_req;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_0A_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+      break;
 
-    }
+    case 25:
+      if (frame_parms->frame_type == TDD) {
+        AssertFatal(1==0,"TDD not supported for eMTC yet\n");
+      } else {
+        dci_alloc->dci_length = sizeof_DCI6_0A_5MHz_t;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->type = 0;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->hopping = hopping;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->narrowband = narrowband;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->mcs = mcs;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->ndi = ndi;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->TPC = TPC;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->csi_req = cqi_req;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+        ((DCI6_0A_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+      }
 
-    break;
-
-  case 50:
-    if (frame_parms->frame_type == TDD) {
-      AssertFatal(1==0,"TDD not supported for eMTC yet\n");
-    } else {
-      dci_alloc->dci_length = sizeof_DCI6_0A_10MHz_t;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->type = 0;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->hopping = hopping;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->narrowband = narrowband;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->mcs = mcs;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->ndi = ndi;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->TPC = TPC;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->csi_req = cqi_req;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-      LOG_D(PHY,"Frame %d, Subframe %d : Programming Format 6-0A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, csi_req %d, srs_req %d, dci_rep r%d => %x\n",
-	    proc->frame_tx,proc->subframe_tx,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->type,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->hopping,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->narrowband,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->rballoc,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->mcs,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->rep,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->ndi,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->rv_idx,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->TPC,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->csi_req,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->srs_req,
-	    ((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep,
-	    ((uint32_t*)dci_pdu)[0]);
+      break;
 
-    }
+    case 50:
+      if (frame_parms->frame_type == TDD) {
+        AssertFatal(1==0,"TDD not supported for eMTC yet\n");
+      } else {
+        dci_alloc->dci_length = sizeof_DCI6_0A_10MHz_t;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->type = 0;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->hopping = hopping;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->narrowband = narrowband;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->mcs = mcs;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->ndi = ndi;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->TPC = TPC;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->csi_req = cqi_req;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+        ((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+        LOG_D(PHY,
+              "Frame %d, Subframe %d : Programming Format 6-0A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, csi_req %d, srs_req %d, dci_rep r%d => %x\n",
+              proc->frame_tx,proc->subframe_tx,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->type,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->hopping,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->narrowband,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->rballoc,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->mcs,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->rep,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->ndi,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->rv_idx,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->TPC,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->csi_req,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->srs_req,
+              ((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep,
+              ((uint32_t *)dci_pdu)[0]);
+      }
 
-    break;
-
-  case 100:
-    if (frame_parms->frame_type == TDD) {
-      AssertFatal(1==0,"TDD not supported for eMTC yet\n");
-    } else {
-      dci_alloc->dci_length = sizeof_DCI6_0A_20MHz_t;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->type = 0;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->hopping = hopping;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->rballoc = rballoc;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->narrowband = narrowband;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->ndi = ndi;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->TPC = TPC;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->csi_req = cqi_req;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
-      ((DCI6_0A_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
-    }
+      break;
+
+    case 100:
+      if (frame_parms->frame_type == TDD) {
+        AssertFatal(1==0,"TDD not supported for eMTC yet\n");
+      } else {
+        dci_alloc->dci_length = sizeof_DCI6_0A_20MHz_t;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->type = 0;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->hopping = hopping;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->rballoc = rballoc;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->narrowband = narrowband;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->ndi = ndi;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->TPC = TPC;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->csi_req = cqi_req;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
+        ((DCI6_0A_20MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
+      }
 
-    //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc);
-    break;
+      //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc);
+      break;
 
-  default:
-    LOG_E (PHY, "Invalid N_RB_DL %d\n", frame_parms->N_RB_DL);
-    DevParam (frame_parms->N_RB_DL, 0, 0);
-    break;
+    default:
+      LOG_E (PHY, "Invalid N_RB_DL %d\n", frame_parms->N_RB_DL);
+      DevParam (frame_parms->N_RB_DL, 0, 0);
+      break;
   }
 }
-#endif
+
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
index a910ce9928dd405b3395186215ea823ed73b368c..2e8ddde8488a2e59e37455ea50f5dfb54308b9cc 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
@@ -48,18 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
                       int G,
                       uint8_t q,
                       uint16_t frame,
-                      uint8_t Ns)
-{
-
+                      uint8_t Ns) {
   int n;
   //  uint8_t reset;
   uint32_t x1, x2, s=0;
   uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
   uint8_t *e=dlsch_e;
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   // Rule for accumulation of subframes for BL/CE UEs
   uint8_t Nacc=4;
   uint16_t j0,j,idelta;
@@ -69,122 +64,116 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
 #else
   uint16_t i0 = dlsch->i0;
 #endif
-
 #ifdef PHY_TX_THREAD
+
   if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1)                              Nacc=1;
+
 #else
+
   if (dlsch->sib1_br_flag==1)                              Nacc=1;
+
 #endif
   else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
+
 #ifdef PHY_TX_THREAD
   // Note: above SC-RNTI will also have to be added when/if implemented
   else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA)                       Nacc=1;
   else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB)                       Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
+
 #else
   // Note: above SC-RNTI will also have to be added when/if implemented
   else if (dlsch->CEmode == CEmodeA)                       Nacc=1;
   else if (dlsch->CEmode == CEmodeB)                       Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
+
 #endif
 
   if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
   else                                             idelta = Nacc-2;
 
   j0 = (i0+idelta)/Nacc;
-  j  = (i - i0)/Nacc; 
-#endif
+  j  = (i - i0)/Nacc;
 
   //  reset = 1;
   // x1 is set in lte_gold_generic
   if (mbsfn_flag == 0) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #ifdef PHY_TX_THREAD
+
     if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
 #else
+
     if (dlsch->i0 != 0xFFFF) {
 #endif
       // rule for BL/CE UEs from Section 6.3.1 in 36.211
       x2=  (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
+
       if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2);
-    }
-    else
-#endif
-    x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
+    } else
+      x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
   } else {
     x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH
   }
 
 #ifdef DEBUG_SCRAMBLING
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
-#else
-  printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
-#endif
 #endif
   s = lte_gold_generic(&x1, &x2, 1);
 
   for (n=0; n<(1+(G>>5)); n++) {
-
 #ifdef DEBUG_SCRAMBLING
-    for (int k=0;k<32;k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
-#endif
 
-                
-    e[0] = (e[0]) ^ (s&1);      
-    e[1] = (e[1]) ^ ((s>>1)&1);      
-    e[2] = (e[2]) ^ ((s>>2)&1);      
-    e[3] = (e[3]) ^ ((s>>3)&1);      
-    e[4] = (e[4]) ^ ((s>>4)&1);      
-    e[5] = (e[5]) ^ ((s>>5)&1);      
-    e[6] = (e[6]) ^ ((s>>6)&1);      
-    e[7] = (e[7]) ^ ((s>>7)&1);      
-    e[8] = (e[8]) ^ ((s>>8)&1);      
-    e[9] = (e[9]) ^ ((s>>9)&1);      
-    e[10] = (e[10]) ^ ((s>>10)&1);      
-    e[11] = (e[11]) ^ ((s>>11)&1);      
-    e[12] = (e[12]) ^ ((s>>12)&1);      
-    e[13] = (e[13]) ^ ((s>>13)&1);      
-    e[14] = (e[14]) ^ ((s>>14)&1);      
-    e[15] = (e[15]) ^ ((s>>15)&1);      
-    e[16] = (e[16]) ^ ((s>>16)&1);      
-    e[17] = (e[17]) ^ ((s>>17)&1);      
-    e[18] = (e[18]) ^ ((s>>18)&1);      
-    e[19] = (e[19]) ^ ((s>>19)&1);      
-    e[20] = (e[20]) ^ ((s>>20)&1);      
-    e[21] = (e[21]) ^ ((s>>21)&1);      
-    e[22] = (e[22]) ^ ((s>>22)&1);      
-    e[23] = (e[23]) ^ ((s>>23)&1);      
-    e[24] = (e[24]) ^ ((s>>24)&1);      
-    e[25] = (e[25]) ^ ((s>>25)&1);      
-    e[26] = (e[26]) ^ ((s>>26)&1);      
-    e[27] = (e[27]) ^ ((s>>27)&1);      
-    e[28] = (e[28]) ^ ((s>>28)&1);      
-    e[29] = (e[29]) ^ ((s>>29)&1);      
-    e[30] = (e[30]) ^ ((s>>30)&1);      
-    e[31] = (e[31]) ^ ((s>>31)&1);      
-    
+    for (int k=0; k<32; k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
+
+#endif
+    e[0] = (e[0]) ^ (s&1);
+    e[1] = (e[1]) ^ ((s>>1)&1);
+    e[2] = (e[2]) ^ ((s>>2)&1);
+    e[3] = (e[3]) ^ ((s>>3)&1);
+    e[4] = (e[4]) ^ ((s>>4)&1);
+    e[5] = (e[5]) ^ ((s>>5)&1);
+    e[6] = (e[6]) ^ ((s>>6)&1);
+    e[7] = (e[7]) ^ ((s>>7)&1);
+    e[8] = (e[8]) ^ ((s>>8)&1);
+    e[9] = (e[9]) ^ ((s>>9)&1);
+    e[10] = (e[10]) ^ ((s>>10)&1);
+    e[11] = (e[11]) ^ ((s>>11)&1);
+    e[12] = (e[12]) ^ ((s>>12)&1);
+    e[13] = (e[13]) ^ ((s>>13)&1);
+    e[14] = (e[14]) ^ ((s>>14)&1);
+    e[15] = (e[15]) ^ ((s>>15)&1);
+    e[16] = (e[16]) ^ ((s>>16)&1);
+    e[17] = (e[17]) ^ ((s>>17)&1);
+    e[18] = (e[18]) ^ ((s>>18)&1);
+    e[19] = (e[19]) ^ ((s>>19)&1);
+    e[20] = (e[20]) ^ ((s>>20)&1);
+    e[21] = (e[21]) ^ ((s>>21)&1);
+    e[22] = (e[22]) ^ ((s>>22)&1);
+    e[23] = (e[23]) ^ ((s>>23)&1);
+    e[24] = (e[24]) ^ ((s>>24)&1);
+    e[25] = (e[25]) ^ ((s>>25)&1);
+    e[26] = (e[26]) ^ ((s>>26)&1);
+    e[27] = (e[27]) ^ ((s>>27)&1);
+    e[28] = (e[28]) ^ ((s>>28)&1);
+    e[29] = (e[29]) ^ ((s>>29)&1);
+    e[30] = (e[30]) ^ ((s>>30)&1);
+    e[31] = (e[31]) ^ ((s>>31)&1);
     // This is not faster for some unknown reason
     //    ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
     //    ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
-
-
-    
     s = lte_gold_generic(&x1, &x2, 0);
     e += 32;
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
-
 }
 
 
 
 void init_scrambling_lut(void) {
-
   uint32_t s;
   int i=0,j;
 
-  for (s=0;s<=65535;s++) {
-    for (j=0;j<16;j++) {
+  for (s=0; s<=65535; s++) {
+    for (j=0; j<16; j++) {
       scrambling_lut[i++] = (uint8_t)((s>>j)&1);
     }
   }
@@ -194,11 +183,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
                         int mbsfn_flag,
                         LTE_UE_DLSCH_t *dlsch,
                         int G,
-                        int16_t* llr,
+                        int16_t *llr,
                         uint8_t q,
-                        uint8_t Ns)
-{
-
+                        uint8_t Ns) {
   int i,j,k=0;
   //  uint8_t reset;
   uint32_t x1, x2, s=0;
@@ -212,14 +199,14 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
     x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1
 
 #ifdef DEBUG_SCRAMBLING
-    printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2);
+  printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2);
 #endif
   s = lte_gold_generic(&x1, &x2, 1);
 
   for (i=0; i<(1+(G>>5)); i++) {
     for (j=0; j<32; j++,k++) {
 #ifdef DEBUG_SCRAMBLING
-    printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1);
+      printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1);
 #endif
       llr[k] = ((2*((s>>j)&1))-1)*llr[k];
 #ifdef DEBUG_SCRAMBLING
@@ -232,12 +219,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
 }
 
 void init_unscrambling_lut(void) {
-
   uint32_t s;
   int i=0,j;
 
-  for (s=0;s<=65535;s++) {
-    for (j=0;j<16;j++) {
+  for (s=0; s<=65535; s++) {
+    for (j=0; j<16; j++) {
       unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
     }
   }
diff --git a/openair1/PHY/LTE_TRANSPORT/edci.c b/openair1/PHY/LTE_TRANSPORT/edci.c
index 0df94e55e55e52698607f22c30f37ab28d014c0e..34cb705b00ff5b7ef12962702c35467bfc4fdc0d 100644
--- a/openair1/PHY/LTE_TRANSPORT/edci.c
+++ b/openair1/PHY/LTE_TRANSPORT/edci.c
@@ -49,22 +49,18 @@
 //#define DEBUG_DCI_DECODING 1
 //#define DEBUG_PHY
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
 
+void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
 }
 
-void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, uint16_t i, uint8_t * e, uint32_t length)
-{
+void mpdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, mDCI_ALLOC_t *mdci, uint16_t i, uint8_t *e, uint32_t length) {
   int             n;
   uint8_t         reset;
   uint32_t        x1, x2, s = 0;
   uint8_t         Nacc = 4;
   uint16_t        j0, j, idelta;
   uint16_t        i0 = mdci->i0;
-
   // Note: we could actually not do anything if i-i0 < Nacc, save it for later
-
   reset = 1;
   // x1 is set in lte_gold_generic
 
@@ -80,12 +76,11 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
 
   j0 = (i0 + idelta) / Nacc;
   j = (i - i0) / Nacc;
-
-
   // rule for BL/CE UEs from Section 6.8.B2 in 36.211
   x2 = ((((j0 + j) * Nacc) % 10) << 9) + mdci->dmrs_scrambling_init;
   LOG_D(PHY,"MPDCCH cinit = %x (mdci->dmrs_scrambling_init = %d), scrambling %d encoded DCI bits\n",
-	x2,mdci->dmrs_scrambling_init,length);
+        x2,mdci->dmrs_scrambling_init,length);
+
   for (n = 0; n < length; n++) {
     if ((n & 0x1f) == 0) {
       s = lte_gold_generic(&x1, &x2, reset);
@@ -94,7 +89,6 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
     }
 
     e[n] = (e[n] & 1) ^ ((s >> (n & 0x1f)) & 1);
-
   }
 }
 
@@ -105,23 +99,23 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
 // Total = 648+216 = 864 REs = 1728 bits
 static uint16_t mpdcch5ss1tab[864];
 
-void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
-{
+void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
   int             l, k, kmod, re=0;
-
   LOG_D(PHY, "Inititalizing mpdcchss15tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
 
   for (l = 1; l < 14; l++) {
     for (k = 0; k < 72; k++) {
       kmod = k % 12;
+
       if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
         mpdcch5ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
         re++;
       } else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
-	    mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
       }
     }
   }
+
   AssertFatal(re == 864, "RE count not equal to 864 (%d)\n", re);
 }
 
@@ -132,28 +126,31 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
 // Total = 576+216 = 792 REs = 1584 bits
 static uint16_t mpdcch5ss2tab[792];
 
-void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
-{
+void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
   int             l, k, kmod, re=0;
   int nushift = eNB->frame_parms.Nid_cell % 6;
   int nushiftp3 = (eNB->frame_parms.Nid_cell+3) % 6;
   // NOTE : THIS IS FOR TM1 ONLY FOR NOW!!!!!!!
   LOG_D(PHY, "Inititalizing mpdcch5ss2tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
+
   for (l = 2; l < 14; l++) {
     for (k = 0; k < 72; k++) {
       kmod = k % 12;
-      if ((((l == 4)||(l==11)) && (kmod != nushiftp3) && (kmod != (nushiftp3+6))) || 
-	  ((l == 7) && (kmod != nushift) &&(kmod != (nushift+6)))) {  // CS RS
-	mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
-	re++;
+
+      if ((((l == 4)||(l==11)) && (kmod != nushiftp3) && (kmod != (nushiftp3+6))) ||
+          ((l == 7) && (kmod != nushift) &&(kmod != (nushift+6)))) {  // CS RS
+        mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        re++;
       }
-      if (((l!=4)&&(l!=7)&&(l!=11)) && 
-	  (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9))) {
-	mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
-	re++;
+
+      if (((l!=4)&&(l!=7)&&(l!=11)) &&
+          (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9))) {
+        mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        re++;
       }
     }
   }
+
   AssertFatal(re == 684, "RE count not equal to 684\n");
 }
 
@@ -163,22 +160,23 @@ void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
 // 4 symbols with DMRS (3 REs stolen per symbol = 4*9*6 REs = 216 REs
 // Total = 504+216 = 720 REs = 1440 bits
 static uint16_t mpdcch5ss3tab[720];
-void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
-{
+void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
   int             l, k, kmod, re=0;
-
   LOG_D(PHY, "Inititalizing mpdcch5ss3tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
+
   for (l = 3; l < 14; l++) {
     for (k = 0; k < 72; k++) {
       kmod = k % 12;
+
       if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
-	mpdcch5ss3tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
-	re++;
+        mpdcch5ss3tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        re++;
       } else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
-	mpdcch5ss3tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        mpdcch5ss3tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
       }
     }
   }
+
   AssertFatal(re == 720, "RE count not equal to 792\n");
 }
 
@@ -189,20 +187,21 @@ void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
 // Total = 432+144 = 576 = 16CCE*36RE/CCE
 static uint16_t mpdcch3ss1tab[576];
 
-void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
-{
+void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
   int             l, k, kmod, re=0;
-
   LOG_D(PHY, "Inititalizing mpdcch3ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
+
   for (l = 1, re = 0; l < 14; l++) {
     for (k = 0; k < 48; k++) {
       kmod = k % 12;
+
       if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
-	mpdcch3ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
-	re++;
+        mpdcch3ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        re++;
       }
     }
   }
+
   AssertFatal(re == 576, "RE count not equal to 864\n");
 }
 
@@ -213,34 +212,33 @@ void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
 // Total = 216+72 = 288 = 8CCE*36RE/CCE
 static uint16_t mpdcch2ss1tab[288];
 
-void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
-{
+void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
   int             l, k, kmod, re=0;
-
   LOG_D(PHY, "Inititalizing mpdcch2ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
+
   for (l = 1, re = 0; l < 14; l++) {
     for (k = 0; k < 24; k++) {
       kmod = k % 12;
+
       if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
-	mpdcch2ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
-	re++;
+        mpdcch2ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
+        re++;
       }
     }
   }
+
   AssertFatal(re == 288, "RE count not equal to 288\n");
 }
 
 
 
 
-extern uint8_t *generate_dci0(uint8_t * dci, uint8_t * e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
+extern uint8_t *generate_dci0(uint8_t *dci, uint8_t *e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
 
 
 uint16_t        mpdcch_dmrs_tab[12 * 6];
 
-void init_mpdcch_dmrs_tab(uint16_t oss)
-{
-
+void init_mpdcch_dmrs_tab(uint16_t oss) {
   int             re = 5 * oss;
   int             pos = 0;
 
@@ -250,6 +248,7 @@ void init_mpdcch_dmrs_tab(uint16_t oss)
       mpdcch_dmrs_tab[pos++] = re + 5;
       mpdcch_dmrs_tab[pos++] = re + 10;
     }
+
     if (symb == 0)
       re = 6 * oss;
     else if (symb == 1)
@@ -257,12 +256,9 @@ void init_mpdcch_dmrs_tab(uint16_t oss)
     else if (symb == 2)
       re = 13 * oss;
   }
-
 }
 
-void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF)
-{
-
+void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe, int16_t amp, int32_t **txdataF) {
   LTE_eNB_MPDCCH *mpdcch = &eNB->mpdcch_vars[subframe & 1];
   mDCI_ALLOC_t   *mdci;
   int             coded_bits;
@@ -270,40 +266,30 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
   int             i;
   int             gain_lin_QPSK;
   uint16_t       *mpdcchtab;
-
   uint32_t        x1, x2, s = 0;
   uint8_t         Nacc = 4;
   uint16_t        j0, j, idelta;
   uint16_t        i0;
-
   int             off=0;
-
   // Assumption: only handle a single MPDCCH per narrowband
-
   int nsymb = (fp->Ncp==0) ? 14:12;
-
   int symbol_offset = (uint32_t)fp->ofdm_symbol_size*(subframe*nsymb);
-
   int wp[2][4] = {{1,1,1,1},{1,-1,1,-1}};
   int *w;
-
   LOG_D(PHY, "generate_mdci_top: num_dci %d\n", mpdcch->num_dci);
 
   for (i = 0; i < mpdcch->num_dci; i++) {
     mdci = &mpdcch->mdci_alloc[i];
-
     AssertFatal(fp->frame_type == FDD, "TDD is not yet supported for MPDCCH\n");
     AssertFatal(fp->Ncp == NORMAL, "Extended Prefix not yet supported for MPDCCH\n");
     AssertFatal(mdci->L <= 24, "L is %d\n", mdci->L);
     AssertFatal(fp->N_RB_DL == 50 || fp->N_RB_DL == 100, "Only N_RB_DL=50,100 for MPDCCH\n");
     // Force MPDDCH format 5
     AssertFatal(mdci->number_of_prb_pairs == 6, "2 or 4 PRB pairs not support yet for MPDCCH\n");
-
     // These are to avoid unimplemented things
     AssertFatal(mdci->ce_mode == 1, "CE mode (%d) B not activated yet\n", mdci->ce_mode);
     AssertFatal(mdci->L == 24, "Only 2+4 and aggregation 24 for now\n");
     int     a_index=mdci->rnti & 3;
-
     i0 = mdci->i0;
     // antenna index
 
@@ -319,27 +305,20 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
     } else
       AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index);
 
-    LOG_D(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n", 
-	  i, mdci->dci_length,mdci->rnti, 
-	  mdci->L, mdci->number_of_prb_pairs, 
-	  mdci->ce_mode, 
-	  mdci->transmission_type == 1? "dist" : "loc",
-	  mdci->i0, mdci->start_symbol,
-	  coded_bits);
-
+    LOG_D(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
+          i, mdci->dci_length,mdci->rnti,
+          mdci->L, mdci->number_of_prb_pairs,
+          mdci->ce_mode,
+          mdci->transmission_type == 1? "dist" : "loc",
+          mdci->i0, mdci->start_symbol,
+          coded_bits);
     // Note: We only have to run this every Nacc subframes during repetitions, data and scrambling are constant, but we do it for now to simplify during testing
-
     generate_dci0(mdci->dci_pdu, mpdcch->e, mdci->dci_length, coded_bits, mdci->rnti);
-
-
-
     // scrambling
     uint16_t        absSF = (frame * 10) + subframe;
-
     AssertFatal(absSF < 10240, "Absolute subframe %d = %d*10 + %d > 10239\n", absSF, frame, subframe);
-
     mpdcch_scrambling(fp, mdci, absSF, mpdcch->e, coded_bits);
-    
+
     // Modulation for PDCCH
     if (fp->nb_antenna_ports_eNB == 1)
       gain_lin_QPSK = (int16_t) ((amp * ONE_OVER_SQRT2_Q15) >> 15);
@@ -347,37 +326,39 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
       gain_lin_QPSK = amp / 2;
 
     uint8_t        *e_ptr = mpdcch->e;
-
     //    if (mdci->transmission_type==0) nprime=mdci->rnti&3; // for Localized 2+4 we use 6.8B.5 rule
     // map directly to one antenna port for now
     // Note: aside from the antenna port mapping, there is no difference between localized and distributed transmission for MPDCCH format 5
-
     // first RE of narrowband
     // mpdcchtab5 below contains the mapping from each coded symbol to relative RE avoiding the DMRS
-
     int             nb_i0;
-    switch (fp->N_RB_DL) {
 
-    case 6:
-    case 25:
-      nb_i0 = 0;
-      break;
-    case 15:
-    case 50:
-    case 75:
-      nb_i0 = 1;
-      break;
-    case 100:
-      nb_i0 = 2;
-      break;
-    default:
-      AssertFatal(1 == 0, "Illegal N_RB_DL %d\n", fp->N_RB_DL);
-      break;
+    switch (fp->N_RB_DL) {
+      case 6:
+      case 25:
+        nb_i0 = 0;
+        break;
+
+      case 15:
+      case 50:
+      case 75:
+        nb_i0 = 1;
+        break;
+
+      case 100:
+        nb_i0 = 2;
+        break;
+
+      default:
+        AssertFatal(1 == 0, "Illegal N_RB_DL %d\n", fp->N_RB_DL);
+        break;
     }
 
     int             re_offset = fp->first_carrier_offset + (12 * nb_i0) + (mdci->narrowband * 12 * 6);
+
     if (re_offset > fp->ofdm_symbol_size)
       re_offset -= (fp->ofdm_symbol_size - 1);
+
     int32_t        *txF = &txdataF[0][symbol_offset+re_offset];
     int32_t         yIQ;
 
@@ -388,14 +369,15 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
       ((int16_t *) & yIQ)[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
       e_ptr++;
       txF[mpdcchtab[i]] = yIQ;
-      /*      
+      /*
       LOG_I(PHY,"Frame %d, subframe %d: mpdcch pos %d (%d,%d) => (%d,%d)\n",
-	    frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
-	    ((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
+      frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
+      ((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
     }
 
     if (mdci->transmission_type == 1) w=0; // distributed
     else w = wp[a_index&1];
+
     // pilot scrambling initiatlization (note: this is for a single repetition)
 
     // x1 is set in lte_gold_generic
@@ -414,70 +396,64 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
 
     j0 = (i0 + idelta) / Nacc;
     j = (absSF - i0) / Nacc;
-
-
-
     uint32_t        a = ((((j0 + j) * Nacc) % 10) + 1);
     uint32_t        b = ((mdci->dmrs_scrambling_init << 1) + 1) << 16;
     x2 = a * b;
     x2 = x2 + 2;
     LOG_D(PHY, "mpdcch_dmrs cinit %x (a=%d,b=%d,i0=%d,j0=%d)\n", x2,a,b,i0,j0);
-
     // add MPDCCH pilots
     int             reset = 1;
-
     int first_prb = (mdci->narrowband*6) + nb_i0;
     int last_prb  = (mdci->narrowband*6) + nb_i0 + 5;
     int soffset[4] = {5,6,12,13};
 
-
-    for (int lprime=0,i=0;lprime<4;lprime++) {
-      for (int nprb=0;nprb<110;nprb++) {
-	if (nprb<fp->N_RB_DL) {
-	  re_offset = fp->first_carrier_offset + (12 * nprb);
-	  if (re_offset > fp->ofdm_symbol_size)
-	    re_offset -= (fp->ofdm_symbol_size - 1);
-	  txF = &txdataF[0][symbol_offset + re_offset + fp->ofdm_symbol_size*soffset[lprime]];
-	}
-	for (int mprime=0;mprime<3;mprime++,i+=2) {
-	
-	  if ((i & 0x1f) == 0) {
-	    s = lte_gold_generic(&x1, &x2, reset);
-	    reset = 0;
-	  }
-
-	  // select PRBs corresponding to narrowband
-	  if ((nprb>= first_prb) && 
-	      (nprb<= last_prb)) {
-	    ((int16_t *) & yIQ)[0] = (((s >> (i & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
-	    ((int16_t *) & yIQ)[1] = (((s >> ((i + 1) & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
-	    AssertFatal(mdci->transmission_type==1,"transmission_type %d!=1, handle this ...\n",mdci->transmission_type);
-	    if (mdci->transmission_type==1) { // same thing on both 107 and 109
-	      txF[(5*mprime)] = yIQ;
-	      txF[1+(5*mprime)] = yIQ;
-	    }
-	    else { // put on selected antenna port with w sequence
-
-	      if (((mprime+nprb)&1) == 0) 
-		txF[off+(5*mprime)] = yIQ*w[lprime];
-	      else
-		txF[off+(5*mprime)] = yIQ*w[3-lprime];
-	    }
-	    /*
-	    LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d  => (%d,%d)\n", 
-		  mdci->transmission_type, soffset[lprime],nprb,mprime,
-		  re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime), 
-		  ((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
-	  } // narrowband condition
-	} // RE (m') loop
+    for (int lprime=0,i=0; lprime<4; lprime++) {
+      for (int nprb=0; nprb<110; nprb++) {
+        if (nprb<fp->N_RB_DL) {
+          re_offset = fp->first_carrier_offset + (12 * nprb);
+
+          if (re_offset > fp->ofdm_symbol_size)
+            re_offset -= (fp->ofdm_symbol_size - 1);
+
+          txF = &txdataF[0][symbol_offset + re_offset + fp->ofdm_symbol_size*soffset[lprime]];
+        }
+
+        for (int mprime=0; mprime<3; mprime++,i+=2) {
+          if ((i & 0x1f) == 0) {
+            s = lte_gold_generic(&x1, &x2, reset);
+            reset = 0;
+          }
+
+          // select PRBs corresponding to narrowband
+          if ((nprb>= first_prb) &&
+              (nprb<= last_prb)) {
+            ((int16_t *) & yIQ)[0] = (((s >> (i & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
+            ((int16_t *) & yIQ)[1] = (((s >> ((i + 1) & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
+            AssertFatal(mdci->transmission_type==1,"transmission_type %d!=1, handle this ...\n",mdci->transmission_type);
+
+            if (mdci->transmission_type==1) { // same thing on both 107 and 109
+              txF[(5*mprime)] = yIQ;
+              txF[1+(5*mprime)] = yIQ;
+            } else { // put on selected antenna port with w sequence
+              if (((mprime+nprb)&1) == 0)
+                txF[off+(5*mprime)] = yIQ*w[lprime];
+              else
+                txF[off+(5*mprime)] = yIQ*w[3-lprime];
+            }
+
+            /*
+            LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d  => (%d,%d)\n",
+            mdci->transmission_type, soffset[lprime],nprb,mprime,
+            re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime),
+            ((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
+          } // narrowband condition
+        } // RE (m') loop
       } // nprb loop
     } // symbol (l') loop
   } // num_dci loop
 }
 
-void init_mpdcch(PHY_VARS_eNB * eNB)
-{
-
+void init_mpdcch(PHY_VARS_eNB *eNB) {
   init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(eNB);
   init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(eNB);
   init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(eNB);
@@ -486,4 +462,3 @@ void init_mpdcch(PHY_VARS_eNB * eNB)
   init_mpdcch_dmrs_tab(eNB->frame_parms.ofdm_symbol_size);
 }
 
-#endif
diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
index f90c391ba05a07f1baf46b6c3040b1d52804f7a6..a843fc1fd7eb24f943c827cb207e3789f973b525 100644
--- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
@@ -20,12 +20,12 @@
  */
 
 /*! \file PHY/LTE_TRANSPORT/if4_tools.c
-* \brief 
+* \brief
 * \author S. Sandeep Kumar, Raymond Knopp
 * \date 2016
 * \version 0.1
 * \company Eurecom
-* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr 
+* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr
 * \note
 * \warning
 */
@@ -39,34 +39,28 @@
 #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
 #include "common/utils/LOG/vcd_signal_dumper.h"
 
-const uint8_t lin2alaw_if4p5[65536] = {213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85}; const uint16_t alaw2lin_if4p5[256] = {60032, 60288, 59520, 59776, 61056, 61312, 60544, 60800, 57984, 58240, 57472, 57728, 59008, 59264, 58496, 58752, 62784, 62912, 62528, 62656, 63296, 63424, 63040, 63168, 61760, 61888, 61504, 61632, 62272, 62400, 62016, 62144, 43520, 44544, 41472, 42496, 47616, 48640, 45568, 46592, 35328, 36352, 33280, 34304, 39424, 40448, 37376, 38400, 54528, 55040, 53504, 54016, 56576, 57088, 55552, 56064, 50432, 50944, 49408, 49920, 52480, 52992, 51456, 51968, 65192, 65208, 65160, 65176, 65256, 65272, 65224, 65240, 65064, 65080, 65032, 65048, 65128, 65144, 65096, 65112, 65448, 65464, 65416, 65432, 65512, 65528, 65480, 65496, 65320, 65336, 65288, 65304, 65384, 65400, 65352, 65368, 64160, 64224, 64032, 64096, 64416, 64480, 64288, 64352, 63648, 63712, 63520, 63584, 63904, 63968, 63776, 63840, 64848, 64880, 64784, 64816, 64976, 65008, 64912, 64944, 64592, 64624, 64528, 64560, 64720, 64752, 64656, 64688, 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848}; 
+const uint8_t lin2alaw_if4p5[65536] = {213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85};
+const uint16_t alaw2lin_if4p5[256] = {60032, 60288, 59520, 59776, 61056, 61312, 60544, 60800, 57984, 58240, 57472, 57728, 59008, 59264, 58496, 58752, 62784, 62912, 62528, 62656, 63296, 63424, 63040, 63168, 61760, 61888, 61504, 61632, 62272, 62400, 62016, 62144, 43520, 44544, 41472, 42496, 47616, 48640, 45568, 46592, 35328, 36352, 33280, 34304, 39424, 40448, 37376, 38400, 54528, 55040, 53504, 54016, 56576, 57088, 55552, 56064, 50432, 50944, 49408, 49920, 52480, 52992, 51456, 51968, 65192, 65208, 65160, 65176, 65256, 65272, 65224, 65240, 65064, 65080, 65032, 65048, 65128, 65144, 65096, 65112, 65448, 65464, 65416, 65432, 65512, 65528, 65480, 65496, 65320, 65336, 65288, 65304, 65384, 65400, 65352, 65368, 64160, 64224, 64032, 64096, 64416, 64480, 64288, 64352, 63648, 63712, 63520, 63584, 63904, 63968, 63776, 63840, 64848, 64880, 64784, 64816, 64976, 65008, 64912, 64944, 64592, 64624, 64528, 64560, 64720, 64752, 64656, 64688, 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848};
 
 void send_IF4p5(RU_t *ru,
                 int frame,
                 int subframe,
-                uint16_t packet_type)
-{
+                uint16_t packet_type) {
   LTE_DL_FRAME_PARMS *fp     = ru->frame_parms;
   int32_t **txdataF          = ru->common.txdataF_BF;
   int32_t **rxdataF          = ru->common.rxdataF;
-  int16_t **prach_rxsigF     = ru->prach_rxsigF;  
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+  int16_t **prach_rxsigF     = ru->prach_rxsigF;
   int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
-#endif
   void *tx_buffer            = ru->ifbuffer.tx[subframe&1];
   void *tx_buffer_prach      = ru->ifbuffer.tx_prach;
-
   uint16_t symbol_id=0, element_id=0;
-  uint16_t db_fulllength, db_halflength; 
-  int slotoffsetF=0, blockoffsetF=0; 
-
+  uint16_t db_fulllength, db_halflength;
+  int slotoffsetF=0, blockoffsetF=0;
   uint16_t *data_block=NULL, *i=NULL, *d=NULL;
-
   IF4p5_header_t *packet_header=NULL;
-  eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv);
+  eth_state_t *eth = (eth_state_t *) (ru->ifdevice.priv);
   int nsym = fp->symbols_per_tti;
-  
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4_RU+ru->idx,1);   
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4_RU+ru->idx,1);
 
   if (packet_type == IF4p5_PDLFFT) {
     LOG_D(PHY,"send DL_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
@@ -74,58 +68,60 @@ void send_IF4p5(RU_t *ru,
     if (subframe_select(fp,subframe)==SF_S)
       nsym=fp->dl_symbols_in_S_subframe;
 
-
     db_fulllength = 12*fp->N_RB_DL;
     db_halflength = (db_fulllength)>>1;
     slotoffsetF = 1;//(subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
-    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1; 
-
+    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
 
     if (eth->flags == ETH_RAW_IF4p5_MODE) packet_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
     else                                  packet_header = (IF4p5_header_t *)(tx_buffer);
-       
-    gen_IF4p5_dl_header(packet_header, frame, subframe);
 
+    gen_IF4p5_dl_header(packet_header, frame, subframe);
     AssertFatal(txdataF[0]!=NULL,"txdataF_BF[0] is null\n");
+
     for (symbol_id=0; symbol_id<nsym; symbol_id++) {
-      if (eth->flags == ETH_RAW_IF4p5_MODE) data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
-      else           	                    data_block = (uint16_t*)(tx_buffer + sizeof_IF4p5_header_t);    
+      if (eth->flags == ETH_RAW_IF4p5_MODE) data_block = (uint16_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
+      else                                data_block = (uint16_t *)(tx_buffer + sizeof_IF4p5_header_t);
+
       for (int antenna_id=0; antenna_id<ru->nb_tx; antenna_id++) {
         for (element_id=0; element_id<db_halflength; element_id++) {
-          i = (uint16_t*) &txdataF[antenna_id][blockoffsetF+element_id];
+          i = (uint16_t *) &txdataF[antenna_id][blockoffsetF+element_id];
           data_block[element_id] = ((uint16_t) lin2alaw_if4p5[*i]) | (lin2alaw_if4p5[*(i+1)]<<8);
-
-          i = (uint16_t*) &txdataF[antenna_id][slotoffsetF+element_id];
-          data_block[element_id+db_halflength] = ((uint16_t) lin2alaw_if4p5[*i]) | (lin2alaw_if4p5[*(i+1)]<<8);        
+          i = (uint16_t *) &txdataF[antenna_id][slotoffsetF+element_id];
+          data_block[element_id+db_halflength] = ((uint16_t) lin2alaw_if4p5[*i]) | (lin2alaw_if4p5[*(i+1)]<<8);
         }
-	data_block+=db_fulllength;
+
+        data_block+=db_fulllength;
       }
+
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 );
       packet_header->frame_status &= ~(0x7);
       packet_header->frame_status |= (ru->nb_tx-1);
-				 		
       packet_header->frame_status &= ~(0x000f<<26);
-      packet_header->frame_status |= (symbol_id&0x000f)<<26; 
-      if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );		
+      packet_header->frame_status |= (symbol_id&0x000f)<<26;
+
+      if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
+
       if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
-				       symbol_id,
-				       &tx_buffer,
-				       db_fulllength*ru->nb_tx, 
-				       1,
-				       IF4p5_PDLFFT)) < 0) {
+                                       symbol_id,
+                                       &tx_buffer,
+                                       db_fulllength*ru->nb_tx,
+                                       1,
+                                       IF4p5_PDLFFT)) < 0) {
         perror("ETHERNET write for IF4p5_PDLFFT\n");
       }
+
       if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
+
       slotoffsetF  += fp->ofdm_symbol_size;
-      blockoffsetF += fp->ofdm_symbol_size;    
+      blockoffsetF += fp->ofdm_symbol_size;
     }
   } else if ((packet_type == IF4p5_PULFFT)||
-	     (packet_type == IF4p5_PULTICK)){
+             (packet_type == IF4p5_PULTICK)) {
     db_fulllength = 12*fp->N_RB_UL;
     db_halflength = (db_fulllength)>>1;
     slotoffsetF = 0;
-    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength; 
-
+    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
     LOG_D(PHY,"send UL_IF4p5: RU %d frame %d, subframe %d\n",ru->idx,frame,subframe);
 
     if (subframe_select(fp,subframe)==SF_S) {
@@ -136,141 +132,139 @@ void send_IF4p5(RU_t *ru,
 
     if (eth->flags == ETH_RAW_IF4p5_MODE) packet_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
     else                                  packet_header = (IF4p5_header_t *)(tx_buffer);
-    
+
     gen_IF4p5_ul_header(packet_header, packet_type, frame, subframe);
 
     if (packet_type == IF4p5_PULFFT) {
-
       for (symbol_id=fp->symbols_per_tti-nsym; symbol_id<fp->symbols_per_tti; symbol_id++) {
-	if (eth->flags == ETH_RAW_IF4p5_MODE)  data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
-	else 	                               data_block = (uint16_t*)(tx_buffer + sizeof_IF4p5_header_t);
-	
-	for (int aaid=0;aaid<ru->nb_rx;aaid++) {
-	  uint32_t *rx0 = (uint32_t*) &rxdataF[aaid][blockoffsetF];
-	  uint32_t *rx1 = (uint32_t*) &rxdataF[aaid][slotoffsetF];
-	  
-	  VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL, symbol_id );
-	  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 1 );		
-	  
-	  start_meas(&ru->compression);
-	  
-	  for (element_id=0; element_id<db_halflength; element_id+=8) {
-	    i = (uint16_t*) &rx0[element_id];
-	    
-	    d = (uint16_t*) &data_block[element_id];
-	    d[0] = ((uint16_t) lin2alaw_if4p5[i[0]])  | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
-	    d[1] = ((uint16_t) lin2alaw_if4p5[i[2]])  | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
-	    d[2] = ((uint16_t) lin2alaw_if4p5[i[4]])  | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
-	    d[3] = ((uint16_t) lin2alaw_if4p5[i[6]])  | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
-	    d[4] = ((uint16_t) lin2alaw_if4p5[i[8]])  | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
-	    d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
-	    d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
-	    d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
-	    
-	    i = (uint16_t*) &rx1[element_id];
-	    d = (uint16_t*) &data_block[element_id+db_halflength];
-	    d[0] = ((uint16_t) lin2alaw_if4p5[i[0]])  | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
-	    d[1] = ((uint16_t) lin2alaw_if4p5[i[2]])  | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
-	    d[2] = ((uint16_t) lin2alaw_if4p5[i[4]])  | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
-	    d[3] = ((uint16_t) lin2alaw_if4p5[i[6]])  | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
-	    d[4] = ((uint16_t) lin2alaw_if4p5[i[8]])  | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
-	    d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
-	    d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
-	    d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
-	    
-	  }
-	  data_block+=db_fulllength;
-	}
-	stop_meas(&ru->compression);
-	//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 );   	
-	packet_header->frame_status &= ~(0x07);
-	packet_header->frame_status |= ru->nb_rx-1;
-	packet_header->frame_status &= ~(0x000f<<26);
-	packet_header->frame_status |= (symbol_id&0x000f)<<26; 
-	//if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );  
-	start_meas(&ru->transport);
-	if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
-					 symbol_id,
-					 &tx_buffer,
-					 db_fulllength*ru->nb_rx,
-					 1,
-					 IF4p5_PULFFT)) < 0) {
-	  perror("ETHERNET write for IF4p5_PULFFT\n");
-	}
-	stop_meas(&ru->transport);
-	//if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
-	slotoffsetF  += fp->ofdm_symbol_size;
-	blockoffsetF += fp->ofdm_symbol_size;
-      }    
-    }
-    else {
+        if (eth->flags == ETH_RAW_IF4p5_MODE)  data_block = (uint16_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
+        else                                 data_block = (uint16_t *)(tx_buffer + sizeof_IF4p5_header_t);
+
+        for (int aaid=0; aaid<ru->nb_rx; aaid++) {
+          uint32_t *rx0 = (uint32_t *) &rxdataF[aaid][blockoffsetF];
+          uint32_t *rx1 = (uint32_t *) &rxdataF[aaid][slotoffsetF];
+          VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL, symbol_id );
+          VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 1 );
+          start_meas(&ru->compression);
+
+          for (element_id=0; element_id<db_halflength; element_id+=8) {
+            i = (uint16_t *) &rx0[element_id];
+            d = (uint16_t *) &data_block[element_id];
+            d[0] = ((uint16_t) lin2alaw_if4p5[i[0]])  | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
+            d[1] = ((uint16_t) lin2alaw_if4p5[i[2]])  | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
+            d[2] = ((uint16_t) lin2alaw_if4p5[i[4]])  | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
+            d[3] = ((uint16_t) lin2alaw_if4p5[i[6]])  | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
+            d[4] = ((uint16_t) lin2alaw_if4p5[i[8]])  | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
+            d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
+            d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
+            d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
+            i = (uint16_t *) &rx1[element_id];
+            d = (uint16_t *) &data_block[element_id+db_halflength];
+            d[0] = ((uint16_t) lin2alaw_if4p5[i[0]])  | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
+            d[1] = ((uint16_t) lin2alaw_if4p5[i[2]])  | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
+            d[2] = ((uint16_t) lin2alaw_if4p5[i[4]])  | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
+            d[3] = ((uint16_t) lin2alaw_if4p5[i[6]])  | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
+            d[4] = ((uint16_t) lin2alaw_if4p5[i[8]])  | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
+            d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
+            d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
+            d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
+          }
+
+          data_block+=db_fulllength;
+        }
+
+        stop_meas(&ru->compression);
+        //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 );
+        packet_header->frame_status &= ~(0x07);
+        packet_header->frame_status |= ru->nb_rx-1;
+        packet_header->frame_status &= ~(0x000f<<26);
+        packet_header->frame_status |= (symbol_id&0x000f)<<26;
+        //if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
+        start_meas(&ru->transport);
+
+        if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
+                                         symbol_id,
+                                         &tx_buffer,
+                                         db_fulllength*ru->nb_rx,
+                                         1,
+                                         IF4p5_PULFFT)) < 0) {
+          perror("ETHERNET write for IF4p5_PULFFT\n");
+        }
+
+        stop_meas(&ru->transport);
+        //if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
+        slotoffsetF  += fp->ofdm_symbol_size;
+        blockoffsetF += fp->ofdm_symbol_size;
+      }
+    } else {
       if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
-				       0,
-				       &tx_buffer,
-				       0,
-				       1,
-				       IF4p5_PULTICK)) < 0) {
-	perror("ETHERNET write for IF4p5_PULFFT\n");
+                                       0,
+                                       &tx_buffer,
+                                       0,
+                                       1,
+                                       IF4p5_PULTICK)) < 0) {
+        perror("ETHERNET write for IF4p5_PULFFT\n");
       }
     }
-  } else if (packet_type >= IF4p5_PRACH && 
-	     packet_type <= IF4p5_PRACH+4) {
+  } else if (packet_type >= IF4p5_PRACH &&
+             packet_type <= IF4p5_PRACH+4) {
     // FIX: hard coded prach samples length
     if (frame < 10) LOG_D(PHY,"IF4p5_PRACH: frame %d, subframe %d,packet type %x\n",frame,subframe,packet_type);
+
     db_fulllength = PRACH_NUM_SAMPLES;
-    
+
     if (eth->flags == ETH_RAW_IF4p5_MODE) {
       packet_header = (IF4p5_header_t *)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES);
-      data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
+      data_block = (uint16_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
     } else {
       packet_header = (IF4p5_header_t *)(tx_buffer_prach);
-      data_block = (uint16_t*)(tx_buffer_prach + sizeof_IF4p5_header_t);
-    }  
-    gen_IF4p5_prach_header(packet_header, frame, subframe);
-
+      data_block = (uint16_t *)(tx_buffer_prach + sizeof_IF4p5_header_t);
+    }
 
+    gen_IF4p5_prach_header(packet_header, frame, subframe);
     int16_t *rxF;
 
-    for (int antenna_id=0;antenna_id<ru->nb_rx;antenna_id++) {
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+    for (int antenna_id=0; antenna_id<ru->nb_rx; antenna_id++) {
       if (packet_type > IF4p5_PRACH)
-	rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
-      else 
-#endif
-	rxF = &prach_rxsigF[antenna_id][0];
+        rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
+      else
+        rxF = &prach_rxsigF[antenna_id][0];
 
-      LOG_D(PHY,"PRACH_if4P5: rxsigF%d energy %d\n",antenna_id,dB_fixed(signal_energy((int*)rxF,839)));
+      LOG_D(PHY,"PRACH_if4P5: rxsigF%d energy %d\n",antenna_id,dB_fixed(signal_energy((int *)rxF,839)));
       AssertFatal(rxF!=NULL,"rxF is null\n");
+
       if (eth->flags == ETH_RAW_IF4p5_MODE) {
         memcpy((void *)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t+PRACH_BLOCK_SIZE_BYTES*antenna_id),
-	       (void*)rxF, 
-	       PRACH_BLOCK_SIZE_BYTES);
+               (void *)rxF,
+               PRACH_BLOCK_SIZE_BYTES);
       } else {
         memcpy((void *)(tx_buffer_prach + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES*antenna_id),
                (void *)rxF,
                PRACH_BLOCK_SIZE_BYTES);
       }
+
       LOG_D(PHY,"signal energy prach antenna %d => %d dB\n",
-	    antenna_id, dB_fixed(signal_energy((int*)rxF,839)));
+            antenna_id, dB_fixed(signal_energy((int *)rxF,839)));
     }
+
     if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
+
     if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
-				     symbol_id,
-				     &tx_buffer_prach,
-				     db_fulllength*ru->nb_rx,
-				     1,
-				     packet_type)) < 0) {
+                                     symbol_id,
+                                     &tx_buffer_prach,
+                                     db_fulllength*ru->nb_rx,
+                                     1,
+                                     packet_type)) < 0) {
       perror("ETHERNET write for IF4p5_PRACH\n");
     }
-    
-    if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );      
-  } else {    
-    AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type);     
+
+    if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
+  } else {
+    AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type);
   }
 
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4_RU+ru->idx,0);  
-  return;  		    
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4_RU+ru->idx,0);
+  return;
 }
 
 
@@ -278,172 +272,164 @@ void recv_IF4p5(RU_t *ru,
                 int *frame,
                 int *subframe,
                 uint16_t *packet_type,
-                uint32_t *symbol_number)
-{
+                uint32_t *symbol_number) {
   LTE_DL_FRAME_PARMS *fp     = ru->frame_parms;
   int32_t **txdataF          = ru->common.txdataF_BF;
   int32_t **rxdataF          = ru->common.rxdataF;
-  int16_t **prach_rxsigF     = ru->prach_rxsigF;  
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+  int16_t **prach_rxsigF     = ru->prach_rxsigF;
   int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
-#endif
   void *rx_buffer            = ru->ifbuffer.rx;
-
   uint16_t element_id;
-  uint16_t db_fulllength, db_halflength; 
-  int slotoffsetF=0, blockoffsetF=0; 
-  eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv);
+  uint16_t db_fulllength, db_halflength;
+  int slotoffsetF=0, blockoffsetF=0;
+  eth_state_t *eth = (eth_state_t *) (ru->ifdevice.priv);
   int idx;
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4_RU+ru->idx,1);
 
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4_RU+ru->idx,1);   
-  
   if (ru->function == NGFI_RRU_IF4p5) {
-    db_fulllength = (12*fp->N_RB_DL)*ru->nb_tx; 
+    db_fulllength = (12*fp->N_RB_DL)*ru->nb_tx;
   } else { // This is not an RRU
-    db_fulllength = (12*fp->N_RB_UL)*ru->nb_rx;     
-  }  
-  db_halflength = db_fulllength>>1;
+    db_fulllength = (12*fp->N_RB_UL)*ru->nb_rx;
+  }
 
+  db_halflength = db_fulllength>>1;
   IF4p5_header_t *packet_header=NULL;
   uint16_t *data_block=NULL, *i=NULL;
+  LOG_D(PHY,"recv IF4p5: RU %d waiting (%d samples)\n",ru->idx,db_fulllength);
+
+  if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF0+ru->idx, 1 );
 
-  LOG_D(PHY,"recv IF4p5: RU %d waiting (%d samples)\n",ru->idx,db_fulllength);    
-  if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF0+ru->idx, 1 );   
   int read_cnt=0;
+
   while (ru->ifdevice.trx_read_func(&ru->ifdevice,
-				 (int64_t*) packet_type,
-				 &rx_buffer,
-				 db_fulllength,
-				 0) < 0) {
+                                    (int64_t *) packet_type,
+                                    &rx_buffer,
+                                    db_fulllength,
+                                    0) < 0) {
     perror("ETHERNET read");
     read_cnt++;
-/*
-    if (read_cnt == 2) {
-      ru->cmd = STOP_RU;
-      return;
-    }*/
+    /*
+        if (read_cnt == 2) {
+          ru->cmd = STOP_RU;
+          return;
+        }*/
     LOG_E(PHY,"if4p5 read_cnt %d\n",read_cnt);
   }
+
   if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF0+ru->idx, 0 );
 
   if (eth->flags == ETH_RAW_IF4p5_MODE) {
-    packet_header = (IF4p5_header_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES);
-    data_block = (uint16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t);
+    packet_header = (IF4p5_header_t *) (rx_buffer+MAC_HEADER_SIZE_BYTES);
+    data_block = (uint16_t *) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t);
   } else {
-    packet_header = (IF4p5_header_t*) (rx_buffer);
-    data_block = (uint16_t*) (rx_buffer+sizeof_IF4p5_header_t);
+    packet_header = (IF4p5_header_t *) (rx_buffer);
+    data_block = (uint16_t *) (rx_buffer+sizeof_IF4p5_header_t);
   }
 
-  
   *frame = ((packet_header->frame_status)>>6)&0xffff;
   *subframe = ((packet_header->frame_status)>>22)&0x000f;
-
-  *packet_type = packet_header->sub_type; 
+  *packet_type = packet_header->sub_type;
   LOG_D(PHY,"recv_IF4p5: Frame %d, Subframe %d: packet_type %x\n",*frame,*subframe,*packet_type);
+
   if (*packet_type == IF4p5_PDLFFT) {
     db_fulllength/=ru->nb_tx;
-    db_halflength/=ru->nb_tx;          
-    *symbol_number = ((packet_header->frame_status)>>26)&0x000f;         
+    db_halflength/=ru->nb_tx;
+    *symbol_number = ((packet_header->frame_status)>>26)&0x000f;
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
     LOG_D(PHY,"DL_IF4p5: RU %d frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
-
     slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size)+1;// + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
-    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1; 
-    
+    blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
-    for (int antenna_id=0;antenna_id<ru->nb_tx;antenna_id++) {    
+
+    for (int antenna_id=0; antenna_id<ru->nb_tx; antenna_id++) {
       for (element_id=0; element_id<db_halflength; element_id++) {
-        i = (uint16_t*) &txdataF[antenna_id][blockoffsetF+element_id];
-        *i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ]; 
+        i = (uint16_t *) &txdataF[antenna_id][blockoffsetF+element_id];
+        *i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ];
         *(i+1) = alaw2lin_if4p5[ (data_block[element_id]>>8) ];
-
-        i = (uint16_t*) &txdataF[antenna_id][slotoffsetF+element_id];
-        *i = alaw2lin_if4p5[ (data_block[element_id+db_halflength] & 0xff) ]; 
+        i = (uint16_t *) &txdataF[antenna_id][slotoffsetF+element_id];
+        *i = alaw2lin_if4p5[ (data_block[element_id+db_halflength] & 0xff) ];
         *(i+1) = alaw2lin_if4p5[ (data_block[element_id+db_halflength]>>8) ];
       }
+
       data_block+=db_fulllength;
     }
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
 
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
   } else if (*packet_type == IF4p5_PULFFT) {
     db_fulllength/=ru->nb_rx;
-    db_halflength/=ru->nb_rx;         
-    *symbol_number = ((packet_header->frame_status)>>26)&0x000f;         
-
+    db_halflength/=ru->nb_rx;
+    *symbol_number = ((packet_header->frame_status)>>26)&0x000f;
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
-    if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
 
+    if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
 
     slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size);
     blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
-    for (int antenna_id=0;antenna_id<ru->nb_rx;antenna_id++) { 
+
+    for (int antenna_id=0; antenna_id<ru->nb_rx; antenna_id++) {
       for (element_id=0; element_id<db_halflength; element_id++) {
-        i = (uint16_t*) &rxdataF[antenna_id][blockoffsetF+element_id];
-        *i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ]; 
+        i = (uint16_t *) &rxdataF[antenna_id][blockoffsetF+element_id];
+        *i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ];
         *(i+1) = alaw2lin_if4p5[ (data_block[element_id]>>8) ];
-
-        i = (uint16_t*) &rxdataF[antenna_id][slotoffsetF+element_id];
-        *i = alaw2lin_if4p5[ (data_block[element_id+db_halflength] & 0xff) ]; 
+        i = (uint16_t *) &rxdataF[antenna_id][slotoffsetF+element_id];
+        *i = alaw2lin_if4p5[ (data_block[element_id+db_halflength] & 0xff) ];
         *(i+1) = alaw2lin_if4p5[ (data_block[element_id+db_halflength]>>8) ];
-
-	//if (element_id==0) LOG_I(PHY,"recv_if4p5: symbol %d rxdata0 = (%u,%u)\n",*symbol_number,*i,*(i+1));
+        //if (element_id==0) LOG_I(PHY,"recv_if4p5: symbol %d rxdata0 = (%u,%u)\n",*symbol_number,*i,*(i+1));
       }
+
       LOG_D(PHY,"PULFFT_IF4p5: CC_id %d : frame %d, subframe %d (symbol %d)=> %d dB\n",ru->idx,*frame,*subframe,*symbol_number,
-  	    dB_fixed(signal_energy((int*)&rxdataF[antenna_id][slotoffsetF],db_halflength)+
-	  	     signal_energy((int*)&rxdataF[antenna_id][blockoffsetF],db_halflength)));
+            dB_fixed(signal_energy((int *)&rxdataF[antenna_id][slotoffsetF],db_halflength)+
+                     signal_energy((int *)&rxdataF[antenna_id][blockoffsetF],db_halflength)));
       data_block+=db_fulllength;
     }
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );	
-  } else if (*packet_type >= IF4p5_PRACH &&
-	     *packet_type <= IF4p5_PRACH + 4) {  
 
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
+  } else if (*packet_type >= IF4p5_PRACH &&
+             *packet_type <= IF4p5_PRACH + 4) {
     int16_t *rxF;
-    for (int antenna_id=0;antenna_id<ru->nb_rx;antenna_id++) { 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
+    for (int antenna_id=0; antenna_id<ru->nb_rx; antenna_id++) {
       if (*packet_type > IF4p5_PRACH)
         rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][antenna_id][0];
-      else 
-#endif
-      rxF = &prach_rxsigF[antenna_id][0];
+      else
+        rxF = &prach_rxsigF[antenna_id][0];
 
       AssertFatal(rxF!=NULL,"rxF is null\n");
 
-      if (eth->flags == ETH_RAW_IF4p5_MODE) {		
-        memcpy(rxF, 
-               (int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)), 
+      if (eth->flags == ETH_RAW_IF4p5_MODE) {
+        memcpy(rxF,
+               (int16_t *) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)),
                PRACH_BLOCK_SIZE_BYTES);
       } else {
         memcpy(rxF,
-               (int16_t*) (rx_buffer+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)),
+               (int16_t *) (rx_buffer+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)),
                PRACH_BLOCK_SIZE_BYTES);
       }
     }
+
     if (*frame == 0) LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => (%d,%d) dB\n",ru->idx,*frame,*subframe,
-			   dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)),
-			   dB_fixed(signal_energy((int*)&prach_rxsigF[1][0],839)));
-      for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
+                             dB_fixed(signal_energy((int *)&prach_rxsigF[0][0],839)),
+                             dB_fixed(signal_energy((int *)&prach_rxsigF[1][0],839)));
 
+    for (idx=0; idx<ru->num_eNB; idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
   } else if (*packet_type == IF4p5_PULTICK) {
     if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, PULTICK\n",ru->idx,*frame,*subframe);
   } else {
-    AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);            
+    AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);
   }
 
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4_RU+ru->idx,0);     
-  return;   
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4_RU+ru->idx,0);
+  return;
 }
 
 
 void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet,
                          int frame,
-                         int subframe)
-{
-  dl_packet->type = IF4p5_PACKET_TYPE; 
+                         int subframe) {
+  dl_packet->type = IF4p5_PACKET_TYPE;
   dl_packet->sub_type = IF4p5_PDLFFT;
-
   dl_packet->rsvd = 0;
-  
   // Set frame status
   dl_packet->frame_status = 0;
   dl_packet->frame_status |= (frame&0xffff)<<6;
@@ -454,13 +440,10 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet,
 void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet,
                          uint16_t packet_subtype,
                          int frame,
-                         int subframe)
-{
-  ul_packet->type = IF4p5_PACKET_TYPE; 
+                         int subframe) {
+  ul_packet->type = IF4p5_PACKET_TYPE;
   ul_packet->sub_type = packet_subtype;
-
   ul_packet->rsvd = 0;
-  
   // Set frame status
   ul_packet->frame_status = 0;
   ul_packet->frame_status |= (frame&0xffff)<<6;
@@ -470,43 +453,41 @@ void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet,
 
 void gen_IF4p5_prach_header(IF4p5_header_t *prach_packet,
                             int frame,
-                            int subframe)
-{
-  prach_packet->type = IF4p5_PACKET_TYPE; 
+                            int subframe) {
+  prach_packet->type = IF4p5_PACKET_TYPE;
   prach_packet->sub_type = IF4p5_PRACH;
-
   prach_packet->rsvd = 0;
-  
   // Set LTE Prach configuration
   prach_packet->frame_status = 0;
   prach_packet->frame_status |= (frame&0xffff)<<6;
   prach_packet->frame_status |= (subframe&0x000f)<<22;
-} 
+}
 
 
-void malloc_IF4p5_buffer(RU_t *ru)
-{
-  // Keep the size large enough 
-  eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv);
+void malloc_IF4p5_buffer(RU_t *ru) {
+  // Keep the size large enough
+  eth_state_t *eth = (eth_state_t *) (ru->ifdevice.priv);
   int i;
 
   if (eth->flags == ETH_RAW_IF4p5_MODE) {
-    for (i=0;i<10;i++) {
+    for (i=0; i<10; i++) {
       ru->ifbuffer.tx[i]       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
-      memset((void*)ru->ifbuffer.tx[i],0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
+      memset((void *)ru->ifbuffer.tx[i],0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
     }
+
     ru->ifbuffer.tx_prach = malloc(RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
-    memset((void*)ru->ifbuffer.tx_prach,0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
-    ru->ifbuffer.rx       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx); 
-    memset((void*)ru->ifbuffer.rx,0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
+    memset((void *)ru->ifbuffer.tx_prach,0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
+    ru->ifbuffer.rx       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
+    memset((void *)ru->ifbuffer.rx,0,RAW_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
   } else {
-    for (i=0;i<10;i++) {
+    for (i=0; i<10; i++) {
       ru->ifbuffer.tx[i]       = malloc(UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
-      memset((void*)ru->ifbuffer.tx[i],0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
+      memset((void *)ru->ifbuffer.tx[i],0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_tx);
     }
+
     ru->ifbuffer.tx_prach = malloc(UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
-    memset((void*)ru->ifbuffer.tx_prach,0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
+    memset((void *)ru->ifbuffer.tx_prach,0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
     ru->ifbuffer.rx       = malloc(UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
-    memset((void*)ru->ifbuffer.rx,0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
+    memset((void *)ru->ifbuffer.rx,0,UDP_IF4p5_PRACH_SIZE_BYTES*ru->nb_rx);
   }
 }
diff --git a/openair1/PHY/LTE_TRANSPORT/lte_mcs.c b/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
index 95371d03d944e12b44a8fb48b9d1f9e9a454ad3a..48951ffdd0bf623ce836ee37699a4e2a0dfcf316 100644
--- a/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
+++ b/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
@@ -34,33 +34,25 @@
 #include "PHY/phy_extern.h"
 #include "PHY/LTE_TRANSPORT/transport_common_proto.h"
 
-unsigned char get_Qm(unsigned char I_MCS)
-{
-
+unsigned char get_Qm(unsigned char I_MCS) {
   if (I_MCS < 10)
     return(2);
   else if (I_MCS < 17)
     return(4);
   else
     return(6);
-
 }
 
-unsigned char get_Qm_ul(unsigned char I_MCS)
-{
-
+unsigned char get_Qm_ul(unsigned char I_MCS) {
   if (I_MCS < 11)
     return(2);
   else if (I_MCS < 21)
     return(4);
   else
     return(6);
-
 }
 
-unsigned char get_I_TBS(unsigned char I_MCS)
-{
-
+unsigned char get_I_TBS(unsigned char I_MCS) {
   if (I_MCS < 10)
     return(I_MCS);
   else if (I_MCS == 10)
@@ -70,12 +62,9 @@ unsigned char get_I_TBS(unsigned char I_MCS)
   else if (I_MCS == 17)
     return(15);
   else return(I_MCS-2);
-
 }
 
-unsigned char get_I_TBS_UL(unsigned char I_MCS)
-{
-
+unsigned char get_I_TBS_UL(unsigned char I_MCS) {
   if (I_MCS <= 10)
     return(I_MCS);
   else if (I_MCS == 10)
@@ -83,11 +72,9 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS)
   else if (I_MCS < 21)
     return(I_MCS-1);
   else return(I_MCS-2);
-
 }
 
-unsigned char I_TBS2I_MCS(unsigned char I_TBS)
-{
+unsigned char I_TBS2I_MCS(unsigned char I_TBS) {
   unsigned char I_MCS = -1;
 
   ///note: change from <= to < to go from choosing higher modulation rather than high code-rate
@@ -107,9 +94,7 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
   return I_MCS;
 }
 
-uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
-{
-
+uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) {
   uint32_t TBS;
 
   if ((nb_rb > 0) && (mcs < 29)) {
@@ -121,9 +106,7 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
   }
 }
 
-uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
-{
-
+uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) {
   uint32_t TBS = 0;
 
   if ((nb_rb > 0) && (mcs < 29)) {
@@ -136,12 +119,9 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
 }
 
 
-int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol)
-{
-
+int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol) {
   int rb,re_pbch_sss=0;
   int rb_alloc_ind,nsymb;
-
   nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
 
   //      printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
@@ -178,11 +158,9 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
   }
 
   if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
-
     for (rb=((frame_parms->N_RB_DL>>1)-3);
          rb<=((frame_parms->N_RB_DL>>1)+3);
          rb++) {
-
       if (rb < 32)
         rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
       else if (rb < 64)
@@ -206,7 +184,6 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
     for (rb=((frame_parms->N_RB_DL>>1)-3);
          rb<((frame_parms->N_RB_DL>>1)+3);
          rb++) {
-
       if (rb < 32)
         rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
       else if (rb < 64)
@@ -228,22 +205,17 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
   return(re_pbch_sss);
 }
 
-int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe)
-{
-
+int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe) {
   int rb,re_pbch_sss=0;
   uint8_t rb_alloc_ind;
 
   if ((subframe!=0) && (subframe!=5) && (subframe!=6))  // if not PBCH/SSS/PSS or SSS/PSS
     return(0);
 
-
   if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
-
     for (rb=((frame_parms->N_RB_DL>>1)-3);
          rb<=((frame_parms->N_RB_DL>>1)+3);
          rb++) {
-
       if (rb < 32)
         rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
       else if (rb < 64)
@@ -305,7 +277,6 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
         //SISO so PBCH 3+(5/6) symbols, PSS+SSS 2symbols REs => (35/6)*re_pbch_sss for normal CP,
         // 2+10/6 symbols, SSS+PSS 2 symbols => (34/6)*re_pbch_sss for ext. CP
         return((-frame_parms->Ncp+35)*re_pbch_sss * mod_order/6);
-
     }
   } else if (subframe == 5) // SSS+PSS for FDD, SSS for TDD
     return(((frame_parms->frame_type==FDD)?2:1)*re_pbch_sss * 1 * mod_order);
@@ -315,8 +286,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
   return(0);
 }
 
-int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
-{
+int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
   int G_adj;
 
   if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
@@ -327,7 +297,7 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
       // PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
       // PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
       // PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
-      if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1) 
+      if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
         return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
       else if(beamforming_mode==7)
         return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
@@ -349,11 +319,9 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
   }
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
-{
-  //int G_adj;
 
+int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
+  //int G_adj;
   /*if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
     G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe);
 
@@ -362,7 +330,7 @@ int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb
       // PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
       // PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
       // PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
-      if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1) 
+      if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
         return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
       else if(beamforming_mode==7)
         return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
@@ -384,15 +352,14 @@ int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb
   }*/
   return((int)frame_parms->N_RB_DL * mod_order * 120);
 }
-#endif
+
 
 // following function requires dlsch_tbs_full.h
 #include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
 
 unsigned char SE2I_TBS(float SE,
                        unsigned char N_PRB,
-                       unsigned char symbPerRB)
-{
+                       unsigned char symbPerRB) {
   unsigned char I_TBS= -1;
   int throughPutGoal = 0;
   short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
@@ -427,9 +394,7 @@ unsigned char SE2I_TBS(float SE,
 
 //added for ALU icic purpose
 
-uint8_t Get_SB_size(uint8_t n_rb_dl)
-{
-
+uint8_t Get_SB_size(uint8_t n_rb_dl) {
   if(n_rb_dl<27)
     return 4;
   else if(n_rb_dl<64)
diff --git a/openair1/PHY/LTE_TRANSPORT/pmch_common.c b/openair1/PHY/LTE_TRANSPORT/pmch_common.c
index fb9b4ea1e9e6fd33901ecc541f5e266e4034d37c..03bf5a378b2c5ed1872dab3fa409624c3b406526 100644
--- a/openair1/PHY/LTE_TRANSPORT/pmch_common.c
+++ b/openair1/PHY/LTE_TRANSPORT/pmch_common.c
@@ -35,78 +35,97 @@
 
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms){
-   uint32_t period;
-   if(frame_parms->NonMBSFN_config_flag ) {
-      period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
-      if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
-        switch (subframe) {
+
+int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
+  uint32_t period;
+
+  if(frame_parms->NonMBSFN_config_flag ) {
+    period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
+
+    if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
+      switch (subframe) {
         case 0:
-                return(1); //This should be CAS 
-           break;
-        }
-     }
-   }
-   return (0);
+          return(1); //This should be CAS
+          break;
+      }
+    }
+  }
+
+  return (0);
 }
 
-int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
-{
-   uint32_t period;
+int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
+  uint32_t period;
+
+  if(frame_parms->NonMBSFN_config_flag ) {
+    period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
 
-   if(frame_parms->NonMBSFN_config_flag ) {
-      period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
-      if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
-        switch (subframe) {
+    if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
+      switch (subframe) {
         case 1:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
+            return(1);
+
+          break;
+
         case 2:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
+            return(1);
+
+          break;
+
         case 3:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
+            return(1);
+
+          break;
+
         case 4:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
+            return(1);
+
+          break;
+
         case 5:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
+            return(1);
+
+          break;
+
         case 6:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
+            return(1);
+
+          break;
+
         case 7:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
+            return(1);
+
+          break;
+
         case 8:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
-                return(1);
-           break;
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
+            return(1);
+
+          break;
+
         case 9:
-           if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
-                return(1);
-           break;
-       }
+          if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
+            return(1);
+
+          break;
+      }
     } else { //Then regular MBSFN FeMBMS subframe
-                return(1);
+      return(1);
     }
   }
+
   return(0);
 }
-#endif
 
-int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
-{
 
+int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
   uint32_t period;
   uint8_t i;
   uint8_t j;
@@ -121,163 +140,160 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
       if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) {
         if (frame_parms->frame_type == FDD) {
           switch (subframe) {
-
-          case 1:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF1) > 0)
-              return(1);
-
-            break;
-
-          case 2:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF2) > 0)
-              return(1);
-
-            break;
-
-          case 3:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF3) > 0)
-              return(1);
-
-            break;
-
-          case 6:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF6) > 0)
-              return(1);
-
-            break;
-
-          case 7:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF7) > 0)
-              return(1);
-
-            break;
-
-          case 8:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF8) > 0)
-              return(1);
-
-            break;
-          }
-        } else  {
-          switch (subframe) {
-          case 3:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF3) > 0)
-              return(1);
-
-            break;
-
-          case 4:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF4) > 0)
-              return(1);
-
-            break;
-
-          case 7:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF7) > 0)
-              return(1);
-
-            break;
-
-          case 8:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF8) > 0)
-              return(1);
-
-            break;
-
-          case 9:
-            if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF9) > 0)
-              return(1);
-
-            break;
-          }
-        }
-      }
-
-    } else { // handle 4 frames case
-
-      for(j=0;j<4;j++) {
-        if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
-          if (frame_parms->frame_type == FDD) {
-            switch (subframe) {
             case 1:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig)  & (0x800000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF1) > 0)
                 return(1);
-              }
 
               break;
 
             case 2:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF2) > 0)
                 return(1);
-              }
 
               break;
 
             case 3:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF3) > 0)
                 return(1);
-              }
 
               break;
 
             case 6:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF6) > 0)
                 return(1);
-              }
 
               break;
 
             case 7:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF7) > 0)
                 return(1);
-              }
 
               break;
 
             case 8:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) {
-                //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6));
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF8) > 0)
                 return(1);
-              }
 
               break;
-            }
-          } else {
-            switch (subframe) {
+          }
+        } else  {
+          switch (subframe) {
             case 3:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0)
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF3) > 0)
                 return(1);
 
               break;
 
             case 4:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0)
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF4) > 0)
                 return(1);
 
               break;
 
             case 7:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0)
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF7) > 0)
                 return(1);
 
               break;
 
             case 8:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0)
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF8) > 0)
                 return(1);
 
               break;
 
             case 9:
-              if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0)
+              if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF9) > 0)
                 return(1);
 
               break;
+          }
+        }
+      }
+    } else { // handle 4 frames case
+      for(j=0; j<4; j++) {
+        if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
+          if (frame_parms->frame_type == FDD) {
+            switch (subframe) {
+              case 1:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig)  & (0x800000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6));
+                  return(1);
+                }
+
+                break;
+
+              case 2:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6));
+                  return(1);
+                }
+
+                break;
+
+              case 3:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6));
+                  return(1);
+                }
+
+                break;
+
+              case 6:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6));
+                  return(1);
+                }
+
+                break;
+
+              case 7:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6));
+                  return(1);
+                }
+
+                break;
+
+              case 8:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) {
+                  //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6));
+                  return(1);
+                }
+
+                break;
+            }
+          } else {
+            switch (subframe) {
+              case 3:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0)
+                  return(1);
+
+                break;
+
+              case 4:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0)
+                  return(1);
+
+                break;
+
+              case 7:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0)
+                  return(1);
+
+                break;
+
+              case 8:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0)
+                  return(1);
+
+                break;
+
+              case 9:
+                if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0)
+                  return(1);
+
+                break;
             }
           }
         }
diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c
index b75ec433803e4dff83e381d00f4e95c22bf0cd12..3471f98af793b6e3b1b2bbe2f09c676ac983d729 100644
--- a/openair1/PHY/LTE_TRANSPORT/prach.c
+++ b/openair1/PHY/LTE_TRANSPORT/prach.c
@@ -39,22 +39,16 @@
 #include "common/utils/LOG/vcd_signal_dumper.h"
 #include "prach_extern.h"
 
-#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-  #define rx_prach0 rx_prach
-#endif
-
 void rx_prach0(PHY_VARS_eNB *eNB,
                RU_t *ru,
                uint16_t *max_preamble,
                uint16_t *max_preamble_energy,
                uint16_t *max_preamble_delay,
-	       uint16_t *avg_preamble_energy,
+               uint16_t *avg_preamble_energy,
                uint16_t Nf,
-               uint8_t tdd_mapindex
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,uint8_t br_flag,
-  uint8_t ce_level
-#endif
+               uint8_t tdd_mapindex,
+               uint8_t br_flag,
+               uint8_t ce_level
               ) {
   int i;
   LTE_DL_FRAME_PARMS *fp=NULL;
@@ -93,9 +87,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
   int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
   int32_t *prach_ifft=(int32_t *)NULL;
   int32_t **prach_ifftp=(int32_t **)NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int prach_ifft_cnt=0;
-#endif
+
   if(eNB)  {
     fp    = &(eNB->frame_parms);
     nb_rx = fp->nb_antennas_rx;
@@ -103,12 +96,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
     fp    = (ru->frame_parms);
     nb_rx = ru->nb_rx;
   }
-  AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
 
+  AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
   frame_type          = fp->frame_type;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   if (br_flag == 1) {
     AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
                 "emtc prach_Config is not enabled\n");
@@ -125,9 +116,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
     max_preamble        += ce_level;
     max_preamble_energy += ce_level;
     max_preamble_delay  += ce_level;
-  } else
-#endif
-  {
+  } else {
     rootSequenceIndex   = fp->prach_config_common.rootSequenceIndex;
     prach_ConfigIndex   = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
     Ncs_config          = fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig;
@@ -142,36 +131,33 @@ void rx_prach0(PHY_VARS_eNB *eNB,
   uint16_t N_ZC = (prach_fmt <4)?839:139;
 
   if (eNB) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
     if (br_flag == 1) {
       prach_ifftp         = eNB->prach_vars_br.prach_ifft[ce_level];
       subframe            = eNB->proc.subframe_prach_br;
       prachF              = eNB->prach_vars_br.prachF;
       rxsigF              = eNB->prach_vars_br.rxsigF[ce_level];
 
-      if (LOG_DEBUGFLAG(PRACH)){
-        if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
-               br_flag,ce_level,eNB->proc.frame_prach,subframe,
-				     fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
-				     prach_ConfigIndex,rootSequenceIndex,
-				     eNB->prach_vars_br.repetition_number[ce_level],
-				     fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
-      }
-    } else
-#endif
-      {
-        prach_ifftp       = eNB->prach_vars.prach_ifft[0];
-        subframe          = eNB->proc.subframe_prach;
-        prachF            = eNB->prach_vars.prachF;
-        rxsigF            = eNB->prach_vars.rxsigF[0];
-        if (LOG_DEBUGFLAG(PRACH)){
-          if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
-        }
+      if (LOG_DEBUGFLAG(PRACH)) {
+        if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,
+              "PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
+              br_flag,ce_level,eNB->proc.frame_prach,subframe,
+              fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
+              prach_ConfigIndex,rootSequenceIndex,
+              eNB->prach_vars_br.repetition_number[ce_level],
+              fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
       }
     } else {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+      prach_ifftp       = eNB->prach_vars.prach_ifft[0];
+      subframe          = eNB->proc.subframe_prach;
+      prachF            = eNB->prach_vars.prachF;
+      rxsigF            = eNB->prach_vars.rxsigF[0];
 
+      if (LOG_DEBUGFLAG(PRACH)) {
+        if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,
+              fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
+      }
+    }
+  } else {
     if (br_flag == 1) {
       subframe          = ru->proc.subframe_prach_br;
       rxsigF            = ru->prach_rxsigF_br[ce_level];
@@ -180,9 +166,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
         if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
               br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
       }
-    } else
-#endif
-    {
+    } else {
       subframe          = ru->proc.subframe_prach;
       rxsigF            = ru->prach_rxsigF;
 
@@ -422,11 +406,11 @@ void rx_prach0(PHY_VARS_eNB *eNB,
 
   if ((eNB==NULL)  && ru->function == NGFI_RRU_IF4p5) {
     /// **** send_IF4 of rxsigF to RAU **** ///
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
+    if (br_flag == 1)
+      send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
     else
-#endif
       send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
+
     return;
   } else if (eNB!=NULL) {
     if ( LOG_DEBUGFLAG(PRACH)) {
@@ -443,27 +427,26 @@ void rx_prach0(PHY_VARS_eNB *eNB,
   uint8_t update_TA2 = 1;
 
   switch (eNB->frame_parms.N_RB_DL) {
+    case 6:
+      update_TA = 16;
+      break;
 
-  case 6:
-    update_TA = 16;
-    break;
-    
-  case 25:
-    update_TA = 4;
-    break;
-    
-  case 50:
-    update_TA = 2;
-    break;
-    
-  case 75:
-    update_TA  = 3;
-    update_TA2 = 2;
-    break;
-  case 100:
-    update_TA  = 1;
-    break;
+    case 25:
+      update_TA = 4;
+      break;
+
+    case 50:
+      update_TA = 2;
+      break;
 
+    case 75:
+      update_TA  = 3;
+      update_TA2 = 2;
+      break;
+
+    case 100:
+      update_TA  = 1;
+      break;
   }
 
   *max_preamble_energy=0;
@@ -568,16 +551,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
 
     if (new_dft == 1) {
       new_dft = 0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
       if (br_flag == 1) {
         Xu=(int16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
         prach_ifft = prach_ifftp[prach_ifft_cnt++];
 
         if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
-      } else
-#endif
-      {
+      } else {
         Xu=(int16_t *)eNB->X_u[preamble_offset-first_nonzero_root_idx];
         prach_ifft = prach_ifftp[0];
         memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
@@ -632,13 +612,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
     } // new dft
 
     // check energy in nth time shift, for
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
     if ((br_flag==0) ||
         (eNB->prach_vars_br.repetition_number[ce_level]==
-         eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
-#endif
-    {
+         eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) {
       if (LOG_DEBUGFLAG(PRACH)) {
         int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
 
@@ -649,7 +625,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
 
       for (i=0; i<NCS2; i++) {
         lev = (int32_t)prach_ifft[(preamble_shift2+i)];
-	avg_en += lev;
+        avg_en += lev;
         levdB = dB_fixed_times10(lev);
 
         if (levdB>*max_preamble_energy) {
@@ -670,7 +646,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
       } ///ncs2
     }
   }// preamble_index
+
   *avg_preamble_energy=dB_fixed(avg_en/64);
+
   if (LOG_DUMPFLAG(PRACH)) {
     int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
 
@@ -688,7 +666,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
         LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
         LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
         LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
-	exit(-1);
+        exit(-1);
       } else {
         LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
         LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
@@ -703,14 +681,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
   if (eNB) stop_meas(&eNB->rx_prach);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
 void rx_prach(PHY_VARS_eNB *eNB,
               RU_t *ru,
               uint16_t *max_preamble,
               uint16_t *max_preamble_energy,
               uint16_t *max_preamble_delay,
-	      uint16_t *avg_preamble_energy,
+              uint16_t *avg_preamble_energy,
               uint16_t Nf,
               uint8_t tdd_mapindex,
               uint8_t br_flag) {
@@ -739,10 +716,9 @@ void rx_prach(PHY_VARS_eNB *eNB,
           eNB->prach_vars_br.repetition_number[i]=0;
         }
       }
-    }
-  }
+    } /* for i ... */
+  } /* else br_flag == 0 */
 }
 
 
-#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
 
diff --git a/openair1/PHY/LTE_TRANSPORT/prach_common.c b/openair1/PHY/LTE_TRANSPORT/prach_common.c
index 5f7a904db16f522a8a34972063c0e2f5ffde9235..393d4ca3f8bfd4c475dfbdfdbdfe9bef3f9582cb 100644
--- a/openair1/PHY/LTE_TRANSPORT/prach_common.c
+++ b/openair1/PHY/LTE_TRANSPORT/prach_common.c
@@ -326,11 +326,8 @@ uint16_t prach_root_sequence_map4[138] = {  1,138,2,137,3,136,4,135,5,134,6,133,
                                             61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
                                          };
 
-void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
-{
-
+void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
   FILE *fd;
-
   fd = fopen("prach_config.txt","w");
   fprintf(fd,"prach_config: subframe          = %d\n",subframe);
   fprintf(fd,"prach_config: N_RB_UL           = %d\n",frame_parms->N_RB_UL);
@@ -344,13 +341,10 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
   fprintf(fd,"prach_config: highSpeedFlag     = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag);
   fprintf(fd,"prach_config: n_ra_prboffset    = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset);
   fclose(fd);
-
 }
 
 // This function computes the du
-void fill_du(uint8_t prach_fmt)
-{
-
+void fill_du(uint8_t prach_fmt) {
   uint16_t iu,u,p;
   uint16_t N_ZC;
   uint16_t *prach_root_sequence_map;
@@ -364,7 +358,6 @@ void fill_du(uint8_t prach_fmt)
   }
 
   for (iu=0; iu<(N_ZC-1); iu++) {
-
     u=prach_root_sequence_map[iu];
     p=1;
 
@@ -373,27 +366,21 @@ void fill_du(uint8_t prach_fmt)
 
     du[u] = ((p<(N_ZC>>1)) ? p : (N_ZC-p));
   }
-
 }
 
-uint8_t get_num_prach_tdd(module_id_t Mod_id)
-{
+uint8_t get_num_prach_tdd(module_id_t Mod_id) {
   LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
   return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].num_prach);
 }
 
-uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index)
-{
+uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) {
   LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
   return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra);
 }
 
-uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
-{
-
+uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) {
   if (frame_type == FDD) // FDD
     return(prach_ConfigIndex>>4);
-
   else {
     if (prach_ConfigIndex < 20)
       return (0);
@@ -411,21 +398,18 @@ uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
   }
 }
 
-uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, 
-			     uint8_t prach_ConfigIndex, 
-			     uint8_t n_ra_prboffset,
-			     uint8_t tdd_mapindex, uint16_t Nf) 
-{
+uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
+                             uint8_t prach_ConfigIndex,
+                             uint8_t n_ra_prboffset,
+                             uint8_t tdd_mapindex, uint16_t Nf) {
   lte_frame_type_t frame_type         = frame_parms->frame_type;
   uint8_t tdd_config         = frame_parms->tdd_config;
-
   uint8_t n_ra_prb;
   uint8_t f_ra,t1_ra;
   uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
   uint8_t Nsp=2;
 
   if (frame_type == TDD) { // TDD
-
     if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) {
       LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex);
       return(-1);
@@ -452,21 +436,19 @@ uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
         n_ra_prb = frame_parms->N_RB_UL - 6*(f_ra+1);
       }
     }
-  }
-  else { //FDD
+  } else { //FDD
     n_ra_prb = n_ra_prboffset;
   }
+
   return(n_ra_prb);
 }
 
-int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe)
-{
+int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe) {
   //  uint8_t prach_ConfigIndex  = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
   uint8_t tdd_config         = frame_parms->tdd_config;
   uint8_t t0_ra;
   uint8_t t1_ra;
   uint8_t t2_ra;
-
   int prach_mask = 0;
 
   if (frame_parms->frame_type == FDD) { //FDD
@@ -479,68 +461,78 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
         return(0);
 
     switch (prach_ConfigIndex&0x1f) {
-    case 0:
-    case 3:
-      if (subframe==1) prach_mask = 1;
-      break;
-
-    case 1:
-    case 4:
-      if (subframe==4) prach_mask = 1;
-      break;
-
-    case 2:
-    case 5:
-      if (subframe==7) prach_mask = 1;
-      break;
-
-    case 6:
-      if ((subframe==1) || (subframe==6)) prach_mask=1;
-      break;
-
-    case 7:
-      if ((subframe==2) || (subframe==7)) prach_mask=1;
-      break;
-
-    case 8:
-      if ((subframe==3) || (subframe==8)) prach_mask=1;
-      break;
-
-    case 9:
-      if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
-      break;
-
-    case 10:
-      if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
-      break;
-
-    case 11:
-      if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
-      break;
-
-    case 12:
-      if ((subframe&1)==0) prach_mask=1;
-      break;
-
-    case 13:
-      if ((subframe&1)==1) prach_mask=1;
-      break;
-
-    case 14:
-      prach_mask=1;
-      break;
-
-    case 15:
-      if (subframe==9) prach_mask=1;
-      break;
+      case 0:
+      case 3:
+        if (subframe==1) prach_mask = 1;
+
+        break;
+
+      case 1:
+      case 4:
+        if (subframe==4) prach_mask = 1;
+
+        break;
+
+      case 2:
+      case 5:
+        if (subframe==7) prach_mask = 1;
+
+        break;
+
+      case 6:
+        if ((subframe==1) || (subframe==6)) prach_mask=1;
+
+        break;
+
+      case 7:
+        if ((subframe==2) || (subframe==7)) prach_mask=1;
+
+        break;
+
+      case 8:
+        if ((subframe==3) || (subframe==8)) prach_mask=1;
+
+        break;
+
+      case 9:
+        if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
+
+        break;
+
+      case 10:
+        if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
+
+        break;
+
+      case 11:
+        if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
+
+        break;
+
+      case 12:
+        if ((subframe&1)==0) prach_mask=1;
+
+        break;
+
+      case 13:
+        if ((subframe&1)==1) prach_mask=1;
+
+        break;
+
+      case 14:
+        prach_mask=1;
+        break;
+
+      case 15:
+        if (subframe==9) prach_mask=1;
+
+        break;
     }
   } else { // TDD
-
     AssertFatal(prach_ConfigIndex<64,
-		"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
+                "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
     AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0,
-		"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
-
+                "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
     t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra;
     t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
     t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra;
@@ -557,7 +549,7 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
         (((subframe<5)&&(t1_ra==0)) ||                   // PRACH is in 1st half-frame
          (((subframe>4)&&(t1_ra==1))))) {                // PRACH is in 2nd half-frame
       if ((prach_ConfigIndex<48) &&                          // PRACH only in normal UL subframe
-	  (((subframe%5)-2)==t2_ra)) prach_mask=1;
+          (((subframe%5)-2)==t2_ra)) prach_mask=1;
       else if ((prach_ConfigIndex>47) && (((subframe%5)-1)==t2_ra)) prach_mask=1;      // PRACH can be in UpPTS
     }
   }
@@ -566,29 +558,25 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
 }
 
 int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t subframe) {
-  
   uint8_t prach_ConfigIndex  = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
   int prach_mask             = is_prach_subframe0(frame_parms, prach_ConfigIndex, frame, subframe);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   for (int i=0; i<4; i++) {
-    if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1) 
+    if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1)
       prach_mask |= (is_prach_subframe0(frame_parms, frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],
                                         frame, subframe) << (i+1));
   }
-#endif
+
   return(prach_mask);
 }
 
 
 void compute_prach_seq(uint16_t rootSequenceIndex,
-		       uint8_t prach_ConfigIndex,
-		       uint8_t zeroCorrelationZoneConfig,
-		       uint8_t highSpeedFlag,
-		       lte_frame_type_t frame_type,
-		       uint32_t X_u[64][839])
-{
-
+                       uint8_t prach_ConfigIndex,
+                       uint8_t zeroCorrelationZoneConfig,
+                       uint8_t highSpeedFlag,
+                       lte_frame_type_t frame_type,
+                       uint32_t X_u[64][839]) {
   // Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC)
   unsigned int k,inv_u,i,NCS=0,num_preambles;
   int N_ZC;
@@ -597,15 +585,12 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
   uint16_t u, preamble_offset;
   uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
   uint8_t not_found;
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN);
-
 #ifdef PRACH_DEBUG
   LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %d\n",zeroCorrelationZoneConfig, prach_fmt);
 #endif
-
   AssertFatal(prach_fmt<4,
-	      "PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
+              "PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
   N_ZC = (prach_fmt < 4) ? 839 : 139;
   //init_prach_tables(N_ZC); //moved to phy_init_lte_ue/eNB, since it takes to long in real-time
 
@@ -616,37 +601,30 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
     prach_root_sequence_map = prach_root_sequence_map4;
   }
 
-
 #ifdef PRACH_DEBUG
   LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
 #endif
 
   if (highSpeedFlag== 0) {
-
 #ifdef PRACH_DEBUG
     LOG_I(PHY,"Low speed prach : NCS_config %d\n",zeroCorrelationZoneConfig);
 #endif
-
     AssertFatal(zeroCorrelationZoneConfig<=15,
-		"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
+                "FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
     NCS = NCS_unrestricted[zeroCorrelationZoneConfig];
-
     num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC);
 
     if (NCS>0) num_preambles++;
 
     preamble_offset = 0;
   } else {
-
 #ifdef PRACH_DEBUG
     LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", zeroCorrelationZoneConfig );
 #endif
-
     AssertFatal(zeroCorrelationZoneConfig<=14,
-		"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
+                "FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
     NCS = NCS_restricted[zeroCorrelationZoneConfig];
     fill_du(prach_fmt);
-
     num_preambles = 64; // compute ZC sequence for 64 possible roots
     // find first non-zero shift root (stored in preamble_offset)
     not_found = 1;
@@ -665,7 +643,6 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
       }
 
       u = prach_root_sequence_map[index];
-
       uint16_t n_group_ra = 0;
 
       if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
@@ -714,28 +691,22 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
     }
 
     u = prach_root_sequence_map[index];
-
     inv_u = ZC_inv[u]; // multiplicative inverse of u
 
-
     // X_u[0] stores the first ZC sequence where the root u has a non-zero number of shifts
     // for the unrestricted case X_u[0] is the first root indicated by the rootSequenceIndex
 
     for (k=0; k<N_ZC; k++) {
       // 420 is the multiplicative inverse of 2 (required since ru is exp[j 2\pi n])
-      X_u[i][k] = ((uint32_t*)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
+      X_u[i][k] = ((uint32_t *)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
     }
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_OUT);
-
 }
 
-void init_prach_tables(int N_ZC)
-{
-
+void init_prach_tables(int N_ZC) {
   int i,m;
-
   // Compute the modular multiplicative inverse 'iu' of u s.t. iu*u = 1 mod N_ZC
   ZC_inv[0] = 0;
   ZC_inv[1] = 1;
diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c
index defe86ef388b0e42363663e0ad45e1c00c979ab3..031c97e50d6c52051abc5f62f3829fdf2c2dbbf3 100644
--- a/openair1/PHY/LTE_TRANSPORT/print_stats.c
+++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c
@@ -477,7 +477,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
       len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
       len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
       len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
       int i=0;
 
       //len += sprintf(&buffer[len], "[UE PROC] MCH  Total %d\n", ue->dlsch_mch_received[0]);
@@ -488,7 +487,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
                        i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]);
       }
 
-#endif
       len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000));
       len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000));
       len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c
index 72be96c95bfb4509bc821d8ad75346077798af02..8c19f44d2f83a03d57080b44ee225cdd4beb592f 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch.c
+++ b/openair1/PHY/LTE_TRANSPORT/pucch.c
@@ -30,7 +30,7 @@
 * \warning
 */
 #include "PHY/defs_eNB.h"
-#include "PHY/phy_extern.h" 
+#include "PHY/phy_extern.h"
 #include "LAYER2/MAC/mac.h"
 #include "PHY/LTE_REFSIG/lte_refsig.h"
 
@@ -69,56 +69,52 @@ int16_t cfo_pucch_ep[24*6] = {24278,-22005,29621,-14010,32412,-4808,32412,4807,2
 /* SubCarrier Demap */
 uint16_t pucchfmt3_subCarrierDeMapping( PHY_VARS_eNB *eNB,
                                         int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2],
-                                        uint16_t n3_pucch )
-{
-    LTE_eNB_COMMON *eNB_common_vars  = &eNB->common_vars;
-    LTE_DL_FRAME_PARMS  *frame_parms = &eNB->frame_parms;
-    int16_t             *rxptr;
-    uint8_t             N_UL_symb    = D_NSYM1SLT;                      // only Normal CP format
-    uint16_t            m;                                              // Mapping to physical resource blocks(m)
-    uint32_t            aa;
-    uint16_t            k, l;
-    uint32_t            symbol_offset;
-    uint16_t            carrier_offset;
-    
-    
-    m = n3_pucch / D_NPUCCH_SF5;
-    
-    // Do detection
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        
-        for (l=0; l<D_NSYM1SF; l++) {
-            
-            if ((l<N_UL_symb) && ((m&1) == 0))
-                carrier_offset = (m*6) + frame_parms->first_carrier_offset;
-            else if ((l<N_UL_symb) && ((m&1) == 1))
-                carrier_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
-            else if ((m&1) == 0)
-                carrier_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
-            else
-                carrier_offset = (((m-1)*6) + frame_parms->first_carrier_offset);
-            
-            if (carrier_offset > frame_parms->ofdm_symbol_size)
-                carrier_offset -= (frame_parms->ofdm_symbol_size);
-            
-            symbol_offset = (unsigned int)frame_parms->ofdm_symbol_size*l;
-            rxptr = (int16_t *)&eNB_common_vars->rxdataF[aa][symbol_offset];
-            
-            for (k=0; k<12; k++,carrier_offset++) {
-                SubCarrierDeMapData[aa][l][k][0] = (int16_t)rxptr[carrier_offset<<1];      // DeMapping Data I
-                SubCarrierDeMapData[aa][l][k][1] = (int16_t)rxptr[1+(carrier_offset<<1)];  // DeMapping Date Q
-                
-                if (carrier_offset==frame_parms->ofdm_symbol_size)
-                    carrier_offset = 0;
-                
-		/*                #ifdef DEBUG_PUCCH_RX
-                    LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d,%d) : (%d,%d)\n",subframe,l,k,carrier_offset,m,
-                    SubCarrierDeMapData[aa][l][k][0],SubCarrierDeMapData[aa][l][k][1]);
-		    #endif*/
-            }
-        }
+                                        uint16_t n3_pucch ) {
+  LTE_eNB_COMMON *eNB_common_vars  = &eNB->common_vars;
+  LTE_DL_FRAME_PARMS  *frame_parms = &eNB->frame_parms;
+  int16_t             *rxptr;
+  uint8_t             N_UL_symb    = D_NSYM1SLT;                      // only Normal CP format
+  uint16_t            m;                                              // Mapping to physical resource blocks(m)
+  uint32_t            aa;
+  uint16_t            k, l;
+  uint32_t            symbol_offset;
+  uint16_t            carrier_offset;
+  m = n3_pucch / D_NPUCCH_SF5;
+
+  // Do detection
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (l=0; l<D_NSYM1SF; l++) {
+      if ((l<N_UL_symb) && ((m&1) == 0))
+        carrier_offset = (m*6) + frame_parms->first_carrier_offset;
+      else if ((l<N_UL_symb) && ((m&1) == 1))
+        carrier_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
+      else if ((m&1) == 0)
+        carrier_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
+      else
+        carrier_offset = (((m-1)*6) + frame_parms->first_carrier_offset);
+
+      if (carrier_offset > frame_parms->ofdm_symbol_size)
+        carrier_offset -= (frame_parms->ofdm_symbol_size);
+
+      symbol_offset = (unsigned int)frame_parms->ofdm_symbol_size*l;
+      rxptr = (int16_t *)&eNB_common_vars->rxdataF[aa][symbol_offset];
+
+      for (k=0; k<12; k++,carrier_offset++) {
+        SubCarrierDeMapData[aa][l][k][0] = (int16_t)rxptr[carrier_offset<<1];      // DeMapping Data I
+        SubCarrierDeMapData[aa][l][k][1] = (int16_t)rxptr[1+(carrier_offset<<1)];  // DeMapping Date Q
+
+        if (carrier_offset==frame_parms->ofdm_symbol_size)
+          carrier_offset = 0;
+
+        /*                #ifdef DEBUG_PUCCH_RX
+                        LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d,%d) : (%d,%d)\n",subframe,l,k,carrier_offset,m,
+                        SubCarrierDeMapData[aa][l][k][0],SubCarrierDeMapData[aa][l][k][1]);
+            #endif*/
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 /* cyclic shift hopping remove */
@@ -126,51 +122,44 @@ uint16_t pucchfmt3_Baseseq_csh_remove( int16_t SubCarrierDeMapData[NB_ANTENNAS_R
                                        int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2],
                                        LTE_DL_FRAME_PARMS *frame_parms,
                                        uint8_t subframe,
-                                       uint8_t ncs_cell[20][7] )
-{
-    //int16_t     calctmp_baSeq[2];
-    int16_t     calctmp_beta[2];
-    int16_t     calctmp_alphak[2];
-    int16_t     calctmp_SCDeMapData_alphak[2];
-    int32_t     n_cell_cs_div64;
-    int32_t     n_cell_cs_modNSC_RB;
-    
-    //int32_t     NSlot1subframe  = D_NSLT1SF;
-    int32_t     NSym1slot       = D_NSYM1SLT; // Symbol per 1slot
-    int32_t     NSym1subframe   = D_NSYM1SF;  // Symbol per 1subframe
-    int32_t     aa, symNo, slotNo, sym, k;
-    
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {  // Antenna
-        for (symNo=0; symNo<NSym1subframe; symNo++) {   // Symbol
-            slotNo = symNo / NSym1slot;
-            sym = symNo % NSym1slot;
-            
-            n_cell_cs_div64 = (int32_t)(ncs_cell[2*subframe+slotNo][sym]/64.0);
-            n_cell_cs_modNSC_RB = ncs_cell[2*subframe+slotNo][sym] % 12;
-            
-            // for canceling e^(j*PI|_n_cs^cell(ns,l)/64_|/2).
-            calctmp_beta[0] = RotTBL_re[(n_cell_cs_div64)&0x3];
-            calctmp_beta[1] = RotTBL_im[(n_cell_cs_div64)&0x3];
-            
-            for (k=0; k<12; k++) {  // Sub Carrier
-                
-                // for canceling being cyclically shifted"(i+n_cs^cell(ns,l))".
-                // e^((j*2PI(n_cs^cell(ns,l) mod N_SC)/N_SC)*k).
-                calctmp_alphak[0] = alphaTBL_re[((n_cell_cs_modNSC_RB)*k)%12];
-                calctmp_alphak[1] = alphaTBL_im[((n_cell_cs_modNSC_RB)*k)%12];
-                
-                // e^(-alphar*k)*r_l,m,n,k
-                calctmp_SCDeMapData_alphak[0] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][0] * calctmp_alphak[0] + (int32_t)SubCarrierDeMapData[aa][symNo][k][1] * calctmp_alphak[1])>>15);
-                calctmp_SCDeMapData_alphak[1] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][1] * calctmp_alphak[0] - (int32_t)SubCarrierDeMapData[aa][symNo][k][0] * calctmp_alphak[1])>>15);
-                
-                // (e^(-alphar*k)*r_l,m,n,k) * e^(-beta)
-                CshData_fmt3[aa][symNo][k][0] = (((int32_t)calctmp_SCDeMapData_alphak[0] * calctmp_beta[0] + (int32_t)calctmp_SCDeMapData_alphak[1] * calctmp_beta[1])>>15);
-                CshData_fmt3[aa][symNo][k][1] = (((int32_t)calctmp_SCDeMapData_alphak[1] * calctmp_beta[0] - (int32_t)calctmp_SCDeMapData_alphak[0] * calctmp_beta[1])>>15);
-            }
-        }
+                                       uint8_t ncs_cell[20][7] ) {
+  //int16_t     calctmp_baSeq[2];
+  int16_t     calctmp_beta[2];
+  int16_t     calctmp_alphak[2];
+  int16_t     calctmp_SCDeMapData_alphak[2];
+  int32_t     n_cell_cs_div64;
+  int32_t     n_cell_cs_modNSC_RB;
+  //int32_t     NSlot1subframe  = D_NSLT1SF;
+  int32_t     NSym1slot       = D_NSYM1SLT; // Symbol per 1slot
+  int32_t     NSym1subframe   = D_NSYM1SF;  // Symbol per 1subframe
+  int32_t     aa, symNo, slotNo, sym, k;
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {  // Antenna
+    for (symNo=0; symNo<NSym1subframe; symNo++) {   // Symbol
+      slotNo = symNo / NSym1slot;
+      sym = symNo % NSym1slot;
+      n_cell_cs_div64 = (int32_t)(ncs_cell[2*subframe+slotNo][sym]/64.0);
+      n_cell_cs_modNSC_RB = ncs_cell[2*subframe+slotNo][sym] % 12;
+      // for canceling e^(j*PI|_n_cs^cell(ns,l)/64_|/2).
+      calctmp_beta[0] = RotTBL_re[(n_cell_cs_div64)&0x3];
+      calctmp_beta[1] = RotTBL_im[(n_cell_cs_div64)&0x3];
+
+      for (k=0; k<12; k++) {  // Sub Carrier
+        // for canceling being cyclically shifted"(i+n_cs^cell(ns,l))".
+        // e^((j*2PI(n_cs^cell(ns,l) mod N_SC)/N_SC)*k).
+        calctmp_alphak[0] = alphaTBL_re[((n_cell_cs_modNSC_RB)*k)%12];
+        calctmp_alphak[1] = alphaTBL_im[((n_cell_cs_modNSC_RB)*k)%12];
+        // e^(-alphar*k)*r_l,m,n,k
+        calctmp_SCDeMapData_alphak[0] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][0] * calctmp_alphak[0] + (int32_t)SubCarrierDeMapData[aa][symNo][k][1] * calctmp_alphak[1])>>15);
+        calctmp_SCDeMapData_alphak[1] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][1] * calctmp_alphak[0] - (int32_t)SubCarrierDeMapData[aa][symNo][k][0] * calctmp_alphak[1])>>15);
+        // (e^(-alphar*k)*r_l,m,n,k) * e^(-beta)
+        CshData_fmt3[aa][symNo][k][0] = (((int32_t)calctmp_SCDeMapData_alphak[0] * calctmp_beta[0] + (int32_t)calctmp_SCDeMapData_alphak[1] * calctmp_beta[1])>>15);
+        CshData_fmt3[aa][symNo][k][1] = (((int32_t)calctmp_SCDeMapData_alphak[1] * calctmp_beta[0] - (int32_t)calctmp_SCDeMapData_alphak[0] * calctmp_beta[1])>>15);
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 #define MAXROW_TBL_SF5_OS_IDX    (5)    // Orthogonal sequence index
@@ -189,436 +178,456 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
                                       LTE_DL_FRAME_PARMS *frame_parms,
                                       uint16_t n3_pucch,
                                       uint16_t n3_pucch_array[NUMBER_OF_UE_MAX],
-                                      uint8_t ncs_cell[20][7] )
-{
-    uint32_t        aa, symNo, k, slotNo, sym, i, j;
-    int16_t         np, np_n, ip_ind;
-    //int16_t         npucch_sf;
-    int16_t         calctmp[2];
-    int16_t         BsCshData[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2];
-    //int16_t         delta_theta_calctmp[NB_ANTENNAS_RX][4][D_NSC1RB][2], delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2];
-    int16_t         delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2];
-    int16_t         CsData_allavg[NB_ANTENNAS_RX][14][2];
-    int16_t         CsData_temp[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2];
-    int32_t         IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2];
-    int32_t         IP_allavg[D_NPUCCH_SF5];
-    //int16_t         temp_ch[2];
-	int16_t         m[NUMBER_OF_UE_MAX], m_self=0, same_m_number;
-	uint16_t        n3_pucch_sameRB[NUMBER_OF_UE_MAX];
-	int16_t         n_oc0[NUMBER_OF_UE_MAX];
-	int16_t         n_oc1[NUMBER_OF_UE_MAX];
-	int16_t         np_n_array[2][NUMBER_OF_UE_MAX]; //Cyclic shift
-	uint8_t N_PUCCH_SF0 = 5;
-	uint8_t N_PUCCH_SF1 = (shortened_format==0)? 5:4;
-    
-    uint32_t u0 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1]) % 30;
-    uint32_t u1 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)]) % 30;
-    uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
-    uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
-    
-    uint32_t u=u0;
-    uint32_t v=v0;
-    
-    //double d_theta[32]={0.0};
-    //int32_t temp_theta[32][2]={0};
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (symNo=0; symNo<D_NSYM1SF; symNo++){
-            for(ip_ind=0; ip_ind<D_NPUCCH_SF5-1; ip_ind++) {
-                IP_CsData_allsfavg[aa][symNo][ip_ind][0] = 0;
-                IP_CsData_allsfavg[aa][symNo][ip_ind][1] = 0;
-            }
-        }
+                                      uint8_t ncs_cell[20][7] ) {
+  uint32_t        aa, symNo, k, slotNo, sym, i, j;
+  int16_t         np, np_n, ip_ind;
+  //int16_t         npucch_sf;
+  int16_t         calctmp[2];
+  int16_t         BsCshData[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2];
+  //int16_t         delta_theta_calctmp[NB_ANTENNAS_RX][4][D_NSC1RB][2], delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2];
+  int16_t         delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2];
+  int16_t         CsData_allavg[NB_ANTENNAS_RX][14][2];
+  int16_t         CsData_temp[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2];
+  int32_t         IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2];
+  int32_t         IP_allavg[D_NPUCCH_SF5];
+  //int16_t         temp_ch[2];
+  int16_t         m[NUMBER_OF_UE_MAX], m_self=0, same_m_number;
+  uint16_t        n3_pucch_sameRB[NUMBER_OF_UE_MAX];
+  int16_t         n_oc0[NUMBER_OF_UE_MAX];
+  int16_t         n_oc1[NUMBER_OF_UE_MAX];
+  int16_t         np_n_array[2][NUMBER_OF_UE_MAX]; //Cyclic shift
+  uint8_t N_PUCCH_SF0 = 5;
+  uint8_t N_PUCCH_SF1 = (shortened_format==0)? 5:4;
+  uint32_t u0 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1]) % 30;
+  uint32_t u1 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)]) % 30;
+  uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
+  uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
+  uint32_t u=u0;
+  uint32_t v=v0;
+
+  //double d_theta[32]={0.0};
+  //int32_t temp_theta[32][2]={0};
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (symNo=0; symNo<D_NSYM1SF; symNo++) {
+      for(ip_ind=0; ip_ind<D_NPUCCH_SF5-1; ip_ind++) {
+        IP_CsData_allsfavg[aa][symNo][ip_ind][0] = 0;
+        IP_CsData_allsfavg[aa][symNo][ip_ind][1] = 0;
+      }
     }
-	
-	// compute m[], m_self
-	for(i=0; i<NUMBER_OF_UE_MAX; i++) {
-		m[i] = n3_pucch_array[i] / N_PUCCH_SF0; // N_PUCCH_SF0 = 5
-		if(n3_pucch_array[i] == n3_pucch) {
-			m_self = i;
-		}
-	}
-	
-	for(i=0; i<NUMBER_OF_UE_MAX; i++) {
-		//printf("n3_pucch_array[%d]=%d, m[%d]=%d \n", i, n3_pucch_array[i], i, m[i]);
-	}
-	//printf("m_self=%d \n", m_self);
-	
-	// compute n3_pucch_sameRB[] // Not 4 not be equally divided
-	for(i=0, same_m_number=0; i<NUMBER_OF_UE_MAX; i++) {
-		if(m[i] == m[m_self]) {
-			n3_pucch_sameRB[same_m_number] = n3_pucch_array[i];
-			same_m_number++;
-		}
-	}
-	//printf("same_m_number = %d \n", same_m_number);
-	for(i=0; i<same_m_number; i++) {
-		//printf("n3_pucch_sameRB[%d]=%d \n", i, n3_pucch_sameRB[i]);
-	}
-	
-	// compute n_oc1[], n_oc0[]
-	for(i=0; i<same_m_number; i++) {
-		n_oc0[i] = n3_pucch_sameRB[i] % N_PUCCH_SF1; //N_PUCCH_SF1 = (shortened_format==0)? 5:4;
-		if (N_PUCCH_SF1 == 5) {
-			n_oc1[i] = (3 * n_oc0[i]) % N_PUCCH_SF1;
-		} else {
-			n_oc1[i] = n_oc0[i] % N_PUCCH_SF1;
-		}
-	}
-	for(i=0; i<same_m_number; i++) {
-		//printf("n_oc0[%d]=%d, n_oc1[%d]=%d \n", i, n_oc0[i], i, n_oc1[i]);
-	}
-	
-	
-	// np_n_array[][]
-	for(i=0; i<same_m_number; i++) {
-		if (N_PUCCH_SF1 == 5) {
-			np_n_array[0][i] = TBL_3_SF5_GEN_N_DASH_NS[n_oc0[i]]; //slot0
-			np_n_array[1][i] = TBL_3_SF5_GEN_N_DASH_NS[n_oc1[i]]; //slot1
-		} else {
-			np_n_array[0][i] = TBL_3_SF4_GEN_N_DASH_NS[n_oc0[i]];
-			np_n_array[1][i] = TBL_3_SF4_GEN_N_DASH_NS[n_oc1[i]];
-		}
-	}
-	for(i=0; i<same_m_number; i++) {
-		//printf("np_n_array[0][%d]=%d ,np_n_array[1][%d]=%d \n", i, np_n_array[0][i], i, np_n_array[1][i]);
-	}
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (symNo=0; symNo<D_NSYM1SF; symNo++){ // #define D_NSYM1SF       2*7
-            slotNo = symNo / D_NSYM1SLT;
-            sym = symNo % D_NSYM1SLT;
-            
-            for (k=0; k<D_NSC1RB; k++) { // #define D_NSC1RB        12
-                
-                // remove Base Sequence (c_r^*)*(r_l,m,m,n,k) = BsCshData
-                BsCshData[aa][symNo][k][0] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][0] * ul_ref_sigs[u][v][0][k<<1] + (int32_t)SubCarrierDeMapData[aa][symNo][k][1] * ul_ref_sigs[u][v][0][1+(k<<1)])>>15);
-                BsCshData[aa][symNo][k][1] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][1] * ul_ref_sigs[u][v][0][k<<1] - (int32_t)SubCarrierDeMapData[aa][symNo][k][0] * ul_ref_sigs[u][v][0][1+(k<<1)])>>15);
-                
-                if(shortened_format == 1) {
-                    if (symNo < D_NSYM1SLT) { 
-                        np = n3_pucch % D_NPUCCH_SF4;		// np = n_oc
-                        np_n = TBL_3_SF4_GEN_N_DASH_NS[np]; //
-                    } else {
-                        np = n3_pucch % D_NPUCCH_SF4;		//
-                        np_n = TBL_3_SF4_GEN_N_DASH_NS[np]; //
-                    }
-                    //npucch_sf = D_NPUCCH_SF4;// = 4
-                } else {
-                    if (symNo < D_NSYM1SLT) {
-                        np = n3_pucch % D_NPUCCH_SF5;
-                        np_n = TBL_3_SF5_GEN_N_DASH_NS[np];
-                    } else {
-                        np = (3 * n3_pucch) % D_NPUCCH_SF5;
-                        np_n = TBL_3_SF5_GEN_N_DASH_NS[np];
-                    }
-                    //npucch_sf = D_NPUCCH_SF5;// = 5
+  }
+
+  // compute m[], m_self
+  for(i=0; i<NUMBER_OF_UE_MAX; i++) {
+    m[i] = n3_pucch_array[i] / N_PUCCH_SF0; // N_PUCCH_SF0 = 5
+
+    if(n3_pucch_array[i] == n3_pucch) {
+      m_self = i;
+    }
+  }
+
+  for(i=0; i<NUMBER_OF_UE_MAX; i++) {
+    //printf("n3_pucch_array[%d]=%d, m[%d]=%d \n", i, n3_pucch_array[i], i, m[i]);
+  }
+
+  //printf("m_self=%d \n", m_self);
+
+  // compute n3_pucch_sameRB[] // Not 4 not be equally divided
+  for(i=0, same_m_number=0; i<NUMBER_OF_UE_MAX; i++) {
+    if(m[i] == m[m_self]) {
+      n3_pucch_sameRB[same_m_number] = n3_pucch_array[i];
+      same_m_number++;
+    }
+  }
+
+  //printf("same_m_number = %d \n", same_m_number);
+  for(i=0; i<same_m_number; i++) {
+    //printf("n3_pucch_sameRB[%d]=%d \n", i, n3_pucch_sameRB[i]);
+  }
+
+  // compute n_oc1[], n_oc0[]
+  for(i=0; i<same_m_number; i++) {
+    n_oc0[i] = n3_pucch_sameRB[i] % N_PUCCH_SF1; //N_PUCCH_SF1 = (shortened_format==0)? 5:4;
+
+    if (N_PUCCH_SF1 == 5) {
+      n_oc1[i] = (3 * n_oc0[i]) % N_PUCCH_SF1;
+    } else {
+      n_oc1[i] = n_oc0[i] % N_PUCCH_SF1;
+    }
+  }
+
+  for(i=0; i<same_m_number; i++) {
+    //printf("n_oc0[%d]=%d, n_oc1[%d]=%d \n", i, n_oc0[i], i, n_oc1[i]);
+  }
+
+  // np_n_array[][]
+  for(i=0; i<same_m_number; i++) {
+    if (N_PUCCH_SF1 == 5) {
+      np_n_array[0][i] = TBL_3_SF5_GEN_N_DASH_NS[n_oc0[i]]; //slot0
+      np_n_array[1][i] = TBL_3_SF5_GEN_N_DASH_NS[n_oc1[i]]; //slot1
+    } else {
+      np_n_array[0][i] = TBL_3_SF4_GEN_N_DASH_NS[n_oc0[i]];
+      np_n_array[1][i] = TBL_3_SF4_GEN_N_DASH_NS[n_oc1[i]];
+    }
+  }
+
+  for(i=0; i<same_m_number; i++) {
+    //printf("np_n_array[0][%d]=%d ,np_n_array[1][%d]=%d \n", i, np_n_array[0][i], i, np_n_array[1][i]);
+  }
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (symNo=0; symNo<D_NSYM1SF; symNo++) { // #define D_NSYM1SF       2*7
+      slotNo = symNo / D_NSYM1SLT;
+      sym = symNo % D_NSYM1SLT;
+
+      for (k=0; k<D_NSC1RB; k++) { // #define D_NSC1RB        12
+        // remove Base Sequence (c_r^*)*(r_l,m,m,n,k) = BsCshData
+        BsCshData[aa][symNo][k][0] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][0] * ul_ref_sigs[u][v][0][k<<1] + (int32_t)SubCarrierDeMapData[aa][symNo][k][1] * ul_ref_sigs[u][v][0][1+(k<<1)])>>15);
+        BsCshData[aa][symNo][k][1] = (((int32_t)SubCarrierDeMapData[aa][symNo][k][1] * ul_ref_sigs[u][v][0][k<<1] - (int32_t)SubCarrierDeMapData[aa][symNo][k][0] * ul_ref_sigs[u][v][0][1+(k<<1)])>>15);
+
+        if(shortened_format == 1) {
+          if (symNo < D_NSYM1SLT) {
+            np = n3_pucch % D_NPUCCH_SF4;   // np = n_oc
+            np_n = TBL_3_SF4_GEN_N_DASH_NS[np]; //
+          } else {
+            np = n3_pucch % D_NPUCCH_SF4;   //
+            np_n = TBL_3_SF4_GEN_N_DASH_NS[np]; //
+          }
+
+          //npucch_sf = D_NPUCCH_SF4;// = 4
+        } else {
+          if (symNo < D_NSYM1SLT) {
+            np = n3_pucch % D_NPUCCH_SF5;
+            np_n = TBL_3_SF5_GEN_N_DASH_NS[np];
+          } else {
+            np = (3 * n3_pucch) % D_NPUCCH_SF5;
+            np_n = TBL_3_SF5_GEN_N_DASH_NS[np];
+          }
+
+          //npucch_sf = D_NPUCCH_SF5;// = 5
+        }
+
+        // cyclic shift e^(-j * beta_n * k)
+        calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + np_n)%D_NSC1RB)*k)%12];
+        calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + np_n)%D_NSC1RB)*k)%12];
+        // Channel Estimation 1A, g'(n_cs)_l,m,n
+        // CsData_temp = g_l,m,n,k
+        // remove cyclic shift BsCshData * e^(-j * beta_n * k)
+        CsData_temp[aa][symNo][k][0]=((((int32_t)BsCshData[aa][symNo][k][0] * calctmp[0] + (int32_t)BsCshData[aa][symNo][k][1] * calctmp[1])/ D_NSC1RB)>>15);
+        CsData_temp[aa][symNo][k][1]=((((int32_t)BsCshData[aa][symNo][k][1] * calctmp[0] - (int32_t)BsCshData[aa][symNo][k][0] * calctmp[1])/ D_NSC1RB)>>15);
+        // Interference power for Channel Estimation 1A, No use Cyclic Shift g'(n_cs)_l,m,n
+        // Calculated by the cyclic shift that is not used  S(ncs)_est
+        ip_ind = 0;
+
+        for(i=0; i<N_PUCCH_SF1; i++) {
+          for(j=0; j<same_m_number; j++) {  //np_n_array Loop
+            if(shortened_format == 1) {
+              if(symNo < D_NSYM1SLT) { // if SF==1 slot0
+                if(TBL_3_SF4_GEN_N_DASH_NS[i] == np_n_array[0][j]) {
+                  break;
+                }
+              } else { // if SF==1 slot1
+                if(TBL_3_SF4_GEN_N_DASH_NS[i] == np_n_array[1][j]) {
+                  break;
+                }
+              }
+            } else {
+              if(symNo < D_NSYM1SLT) { // if SF==0 slot0
+                if(TBL_3_SF5_GEN_N_DASH_NS[i] == np_n_array[0][j]) {
+                  break;
+                }
+              } else { // if SF==0 slot1
+                if(TBL_3_SF5_GEN_N_DASH_NS[i] == np_n_array[1][j]) {
+                  break;
                 }
-                // cyclic shift e^(-j * beta_n * k)
-                calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + np_n)%D_NSC1RB)*k)%12];
-                calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + np_n)%D_NSC1RB)*k)%12];
-                
-                // Channel Estimation 1A, g'(n_cs)_l,m,n
-            	// CsData_temp = g_l,m,n,k
-                // remove cyclic shift BsCshData * e^(-j * beta_n * k)
-                CsData_temp[aa][symNo][k][0]=((((int32_t)BsCshData[aa][symNo][k][0] * calctmp[0] + (int32_t)BsCshData[aa][symNo][k][1] * calctmp[1])/ D_NSC1RB)>>15);
-                CsData_temp[aa][symNo][k][1]=((((int32_t)BsCshData[aa][symNo][k][1] * calctmp[0] - (int32_t)BsCshData[aa][symNo][k][0] * calctmp[1])/ D_NSC1RB)>>15);
-                
-            	// Interference power for Channel Estimation 1A, No use Cyclic Shift g'(n_cs)_l,m,n
-            	// Calculated by the cyclic shift that is not used  S(ncs)_est
-            	ip_ind = 0;
-	        	for(i=0; i<N_PUCCH_SF1; i++) {
-					for(j=0; j<same_m_number; j++) {	//np_n_array Loop
-						if(shortened_format == 1) {
-							if(symNo < D_NSYM1SLT) { // if SF==1 slot0
-								if(TBL_3_SF4_GEN_N_DASH_NS[i] == np_n_array[0][j]) {
-									break;
-								}
-            				} else { // if SF==1 slot1
-								if(TBL_3_SF4_GEN_N_DASH_NS[i] == np_n_array[1][j]) {
-									break;
-								}
-            				}
-						} else {
-							if(symNo < D_NSYM1SLT) { // if SF==0 slot0
-								if(TBL_3_SF5_GEN_N_DASH_NS[i] == np_n_array[0][j]) {
-									break;
-								}
-            				} else { // if SF==0 slot1
-								if(TBL_3_SF5_GEN_N_DASH_NS[i] == np_n_array[1][j]) {
-									break;
-								}
-            				}
-						}
-						if(j == same_m_number - 1) { //when even once it has not been used
-							if(shortened_format == 1) {
-								calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF4_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12]; //D_NSC1RB =12
-		                        calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF4_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
-							} else {
-								calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF5_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
-		                        calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF5_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
-							}
-							// IP_CsData_allsfavg = g'(n_cs)_l,m,n
-	                        IP_CsData_allsfavg[aa][symNo][ip_ind][0] += ((((int32_t)BsCshData[aa][symNo][k][0] * calctmp[0] + (int32_t)BsCshData[aa][symNo][k][1] * calctmp[1]))>>15);
-	                        IP_CsData_allsfavg[aa][symNo][ip_ind][1] += ((((int32_t)BsCshData[aa][symNo][k][1] * calctmp[0] - (int32_t)BsCshData[aa][symNo][k][0] * calctmp[1]))>>15);
-							if((symNo == 1 || symNo == 5 || symNo == 8 || symNo == 12)) {
-							}
-	                        ip_ind++;
-		        		}
-					}
-	        	}
+              }
             }
-            if(symNo > D_NSYM1SLT-1) {
-                u=u1;
-                v=v1;
+
+            if(j == same_m_number - 1) { //when even once it has not been used
+              if(shortened_format == 1) {
+                calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF4_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12]; //D_NSC1RB =12
+                calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF4_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
+              } else {
+                calctmp[0] = alphaTBL_re[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF5_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
+                calctmp[1] = alphaTBL_im[(((ncs_cell[2*subframe+slotNo][sym] + TBL_3_SF5_GEN_N_DASH_NS[i])%D_NSC1RB)*k)%12];
+              }
+
+              // IP_CsData_allsfavg = g'(n_cs)_l,m,n
+              IP_CsData_allsfavg[aa][symNo][ip_ind][0] += ((((int32_t)BsCshData[aa][symNo][k][0] * calctmp[0] + (int32_t)BsCshData[aa][symNo][k][1] * calctmp[1]))>>15);
+              IP_CsData_allsfavg[aa][symNo][ip_ind][1] += ((((int32_t)BsCshData[aa][symNo][k][1] * calctmp[0] - (int32_t)BsCshData[aa][symNo][k][0] * calctmp[1]))>>15);
+
+              if((symNo == 1 || symNo == 5 || symNo == 8 || symNo == 12)) {
+              }
+
+              ip_ind++;
             }
+          }
         }
+      }
+
+      if(symNo > D_NSYM1SLT-1) {
+        u=u1;
+        v=v1;
+      }
     }
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (symNo=0; symNo<D_NSYM1SF; symNo++){
-            CsData_allavg[aa][symNo][0] = 0;
-            CsData_allavg[aa][symNo][1] = 0;
-            for (k=0; k<D_NSC1RB; k++) {
-              CsData_allavg[aa][symNo][0] += (int16_t)((double)CsData_temp[aa][symNo][k][0]);
-              CsData_allavg[aa][symNo][1] += (int16_t)((double)CsData_temp[aa][symNo][k][1]);
-            }
-        }
+  }
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (symNo=0; symNo<D_NSYM1SF; symNo++) {
+      CsData_allavg[aa][symNo][0] = 0;
+      CsData_allavg[aa][symNo][1] = 0;
+
+      for (k=0; k<D_NSC1RB; k++) {
+        CsData_allavg[aa][symNo][0] += (int16_t)((double)CsData_temp[aa][symNo][k][0]);
+        CsData_allavg[aa][symNo][1] += (int16_t)((double)CsData_temp[aa][symNo][k][1]);
+      }
     }
-    
-    // Frequency deviation estimation
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (k=0; k<12; k++) {
-            delta_theta_comp[aa][k][0] = 0;
-            delta_theta_comp[aa][k][1] = 0;
-            
-            delta_theta_comp[aa][k][0] += (((int32_t)CsData_temp[aa][1][k][0] * CsData_temp[aa][5][k][0] + (int32_t)((CsData_temp[aa][1][k][1])*CsData_temp[aa][5][k][1]))>>8);
-            delta_theta_comp[aa][k][1] += (((int32_t)CsData_temp[aa][1][k][0]*CsData_temp[aa][5][k][1] - (int32_t)((CsData_temp[aa][1][k][1])*CsData_temp[aa][5][k][0]) )>>8);
-            
-            delta_theta_comp[aa][k][0] += (((int32_t)CsData_temp[aa][8][k][0] * CsData_temp[aa][12][k][0] + (int32_t)((CsData_temp[aa][8][k][1])*CsData_temp[aa][12][k][1]))>>8);
-            delta_theta_comp[aa][k][1] += (((int32_t)CsData_temp[aa][8][k][0]*CsData_temp[aa][12][k][1] - (int32_t)((CsData_temp[aa][8][k][1])*CsData_temp[aa][12][k][0]))>>8);
-            
-            delta_theta[aa][k] = atan2((double)delta_theta_comp[aa][k][1], (double)delta_theta_comp[aa][k][0]) / 4.0;
-        }
+  }
+
+  // Frequency deviation estimation
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (k=0; k<12; k++) {
+      delta_theta_comp[aa][k][0] = 0;
+      delta_theta_comp[aa][k][1] = 0;
+      delta_theta_comp[aa][k][0] += (((int32_t)CsData_temp[aa][1][k][0] * CsData_temp[aa][5][k][0] + (int32_t)((CsData_temp[aa][1][k][1])*CsData_temp[aa][5][k][1]))>>8);
+      delta_theta_comp[aa][k][1] += (((int32_t)CsData_temp[aa][1][k][0]*CsData_temp[aa][5][k][1] - (int32_t)((CsData_temp[aa][1][k][1])*CsData_temp[aa][5][k][0]) )>>8);
+      delta_theta_comp[aa][k][0] += (((int32_t)CsData_temp[aa][8][k][0] * CsData_temp[aa][12][k][0] + (int32_t)((CsData_temp[aa][8][k][1])*CsData_temp[aa][12][k][1]))>>8);
+      delta_theta_comp[aa][k][1] += (((int32_t)CsData_temp[aa][8][k][0]*CsData_temp[aa][12][k][1] - (int32_t)((CsData_temp[aa][8][k][1])*CsData_temp[aa][12][k][0]))>>8);
+      delta_theta[aa][k] = atan2((double)delta_theta_comp[aa][k][1], (double)delta_theta_comp[aa][k][0]) / 4.0;
     }
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (k=0; k<D_NSC1RB; k++) {
-            ChestValue[aa][0][k][0] = (int16_t)((CsData_allavg[aa][1][0] + (int16_t)(((double)CsData_allavg[aa][5][0] * cos(delta_theta[aa][k]*4)) + ((double)CsData_allavg[aa][5][1] * sin(delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
-            ChestValue[aa][0][k][1] = (int16_t)((CsData_allavg[aa][1][1] + (int16_t)(((double)CsData_allavg[aa][5][1] * cos(delta_theta[aa][k]*4)) - ((double)CsData_allavg[aa][5][0] * sin(delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
-            ChestValue[aa][1][k][0] = (int16_t)((CsData_allavg[aa][8][0] + (int16_t)(((double)CsData_allavg[aa][12][0] * cos(delta_theta[aa][k]*4)) + ((double)CsData_allavg[aa][12][1] * sin(delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
-            ChestValue[aa][1][k][1] = (int16_t)((CsData_allavg[aa][8][1] + (int16_t)(((double)CsData_allavg[aa][12][1] * cos(delta_theta[aa][k]*4)) - ((double)CsData_allavg[aa][12][0] * sin(delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
-        }
+  }
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (k=0; k<D_NSC1RB; k++) {
+      ChestValue[aa][0][k][0] = (int16_t)((CsData_allavg[aa][1][0] + (int16_t)(((double)CsData_allavg[aa][5][0] * cos(delta_theta[aa][k]*4)) + ((double)CsData_allavg[aa][5][1] * sin(
+                                             delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
+      ChestValue[aa][0][k][1] = (int16_t)((CsData_allavg[aa][1][1] + (int16_t)(((double)CsData_allavg[aa][5][1] * cos(delta_theta[aa][k]*4)) - ((double)CsData_allavg[aa][5][0] * sin(
+                                             delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
+      ChestValue[aa][1][k][0] = (int16_t)((CsData_allavg[aa][8][0] + (int16_t)(((double)CsData_allavg[aa][12][0] * cos(delta_theta[aa][k]*4)) + ((double)CsData_allavg[aa][12][1] * sin(
+                                             delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
+      ChestValue[aa][1][k][1] = (int16_t)((CsData_allavg[aa][8][1] + (int16_t)(((double)CsData_allavg[aa][12][1] * cos(delta_theta[aa][k]*4)) - ((double)CsData_allavg[aa][12][0] * sin(
+                                             delta_theta[aa][k]*4)))) /(2*D_NSC1RB)) ;
     }
-    
-    *Interpw = 0;
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-    	if(ip_ind == 0) {//ip_ind= The total number of cyclic shift of non-use
-    		*Interpw = 1;
-    		break;
-    	}
-        for(i=0; i<ip_ind; i++) {
-            IP_allavg[i] = 0;
-            
-            IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][1][i][0] * IP_CsData_allsfavg[aa][1][i][0] + (int32_t)IP_CsData_allsfavg[aa][1][i][1]*IP_CsData_allsfavg[aa][1][i][1])>>8);
-        	IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][5][i][0] * IP_CsData_allsfavg[aa][5][i][0] + (int32_t)IP_CsData_allsfavg[aa][5][i][1]*IP_CsData_allsfavg[aa][5][i][1])>>8);
-            IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][8][i][0] * IP_CsData_allsfavg[aa][8][i][0] + (int32_t)IP_CsData_allsfavg[aa][8][i][1]*IP_CsData_allsfavg[aa][8][i][1])>>8);
-            IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][12][i][0] * IP_CsData_allsfavg[aa][12][i][0] + (int32_t)IP_CsData_allsfavg[aa][12][i][1]*IP_CsData_allsfavg[aa][12][i][1])>>8);
-        	*Interpw += IP_allavg[i]/(2*D_NSLT1SF*frame_parms->nb_antennas_rx*ip_ind*12);
-        }
+  }
+
+  *Interpw = 0;
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    if(ip_ind == 0) {//ip_ind= The total number of cyclic shift of non-use
+      *Interpw = 1;
+      break;
+    }
+
+    for(i=0; i<ip_ind; i++) {
+      IP_allavg[i] = 0;
+      IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][1][i][0] * IP_CsData_allsfavg[aa][1][i][0] + (int32_t)IP_CsData_allsfavg[aa][1][i][1]*IP_CsData_allsfavg[aa][1][i][1])>>8);
+      IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][5][i][0] * IP_CsData_allsfavg[aa][5][i][0] + (int32_t)IP_CsData_allsfavg[aa][5][i][1]*IP_CsData_allsfavg[aa][5][i][1])>>8);
+      IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][8][i][0] * IP_CsData_allsfavg[aa][8][i][0] + (int32_t)IP_CsData_allsfavg[aa][8][i][1]*IP_CsData_allsfavg[aa][8][i][1])>>8);
+      IP_allavg[i] += (((int32_t)IP_CsData_allsfavg[aa][12][i][0] * IP_CsData_allsfavg[aa][12][i][0] + (int32_t)IP_CsData_allsfavg[aa][12][i][1]*IP_CsData_allsfavg[aa][12][i][1])>>8);
+      *Interpw += IP_allavg[i]/(2*D_NSLT1SF*frame_parms->nb_antennas_rx*ip_ind*12);
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 /* Channel Equalization */
 uint16_t pucchfmt3_Equalization( int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2],
                                  int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2],
                                  int16_t ChestValue[NB_ANTENNAS_RX][2][12][2],
-                                 LTE_DL_FRAME_PARMS *frame_parms)
-{
-    int16_t aa, sltNo, symNo, k;
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        sltNo = 0;
-        for (symNo=0; symNo<D_NSYM1SF; symNo++){
-            if(symNo >= D_NSYM1SLT) {
-                sltNo = 1;
-            }
-            for (k=0; k<D_NSC1RB; k++){
-                ChdetAfterValue_fmt3[aa][symNo][k][0] = (((int32_t)CshData_fmt3[aa][symNo][k][0] * ChestValue[aa][sltNo][k][0] + (int32_t)CshData_fmt3[aa][symNo][k][1] * ChestValue[aa][sltNo][k][1])>>8);
-                ChdetAfterValue_fmt3[aa][symNo][k][1] = (((int32_t)CshData_fmt3[aa][symNo][k][1] * ChestValue[aa][sltNo][k][0] - (int32_t)CshData_fmt3[aa][symNo][k][0] * ChestValue[aa][sltNo][k][1])>>8);
-            }
-        }
+                                 LTE_DL_FRAME_PARMS *frame_parms) {
+  int16_t aa, sltNo, symNo, k;
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    sltNo = 0;
+
+    for (symNo=0; symNo<D_NSYM1SF; symNo++) {
+      if(symNo >= D_NSYM1SLT) {
+        sltNo = 1;
+      }
+
+      for (k=0; k<D_NSC1RB; k++) {
+        ChdetAfterValue_fmt3[aa][symNo][k][0] = (((int32_t)CshData_fmt3[aa][symNo][k][0] * ChestValue[aa][sltNo][k][0] + (int32_t)CshData_fmt3[aa][symNo][k][1] * ChestValue[aa][sltNo][k][1])>>8);
+        ChdetAfterValue_fmt3[aa][symNo][k][1] = (((int32_t)CshData_fmt3[aa][symNo][k][1] * ChestValue[aa][sltNo][k][0] - (int32_t)CshData_fmt3[aa][symNo][k][0] * ChestValue[aa][sltNo][k][1])>>8);
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 /* Frequency deviation remove AFC */
 uint16_t pucchfmt3_FrqDevRemove( int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2],
-                             double delta_theta[NB_ANTENNAS_RX][12],
-                             int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2],
-                             LTE_DL_FRAME_PARMS *frame_parms )
-{
-    int16_t aa, sltNo, symNo1slt, k, n;
-    double calctmp[2];
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for(sltNo = 0; sltNo<D_NSLT1SF; sltNo++)
-        {
-            n=0;
-            for (symNo1slt=0, n=0; symNo1slt<D_NSYM1SLT; symNo1slt++){
-                if(!((symNo1slt==1) || (symNo1slt==5))) {
-                    for (k=0; k<D_NSC1RB; k++) {
-                        calctmp[0] = cos(delta_theta[aa][k] * (n-1));
-                        calctmp[1] = sin(delta_theta[aa][k] * (n-1));
-                        
-                        RemoveFrqDev_fmt3[aa][sltNo][n][k][0] = (int16_t)((double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][0] * calctmp[0] 
-                                                                + (double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][1] * calctmp[1]);
-                        RemoveFrqDev_fmt3[aa][sltNo][n][k][1] = (int16_t)((double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][1] * calctmp[0] 
-                                                                - (double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][0] * calctmp[1]);
-                    }
-                    n++;
-                }
-            }
+                                 double delta_theta[NB_ANTENNAS_RX][12],
+                                 int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2],
+                                 LTE_DL_FRAME_PARMS *frame_parms ) {
+  int16_t aa, sltNo, symNo1slt, k, n;
+  double calctmp[2];
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for(sltNo = 0; sltNo<D_NSLT1SF; sltNo++) {
+      n=0;
+
+      for (symNo1slt=0, n=0; symNo1slt<D_NSYM1SLT; symNo1slt++) {
+        if(!((symNo1slt==1) || (symNo1slt==5))) {
+          for (k=0; k<D_NSC1RB; k++) {
+            calctmp[0] = cos(delta_theta[aa][k] * (n-1));
+            calctmp[1] = sin(delta_theta[aa][k] * (n-1));
+            RemoveFrqDev_fmt3[aa][sltNo][n][k][0] = (int16_t)((double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][0] * calctmp[0]
+                                                    + (double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][1] * calctmp[1]);
+            RemoveFrqDev_fmt3[aa][sltNo][n][k][1] = (int16_t)((double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][1] * calctmp[0]
+                                                    - (double)ChdetAfterValue_fmt3[aa][(sltNo*D_NSYM1SLT)+symNo1slt][k][0] * calctmp[1]);
+          }
+
+          n++;
         }
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
-//for opt.Lev.2 
+//for opt.Lev.2
 #define  MAXROW_TBL_SF5  5
 #define  MAXCLM_TBL_SF5  5
-const int16_t TBL_3_SF5[MAXROW_TBL_SF5][MAXCLM_TBL_SF5][2] = 
-                         {{ {32767,0}, {32767,0}, {32767,0}, {32767,0}, {32767,0}},
-                          { {32767,0}, {10126, 31163}, {-26509, 19260}, {-26509, -19260}, {10126, -31163}},
-                          { {32767,0}, {-26509, 19260}, {10126, -31163}, {10126, 31163}, {-26509, -19260}},
-                          { {32767,0}, {-26509, -19260}, {10126, 31163}, {10126, -31163}, {-26509, 19260}},
-                          { {32767,0}, {10126, -31163}, {-26509, -19260}, {-26509, 19260}, {10126, 31163}}};
+const int16_t TBL_3_SF5[MAXROW_TBL_SF5][MAXCLM_TBL_SF5][2] = {
+  { {32767,0}, {32767,0}, {32767,0}, {32767,0}, {32767,0}},
+  { {32767,0}, {10126, 31163}, {-26509, 19260}, {-26509, -19260}, {10126, -31163}},
+  { {32767,0}, {-26509, 19260}, {10126, -31163}, {10126, 31163}, {-26509, -19260}},
+  { {32767,0}, {-26509, -19260}, {10126, 31163}, {10126, -31163}, {-26509, 19260}},
+  { {32767,0}, {10126, -31163}, {-26509, -19260}, {-26509, 19260}, {10126, 31163}}
+};
 
 #define  MAXROW_TBL_SF4_fmt3 4
 #define  MAXCLM_TBL_SF4      4
-const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = 
-                         {{ {32767,0}, {32767,0}, {32767,0}, {32767,0}},
-                          { {32767,0}, {-32767,0}, {32767,0}, {-32767,0}},
-                          { {32767,0}, {32767,0}, {-32767,0}, {-32767,0}},
-                          { {32767,0}, {-32767,0}, {-32767,0}, {32767,0}}};
+const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {
+  { {32767,0}, {32767,0}, {32767,0}, {32767,0}},
+  { {32767,0}, {-32767,0}, {32767,0}, {-32767,0}},
+  { {32767,0}, {32767,0}, {-32767,0}, {-32767,0}},
+  { {32767,0}, {-32767,0}, {-32767,0}, {32767,0}}
+};
 
 /* orthogonal sequence remove */
 uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2],
                                   int16_t Fmt3xDataRmvOrth[NB_ANTENNAS_RX][2][5][12][2],
                                   uint8_t shortened_format,
                                   uint16_t n3_pucch,
-                                  LTE_DL_FRAME_PARMS *frame_parms )
-{
-    int16_t aa, sltNo, n, k;
-    int16_t Npucch_sf;
-    int16_t noc;
-    
-    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (sltNo=0; sltNo<D_NSLT1SF; sltNo++){
-            if(shortened_format == 1) {
-                if(sltNo == 0) {
-                    noc = n3_pucch % D_NPUCCH_SF4;
-                    Npucch_sf = D_NPUCCH_SF5;
-                } else {
-                    noc = n3_pucch % D_NPUCCH_SF4;
-                    Npucch_sf = D_NPUCCH_SF4;
-                }
-            } else {
-                if(sltNo == 0) {
-                    noc = n3_pucch % D_NPUCCH_SF5;
-                    Npucch_sf = D_NPUCCH_SF5;
-                } else {
-                    noc = (3 * n3_pucch) % D_NPUCCH_SF5;
-                    Npucch_sf = D_NPUCCH_SF5;
-                }
-            }
-            for (n=0; n<Npucch_sf; n++){
-                for (k=0; k<D_NSC1RB; k++) {
-                    if ((sltNo == 1) && (shortened_format == 1)) {
-                      Fmt3xDataRmvOrth[aa][sltNo][n][k][0] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF4[noc][n][0] + (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF4[noc][n][1])>>15);
-                      Fmt3xDataRmvOrth[aa][sltNo][n][k][1] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF4[noc][n][0] - (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF4[noc][n][1])>>15);
-                    } else {
-                      Fmt3xDataRmvOrth[aa][sltNo][n][k][0] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF5[noc][n][0] + (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF5[noc][n][1])>>15);
-                      Fmt3xDataRmvOrth[aa][sltNo][n][k][1] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF5[noc][n][0] - (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF5[noc][n][1])>>15);
-                    }
-                }
-            }
+                                  LTE_DL_FRAME_PARMS *frame_parms ) {
+  int16_t aa, sltNo, n, k;
+  int16_t Npucch_sf;
+  int16_t noc;
+
+  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+    for (sltNo=0; sltNo<D_NSLT1SF; sltNo++) {
+      if(shortened_format == 1) {
+        if(sltNo == 0) {
+          noc = n3_pucch % D_NPUCCH_SF4;
+          Npucch_sf = D_NPUCCH_SF5;
+        } else {
+          noc = n3_pucch % D_NPUCCH_SF4;
+          Npucch_sf = D_NPUCCH_SF4;
+        }
+      } else {
+        if(sltNo == 0) {
+          noc = n3_pucch % D_NPUCCH_SF5;
+          Npucch_sf = D_NPUCCH_SF5;
+        } else {
+          noc = (3 * n3_pucch) % D_NPUCCH_SF5;
+          Npucch_sf = D_NPUCCH_SF5;
         }
+      }
+
+      for (n=0; n<Npucch_sf; n++) {
+        for (k=0; k<D_NSC1RB; k++) {
+          if ((sltNo == 1) && (shortened_format == 1)) {
+            Fmt3xDataRmvOrth[aa][sltNo][n][k][0] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF4[noc][n][0] + (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF4[noc][n][1])>>15);
+            Fmt3xDataRmvOrth[aa][sltNo][n][k][1] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF4[noc][n][0] - (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF4[noc][n][1])>>15);
+          } else {
+            Fmt3xDataRmvOrth[aa][sltNo][n][k][0] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF5[noc][n][0] + (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF5[noc][n][1])>>15);
+            Fmt3xDataRmvOrth[aa][sltNo][n][k][1] = (((int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][1] * TBL_3_SF5[noc][n][0] - (int32_t)RemoveFrqDev_fmt3[aa][sltNo][n][k][0] * TBL_3_SF5[noc][n][1])>>15);
+          }
+        }
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 /* averaging antenna */
 uint16_t pucchfmt3_AvgAnt( int16_t Fmt3xDataRmvOrth[NB_ANTENNAS_RX][2][5][12][2],
                            int16_t Fmt3xDataAvgAnt[2][5][12][2],
                            uint8_t shortened_format,
-                           LTE_DL_FRAME_PARMS *frame_parms )
-{
-    int16_t aa, sltNo, n, k;
-    int16_t Npucch_sf;
-    
-    for (sltNo=0; sltNo<D_NSLT1SF; sltNo++){
-        if((sltNo == 1) && (shortened_format == 1)) {
-            Npucch_sf = D_NPUCCH_SF4;
-        } else {
-            Npucch_sf = D_NPUCCH_SF5;
-        }
-        for (n=0; n<Npucch_sf; n++){
-            for (k=0; k<D_NSC1RB; k++) {
-                Fmt3xDataAvgAnt[sltNo][n][k][0] = 0;
-                Fmt3xDataAvgAnt[sltNo][n][k][1] = 0;
-                for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-                    Fmt3xDataAvgAnt[sltNo][n][k][0] += Fmt3xDataRmvOrth[aa][sltNo][n][k][0]  / frame_parms->nb_antennas_rx;
-                    Fmt3xDataAvgAnt[sltNo][n][k][1] += Fmt3xDataRmvOrth[aa][sltNo][n][k][1]  / frame_parms->nb_antennas_rx;
-                }
-            }
+                           LTE_DL_FRAME_PARMS *frame_parms ) {
+  int16_t aa, sltNo, n, k;
+  int16_t Npucch_sf;
+
+  for (sltNo=0; sltNo<D_NSLT1SF; sltNo++) {
+    if((sltNo == 1) && (shortened_format == 1)) {
+      Npucch_sf = D_NPUCCH_SF4;
+    } else {
+      Npucch_sf = D_NPUCCH_SF5;
+    }
+
+    for (n=0; n<Npucch_sf; n++) {
+      for (k=0; k<D_NSC1RB; k++) {
+        Fmt3xDataAvgAnt[sltNo][n][k][0] = 0;
+        Fmt3xDataAvgAnt[sltNo][n][k][1] = 0;
+
+        for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+          Fmt3xDataAvgAnt[sltNo][n][k][0] += Fmt3xDataRmvOrth[aa][sltNo][n][k][0]  / frame_parms->nb_antennas_rx;
+          Fmt3xDataAvgAnt[sltNo][n][k][1] += Fmt3xDataRmvOrth[aa][sltNo][n][k][1]  / frame_parms->nb_antennas_rx;
         }
+      }
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 /* averaging symbol */
 uint16_t pucchfmt3_AvgSym( int16_t Fmt3xDataAvgAnt[2][5][12][2],
                            int16_t Fmt3xDataAvgSym[2][12][2],
-                           uint8_t shortened_format )
-{
-    int16_t sltNo, n, k;
-    int16_t Npucch_sf;
-    
-    for (sltNo=0; sltNo<D_NSLT1SF; sltNo++){
-        if((sltNo == 1) && (shortened_format == 1)) {
-            Npucch_sf = D_NPUCCH_SF4;
-        } else {
-            Npucch_sf = D_NPUCCH_SF5;
-        }
-        for (k=0; k<D_NSC1RB; k++) {
-            Fmt3xDataAvgSym[sltNo][k][0] = 0;
-            Fmt3xDataAvgSym[sltNo][k][1] = 0;
-            for (n=0; n<Npucch_sf; n++){
-                Fmt3xDataAvgSym[sltNo][k][0] += Fmt3xDataAvgAnt[sltNo][n][k][0] / Npucch_sf;
-                Fmt3xDataAvgSym[sltNo][k][1] += Fmt3xDataAvgAnt[sltNo][n][k][1] / Npucch_sf;
-            }
-        }
+                           uint8_t shortened_format ) {
+  int16_t sltNo, n, k;
+  int16_t Npucch_sf;
+
+  for (sltNo=0; sltNo<D_NSLT1SF; sltNo++) {
+    if((sltNo == 1) && (shortened_format == 1)) {
+      Npucch_sf = D_NPUCCH_SF4;
+    } else {
+      Npucch_sf = D_NPUCCH_SF5;
     }
-    return 0;
+
+    for (k=0; k<D_NSC1RB; k++) {
+      Fmt3xDataAvgSym[sltNo][k][0] = 0;
+      Fmt3xDataAvgSym[sltNo][k][1] = 0;
+
+      for (n=0; n<Npucch_sf; n++) {
+        Fmt3xDataAvgSym[sltNo][k][0] += Fmt3xDataAvgAnt[sltNo][n][k][0] / Npucch_sf;
+        Fmt3xDataAvgSym[sltNo][k][1] += Fmt3xDataAvgAnt[sltNo][n][k][1] / Npucch_sf;
+      }
+    }
+  }
+
+  return 0;
 }
 
 /* iDFT */
-void pucchfmt3_IDft2( int16_t *x, int16_t *y )
-{
+void pucchfmt3_IDft2( int16_t *x, int16_t *y ) {
   int16_t i, k;
   int16_t tmp[2];
-  int16_t calctmp[D_NSC1RB*2]={0};
-  
+  int16_t calctmp[D_NSC1RB*2]= {0};
+
   for(k=0; k<D_NSC1RB; k++) {
     for (i=0; i<D_NSC1RB; i++) {
       tmp[0] = alphaTBL_re[((i*k)%12)];
       tmp[1] = alphaTBL_im[((i*k)%12)];
-      
       calctmp[2*k] += (((int32_t)x[2*i] * tmp[0] - (int32_t)x[2*i+1] * tmp[1])>>15);
       calctmp[2*k+1] += (((int32_t)x[2*i+1] * tmp[0] + (int32_t)x[2*i] * tmp[1])>>15);
     }
+
     y[2*k] = (int16_t)( (double) calctmp[2*k] / sqrt(D_NSC1RB));
     y[2*k+1] = (int16_t)((double) calctmp[2*k+1] / sqrt(D_NSC1RB));
   }
@@ -630,106 +639,108 @@ uint16_t pucchfmt3_Descramble( int16_t IFFTOutData_Fmt3[2][12][2],
                                uint8_t subframe,
                                uint32_t Nid_cell,
                                uint32_t rnti
-                              )
-{
-    int16_t m, k, c,i,j;
-    uint32_t cinit = 0;
-    uint32_t x1;
-    uint32_t s,s0,s1;
-    cinit = (subframe + 1) * ((2 * Nid_cell + 1)<<16) + rnti;
-    s0 = lte_gold_generic(&x1,&cinit,1);
-    s1 = lte_gold_generic(&x1,&cinit,0);
-    i=0;
-    for (m=0; m<D_NSLT1SF; m++){
-        for(k=0; k<D_NSC1RB; k++) {
-            s = (i<32)? s0:s1;
-            j = (i<32)? i:(i-32);
-            c=((s>>j)&1);
-            b[i] = (IFFTOutData_Fmt3[m][k][0] * (1 - 2*c));
-            i++;
-          
-            s = (i<32)? s0:s1;
-            j = (i<32)? i:(i-32);
-            c=((s>>j)&1);
-            b[i] = (IFFTOutData_Fmt3[m][k][1] * (1 - 2*c));
-            i++;
-        }
+                             ) {
+  int16_t m, k, c,i,j;
+  uint32_t cinit = 0;
+  uint32_t x1;
+  uint32_t s,s0,s1;
+  cinit = (subframe + 1) * ((2 * Nid_cell + 1)<<16) + rnti;
+  s0 = lte_gold_generic(&x1,&cinit,1);
+  s1 = lte_gold_generic(&x1,&cinit,0);
+  i=0;
+
+  for (m=0; m<D_NSLT1SF; m++) {
+    for(k=0; k<D_NSC1RB; k++) {
+      s = (i<32)? s0:s1;
+      j = (i<32)? i:(i-32);
+      c=((s>>j)&1);
+      b[i] = (IFFTOutData_Fmt3[m][k][0] * (1 - 2*c));
+      i++;
+      s = (i<32)? s0:s1;
+      j = (i<32)? i:(i-32);
+      c=((s>>j)&1);
+      b[i] = (IFFTOutData_Fmt3[m][k][1] * (1 - 2*c));
+      i++;
     }
-    return 0;
+  }
+
+  return 0;
 }
 
 int16_t pucchfmt3_Decode( int16_t b[48],
                           uint8_t subframe,
                           int16_t DTXthreshold,
                           int16_t Interpw,
-                          uint8_t do_sr)
-{
-    int16_t c, i;
-    int32_t Rho_tmp;
-    int16_t c_max;
-    int32_t Rho_max;
-    int16_t bit_pattern;
-    
-    /* Is payload 6bit or 7bit? */
-    if( do_sr == 1 ) {
-        bit_pattern = 128;
-    } else {
-        bit_pattern = 64;
-    }
-    
-    c=0;
+                          uint8_t do_sr) {
+  int16_t c, i;
+  int32_t Rho_tmp;
+  int16_t c_max;
+  int32_t Rho_max;
+  int16_t bit_pattern;
+
+  /* Is payload 6bit or 7bit? */
+  if( do_sr == 1 ) {
+    bit_pattern = 128;
+  } else {
+    bit_pattern = 64;
+  }
+
+  c=0;
+  Rho_tmp = 0;
+
+  for (i=0; i<48; i++) {
+    Rho_tmp += b[i] * (1-2*chcod_tbl[c][i]);
+  }
+
+  c_max = c;
+  Rho_max = Rho_tmp;
+
+  for(c=1; c<bit_pattern; c++) {
     Rho_tmp = 0;
-    for (i=0;i<48;i++) {
-        Rho_tmp += b[i] * (1-2*chcod_tbl[c][i]);
-    }
-    c_max = c;
-    Rho_max = Rho_tmp;
-    
-    for(c=1; c<bit_pattern; c++) {
-        Rho_tmp = 0;
-        for (i=0;i<48;i++) {
-            Rho_tmp += b[i] * (1-2*chcod_tbl[c][i]);
-        }
-        if (Rho_tmp > Rho_max) {
-            c_max = c;
-            Rho_max = Rho_tmp;
-        }
-    }
-    if(Interpw<1){
-      Interpw=1;
+
+    for (i=0; i<48; i++) {
+      Rho_tmp += b[i] * (1-2*chcod_tbl[c][i]);
     }
-    if((Rho_max/Interpw) > DTXthreshold) {
-        // ***Log
-        return c_max;
-    } else {
-        // ***Log
-        return -1;
+
+    if (Rho_tmp > Rho_max) {
+      c_max = c;
+      Rho_max = Rho_tmp;
     }
+  }
+
+  if(Interpw<1) {
+    Interpw=1;
+  }
+
+  if((Rho_max/Interpw) > DTXthreshold) {
+    // ***Log
+    return c_max;
+  } else {
+    // ***Log
+    return -1;
+  }
 }
 
 /* PUCCH format3 << */
 
 uint32_t rx_pucch(PHY_VARS_eNB *eNB,
-		  PUCCH_FMT_t fmt,
-		  uint8_t UE_id,
-		  uint16_t n1_pucch,
-		  uint16_t n2_pucch,
-		  uint8_t shortened_format,
-		  uint8_t *payload,
-		  int     frame,
-		  uint8_t subframe,
-		  uint8_t pucch1_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 
-		  ,uint8_t br_flag
-#endif
-)
+                  PUCCH_FMT_t fmt,
+                  uint8_t UE_id,
+                  uint16_t n1_pucch,
+                  uint16_t n2_pucch,
+                  uint8_t shortened_format,
+                  uint8_t *payload,
+                  int     frame,
+                  uint8_t subframe,
+                  uint8_t pucch1_thres,
+                  uint8_t br_flag
+                 )
 //-----------------------------------------------------------------------------
 {
   static int first_call = 1;
   LTE_eNB_COMMON *common_vars = &eNB->common_vars;
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
   int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0], eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
-
   uint32_t u,v,n,aa;
   uint32_t z[12*14];
   int16_t *zptr;
@@ -751,17 +762,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
   int32_t stat_re=0,stat_im=0;
   uint32_t stat,stat_max=0;
   uint8_t log2_maxh;
-
   uint8_t deltaPUCCH_Shift          = frame_parms->pucch_config_common.deltaPUCCH_Shift;
   uint8_t NRB2                      = frame_parms->pucch_config_common.nRB_CQI;
   uint8_t Ncs1_div_deltaPUCCH_Shift = frame_parms->pucch_config_common.nCS_AN;
-
   uint32_t u0 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1]) % 30;
   uint32_t u1 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)]) % 30;
   uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
   uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
   int chL;
-
   /* PUCCH format3 >> */
   uint16_t Ret = 0;
   int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2];       //[Antenna][Symbol][Subcarrier][Complex]
@@ -778,11 +786,10 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
   int16_t payload_entity = -1;
   int16_t Interpw;
   int16_t payload_max;
-  
   // TODO
   // When using PUCCH format3, it must be an argument of rx_pucch function
   uint16_t n3_pucch = 20;
-  uint16_t n3_pucch_array[NUMBER_OF_UE_MAX]={1};
+  uint16_t n3_pucch_array[NUMBER_OF_UE_MAX]= {1};
   n3_pucch_array[0]=n3_pucch;
   uint8_t do_sr = 1;
   uint16_t crnti=0x1234;
@@ -790,688 +797,645 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
   /* PUCCH format3 << */
 
   if (first_call == 1) {
-    for (i=0;i<10;i++) {
-      for (j=0;j<NUMBER_OF_UE_MAX;j++) {
-	eNB->pucch1_stats_cnt[j][i]=0;
-	eNB->pucch1ab_stats_cnt[j][i]=0;
+    for (i=0; i<10; i++) {
+      for (j=0; j<NUMBER_OF_UE_MAX; j++) {
+        eNB->pucch1_stats_cnt[j][i]=0;
+        eNB->pucch1ab_stats_cnt[j][i]=0;
 #if defined(USRP_REC_PLAY) // not 100% sure
-	eNB->pucch1_stats_thres[j][i]=0;
-#endif	
+        eNB->pucch1_stats_thres[j][i]=0;
+#endif
       }
     }
+
     first_call=0;
   }
 
-
   if(fmt!=pucch_format3) {  /* PUCCH format3 */
-  
-  // TODO
-  // "SR+ACK/NACK" length is only 7 bits.
-  // This restriction will be lifted in the future.
-  // "CQI/PMI/RI+ACK/NACK" will be supported in the future.
 
-  if ((deltaPUCCH_Shift==0) || (deltaPUCCH_Shift>3)) {
-    LOG_E(PHY,"[eNB] rx_pucch: Illegal deltaPUCCH_shift %d (should be 1,2,3)\n",deltaPUCCH_Shift);
-    return(-1);
-  }
-
-  if (Ncs1_div_deltaPUCCH_Shift > 7) {
-    LOG_E(PHY,"[eNB] rx_pucch: Illegal Ncs1_div_deltaPUCCH_Shift %d (should be 0...7)\n",Ncs1_div_deltaPUCCH_Shift);
-    return(-1);
-  }
+    // TODO
+    // "SR+ACK/NACK" length is only 7 bits.
+    // This restriction will be lifted in the future.
+    // "CQI/PMI/RI+ACK/NACK" will be supported in the future.
+    if ((deltaPUCCH_Shift==0) || (deltaPUCCH_Shift>3)) {
+      LOG_E(PHY,"[eNB] rx_pucch: Illegal deltaPUCCH_shift %d (should be 1,2,3)\n",deltaPUCCH_Shift);
+      return(-1);
+    }
 
-  zptr = (int16_t *)z;
-  thres = (c*Ncs1_div_deltaPUCCH_Shift);
-  Nprime_div_deltaPUCCH_Shift = (n1_pucch < thres) ? Ncs1_div_deltaPUCCH_Shift : (12/deltaPUCCH_Shift);
-  Nprime = Nprime_div_deltaPUCCH_Shift * deltaPUCCH_Shift;
+    if (Ncs1_div_deltaPUCCH_Shift > 7) {
+      LOG_E(PHY,"[eNB] rx_pucch: Illegal Ncs1_div_deltaPUCCH_Shift %d (should be 0...7)\n",Ncs1_div_deltaPUCCH_Shift);
+      return(-1);
+    }
 
+    zptr = (int16_t *)z;
+    thres = (c*Ncs1_div_deltaPUCCH_Shift);
+    Nprime_div_deltaPUCCH_Shift = (n1_pucch < thres) ? Ncs1_div_deltaPUCCH_Shift : (12/deltaPUCCH_Shift);
+    Nprime = Nprime_div_deltaPUCCH_Shift * deltaPUCCH_Shift;
 #ifdef DEBUG_PUCCH_RX
-  printf("[eNB] PUCCH: cNcs1/deltaPUCCH_Shift %d, Nprime %d, n1_pucch %d\n",thres,Nprime,n1_pucch);
+    printf("[eNB] PUCCH: cNcs1/deltaPUCCH_Shift %d, Nprime %d, n1_pucch %d\n",thres,Nprime,n1_pucch);
 #endif
+    N_UL_symb = (frame_parms->Ncp==NORMAL) ? 7 : 6;
 
-  N_UL_symb = (frame_parms->Ncp==NORMAL) ? 7 : 6;
-
-  if (n1_pucch < thres)
-    nprime0=n1_pucch;
-  else
-    nprime0 = (n1_pucch - thres)%(12*c/deltaPUCCH_Shift);
+    if (n1_pucch < thres)
+      nprime0=n1_pucch;
+    else
+      nprime0 = (n1_pucch - thres)%(12*c/deltaPUCCH_Shift);
 
-  if (n1_pucch >= thres)
-    nprime1= ((c*(nprime0+1))%((12*c/deltaPUCCH_Shift)+1))-1;
-  else {
-    d = (frame_parms->Ncp==0) ? 2 : 0;
-    h= (nprime0+d)%(c*Nprime_div_deltaPUCCH_Shift);
-    nprime1 = (h/c) + (h%c)*Nprime_div_deltaPUCCH_Shift;
-  }
+    if (n1_pucch >= thres)
+      nprime1= ((c*(nprime0+1))%((12*c/deltaPUCCH_Shift)+1))-1;
+    else {
+      d = (frame_parms->Ncp==0) ? 2 : 0;
+      h= (nprime0+d)%(c*Nprime_div_deltaPUCCH_Shift);
+      nprime1 = (h/c) + (h%c)*Nprime_div_deltaPUCCH_Shift;
+    }
 
 #ifdef DEBUG_PUCCH_RX
-  printf("PUCCH: nprime0 %d nprime1 %d\n",nprime0,nprime1);
+    printf("PUCCH: nprime0 %d nprime1 %d\n",nprime0,nprime1);
 #endif
+    n_oc0 = nprime0/Nprime_div_deltaPUCCH_Shift;
 
-  n_oc0 = nprime0/Nprime_div_deltaPUCCH_Shift;
-
-  if (frame_parms->Ncp==1)
-    n_oc0<<=1;
+    if (frame_parms->Ncp==1)
+      n_oc0<<=1;
 
-  n_oc1 = nprime1/Nprime_div_deltaPUCCH_Shift;
+    n_oc1 = nprime1/Nprime_div_deltaPUCCH_Shift;
 
-  if (frame_parms->Ncp==1)  // extended CP
-    n_oc1<<=1;
+    if (frame_parms->Ncp==1)  // extended CP
+      n_oc1<<=1;
 
 #ifdef DEBUG_PUCCH_RX
-  printf("[eNB] PUCCH: noc0 %d noc11 %d\n",n_oc0,n_oc1);
+    printf("[eNB] PUCCH: noc0 %d noc11 %d\n",n_oc0,n_oc1);
 #endif
+    nprime=nprime0;
+    n_oc  =n_oc0;
 
-  nprime=nprime0;
-  n_oc  =n_oc0;
-
-  // loop over 2 slots
-  for (ns=(subframe<<1),u=u0,v=v0; ns<(2+(subframe<<1)); ns++,u=u1,v=v1) {
-
-    if ((nprime&1) == 0)
-      S=0;  // 1
-    else
-      S=1;  // j
-    /*
-    if (fmt==pucch_format1)
-      LOG_I(PHY,"[eNB] subframe %d => PUCCH1: u%d %d, v%d %d : ", subframe,ns&1,u,ns&1,v);
-    else
-      LOG_I(PHY,"[eNB] subframe %d => PUCCH1a/b: u%d %d, v%d %d : ", subframe,ns&1,u,ns&1,v);
-    */
-
-    //loop over symbols in slot
-    for (l=0; l<N_UL_symb; l++) {
-      // Compute n_cs (36.211 p. 18)
-      n_cs = eNB->ncs_cell[ns][l];
-
-      if (frame_parms->Ncp==0) { // normal CP
-        n_cs = ((uint16_t)n_cs + (nprime*deltaPUCCH_Shift + (n_oc%deltaPUCCH_Shift))%Nprime)%12;
-      } else {
-        n_cs = ((uint16_t)n_cs + (nprime*deltaPUCCH_Shift + (n_oc>>1))%Nprime)%12;
-      }
-
-
+    // loop over 2 slots
+    for (ns=(subframe<<1),u=u0,v=v0; ns<(2+(subframe<<1)); ns++,u=u1,v=v1) {
+      if ((nprime&1) == 0)
+        S=0;  // 1
+      else
+        S=1;  // j
 
-      refs=0;
+      /*
+      if (fmt==pucch_format1)
+        LOG_I(PHY,"[eNB] subframe %d => PUCCH1: u%d %d, v%d %d : ", subframe,ns&1,u,ns&1,v);
+      else
+        LOG_I(PHY,"[eNB] subframe %d => PUCCH1a/b: u%d %d, v%d %d : ", subframe,ns&1,u,ns&1,v);
+      */
 
-      // Comput W_noc(m) (36.211 p. 19)
-      if ((ns==(1+(subframe<<1))) && (shortened_format==1)) {  // second slot and shortened format
+      //loop over symbols in slot
+      for (l=0; l<N_UL_symb; l++) {
+        // Compute n_cs (36.211 p. 18)
+        n_cs = eNB->ncs_cell[ns][l];
 
-        if (l<2) {                                         // data
-          W_re=W3_re[n_oc][l];
-          W_im=W3_im[n_oc][l];
-        } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==0)) { // reference and normal CP
-          W_re=W3_re[n_oc][l-2];
-          W_im=W3_im[n_oc][l-2];
-          refs=1;
-        } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==1)) { // reference and extended CP
-          W_re=W4[n_oc][l-2];
-          W_im=0;
-          refs=1;
-        } else if ((l>=N_UL_symb-2)) {                      // data
-          W_re=W3_re[n_oc][l-N_UL_symb+4];
-          W_im=W3_im[n_oc][l-N_UL_symb+4];
+        if (frame_parms->Ncp==0) { // normal CP
+          n_cs = ((uint16_t)n_cs + (nprime*deltaPUCCH_Shift + (n_oc%deltaPUCCH_Shift))%Nprime)%12;
+        } else {
+          n_cs = ((uint16_t)n_cs + (nprime*deltaPUCCH_Shift + (n_oc>>1))%Nprime)%12;
         }
-      } else {
-        if (l<2) {                                         // data
-          W_re=W4[n_oc][l];
-          W_im=0;
-        } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==NORMAL)) { // reference and normal CP
-          W_re=W3_re[n_oc][l-2];
-          W_im=W3_im[n_oc][l-2];
-          refs=1;
-        } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==EXTENDED)) { // reference and extended CP
-          W_re=W4[n_oc][l-2];
-          W_im=0;
-          refs=1;
-        } else if ((l>=N_UL_symb-2)) {                     // data
-          W_re=W4[n_oc][l-N_UL_symb+4];
-          W_im=0;
+
+        refs=0;
+
+        // Comput W_noc(m) (36.211 p. 19)
+        if ((ns==(1+(subframe<<1))) && (shortened_format==1)) {  // second slot and shortened format
+          if (l<2) {                                         // data
+            W_re=W3_re[n_oc][l];
+            W_im=W3_im[n_oc][l];
+          } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==0)) { // reference and normal CP
+            W_re=W3_re[n_oc][l-2];
+            W_im=W3_im[n_oc][l-2];
+            refs=1;
+          } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==1)) { // reference and extended CP
+            W_re=W4[n_oc][l-2];
+            W_im=0;
+            refs=1;
+          } else if ((l>=N_UL_symb-2)) {                      // data
+            W_re=W3_re[n_oc][l-N_UL_symb+4];
+            W_im=W3_im[n_oc][l-N_UL_symb+4];
+          }
+        } else {
+          if (l<2) {                                         // data
+            W_re=W4[n_oc][l];
+            W_im=0;
+          } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==NORMAL)) { // reference and normal CP
+            W_re=W3_re[n_oc][l-2];
+            W_im=W3_im[n_oc][l-2];
+            refs=1;
+          } else if ((l<N_UL_symb-2)&&(frame_parms->Ncp==EXTENDED)) { // reference and extended CP
+            W_re=W4[n_oc][l-2];
+            W_im=0;
+            refs=1;
+          } else if ((l>=N_UL_symb-2)) {                     // data
+            W_re=W4[n_oc][l-N_UL_symb+4];
+            W_im=0;
+          }
         }
-      }
 
-      // multiply W by S(ns) (36.211 p.17). only for data, reference symbols do not have this factor
-      if ((S==1)&&(refs==0)) {
-        tmp_re = W_re;
-        W_re = -W_im;
-        W_im = tmp_re;
-      }
+        // multiply W by S(ns) (36.211 p.17). only for data, reference symbols do not have this factor
+        if ((S==1)&&(refs==0)) {
+          tmp_re = W_re;
+          W_re = -W_im;
+          W_im = tmp_re;
+        }
 
 #ifdef DEBUG_PUCCH_RX
-      printf("[eNB] PUCCH: ncs[%d][%d]=%d, W_re %d, W_im %d, S %d, refs %d\n",ns,l,n_cs,W_re,W_im,S,refs);
+        printf("[eNB] PUCCH: ncs[%d][%d]=%d, W_re %d, W_im %d, S %d, refs %d\n",ns,l,n_cs,W_re,W_im,S,refs);
 #endif
-      alpha_ind=0;
-      // compute output sequence
-
-      for (n=0; n<12; n++) {
-
-        // this is r_uv^alpha(n)
-        tmp_re = (int16_t)(((int32_t)alpha_re[alpha_ind] * ul_ref_sigs[u][v][0][n<<1] - (int32_t)alpha_im[alpha_ind] * ul_ref_sigs[u][v][0][1+(n<<1)])>>15);
-        tmp_im = (int16_t)(((int32_t)alpha_re[alpha_ind] * ul_ref_sigs[u][v][0][1+(n<<1)] + (int32_t)alpha_im[alpha_ind] * ul_ref_sigs[u][v][0][n<<1])>>15);
-
-        // this is S(ns)*w_noc(m)*r_uv^alpha(n)
-        zptr[n<<1] = (tmp_re*W_re - tmp_im*W_im)>>15;
-        zptr[1+(n<<1)] = -(tmp_re*W_im + tmp_im*W_re)>>15;
-
+        alpha_ind=0;
+        // compute output sequence
+
+        for (n=0; n<12; n++) {
+          // this is r_uv^alpha(n)
+          tmp_re = (int16_t)(((int32_t)alpha_re[alpha_ind] * ul_ref_sigs[u][v][0][n<<1] - (int32_t)alpha_im[alpha_ind] * ul_ref_sigs[u][v][0][1+(n<<1)])>>15);
+          tmp_im = (int16_t)(((int32_t)alpha_re[alpha_ind] * ul_ref_sigs[u][v][0][1+(n<<1)] + (int32_t)alpha_im[alpha_ind] * ul_ref_sigs[u][v][0][n<<1])>>15);
+          // this is S(ns)*w_noc(m)*r_uv^alpha(n)
+          zptr[n<<1] = (tmp_re*W_re - tmp_im*W_im)>>15;
+          zptr[1+(n<<1)] = -(tmp_re*W_im + tmp_im*W_re)>>15;
 #ifdef DEBUG_PUCCH_RX
-        printf("[eNB] PUCCH subframe %d z(%d,%d) => %d,%d, alpha(%d) => %d,%d\n",subframe,l,n,zptr[n<<1],zptr[(n<<1)+1],
-              alpha_ind,alpha_re[alpha_ind],alpha_im[alpha_ind]);
+          printf("[eNB] PUCCH subframe %d z(%d,%d) => %d,%d, alpha(%d) => %d,%d\n",subframe,l,n,zptr[n<<1],zptr[(n<<1)+1],
+                 alpha_ind,alpha_re[alpha_ind],alpha_im[alpha_ind]);
 #endif
+          alpha_ind = (alpha_ind + n_cs)%12;
+        } // n
 
-        alpha_ind = (alpha_ind + n_cs)%12;
-      } // n
-
-      zptr+=24;
-    } // l
-
-    nprime=nprime1;
-    n_oc  =n_oc1;
-  } // ns
+        zptr+=24;
+      } // l
 
-  rem = ((((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)&7)>0) ? 1 : 0;
-
-  m = (n1_pucch < thres) ? NRB2 : (((n1_pucch-thres)/(12*c/deltaPUCCH_Shift))+NRB2+((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)+rem);
+      nprime=nprime1;
+      n_oc  =n_oc1;
+    } // ns
 
+    rem = ((((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)&7)>0) ? 1 : 0;
+    m = (n1_pucch < thres) ? NRB2 : (((n1_pucch-thres)/(12*c/deltaPUCCH_Shift))+NRB2+((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)+rem);
 #ifdef DEBUG_PUCCH_RX
-  printf("[eNB] PUCCH: m %d, thres %d, NRB2 %d\n",m,thres,NRB2);
+    printf("[eNB] PUCCH: m %d, thres %d, NRB2 %d\n",m,thres,NRB2);
 #endif
-  nsymb = N_UL_symb<<1;
-
-  zptr = (int16_t*)z;
+    nsymb = N_UL_symb<<1;
+    zptr = (int16_t *)z;
 
-  // Do detection
-  for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-
-    //for (j=0,l=0;l<(nsymb-1);l++) {
-    for (j=0,l=0; l<nsymb; l++) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      if (br_flag > 0 ) {
-        if ((m&1) == 0)
-          re_offset = (m*6) + frame_parms->first_carrier_offset;
-	else
-	  re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
-      }
-      else
-#endif
-      {
-        if ((l<(nsymb>>1)) && ((m&1) == 0))
-          re_offset = (m*6) + frame_parms->first_carrier_offset;
-        else if ((l<(nsymb>>1)) && ((m&1) == 1))
-          re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
-        else if ((m&1) == 0)
-          re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
-        else
-          re_offset = ((m-1)*6) + frame_parms->first_carrier_offset;
-      }
+    // Do detection
+    for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+      //for (j=0,l=0;l<(nsymb-1);l++) {
+      for (j=0,l=0; l<nsymb; l++) {
+        if (br_flag > 0 ) {
+          if ((m&1) == 0)
+            re_offset = (m*6) + frame_parms->first_carrier_offset;
+          else
+            re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
+        } else {
+          if ((l<(nsymb>>1)) && ((m&1) == 0))
+            re_offset = (m*6) + frame_parms->first_carrier_offset;
+          else if ((l<(nsymb>>1)) && ((m&1) == 1))
+            re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
+          else if ((m&1) == 0)
+            re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
+          else
+            re_offset = ((m-1)*6) + frame_parms->first_carrier_offset;
+        }
 
-      if (re_offset > frame_parms->ofdm_symbol_size)
-        re_offset -= (frame_parms->ofdm_symbol_size);
+        if (re_offset > frame_parms->ofdm_symbol_size)
+          re_offset -= (frame_parms->ofdm_symbol_size);
 
-      symbol_offset = (unsigned int)frame_parms->ofdm_symbol_size*l;
-      rxptr = (int16_t *)&common_vars->rxdataF[aa][symbol_offset];
+        symbol_offset = (unsigned int)frame_parms->ofdm_symbol_size*l;
+        rxptr = (int16_t *)&common_vars->rxdataF[aa][symbol_offset];
 
-      for (i=0; i<12; i++,j+=2,re_offset++) {
-        if (re_offset==frame_parms->ofdm_symbol_size)
-          re_offset = 0;
-
-        rxcomp[aa][j]   = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[j])>>15)   - ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[1+j])>>15);
-        rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[j])>>15);
+        for (i=0; i<12; i++,j+=2,re_offset++) {
+          if (re_offset==frame_parms->ofdm_symbol_size)
+            re_offset = 0;
 
+          rxcomp[aa][j]   = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[j])>>15)   - ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[1+j])>>15);
+          rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[j])>>15);
 #ifdef DEBUG_PUCCH_RX
-        printf("[eNB] PUCCH subframe %d (%d,%d,%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,i,re_offset,m,j,
-              rxptr[re_offset<<1],rxptr[1+(re_offset<<1)],
-              zptr[j],zptr[1+j],
-              rxcomp[aa][j],rxcomp[aa][1+j]);
+          printf("[eNB] PUCCH subframe %d (%d,%d,%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,i,re_offset,m,j,
+                 rxptr[re_offset<<1],rxptr[1+(re_offset<<1)],
+                 zptr[j],zptr[1+j],
+                 rxcomp[aa][j],rxcomp[aa][1+j]);
 #endif
-      } //re
-    } // symbol
-  }  // antenna
-
+        } //re
+      } // symbol
+    }  // antenna
 
-  // PUCCH Format 1
-  // Do cfo correction and MRC across symbols
+    // PUCCH Format 1
+    // Do cfo correction and MRC across symbols
 
-  if (fmt == pucch_format1) {
+    if (fmt == pucch_format1) {
 #ifdef DEBUG_PUCCH_RX
-    printf("Doing PUCCH detection for format 1\n");
+      printf("Doing PUCCH detection for format 1\n");
 #endif
-
-    stat_max = 0;
-
-
-    for (phase=0; phase<7; phase++) {
-      stat=0;
-
-      for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (re=0; re<12; re++) {
-          stat_re=0;
-          stat_im=0;
-          off=re<<1;
-          cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
-
-          for (l=0; l<(nsymb>>1); l++) {
-            stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb;
-            stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/nsymb;
-            off+=2;
-
-		    
+      stat_max = 0;
+
+      for (phase=0; phase<7; phase++) {
+        stat=0;
+
+        for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+          for (re=0; re<12; re++) {
+            stat_re=0;
+            stat_im=0;
+            off=re<<1;
+            cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
+
+            for (l=0; l<(nsymb>>1); l++) {
+              stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb;
+              stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/nsymb;
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) , stat %d\n",subframe,phase,l,re,
-                  rxcomp[aa][off],rxcomp[aa][1+off],
-                  cfo[l<<1],cfo[1+(l<<1)],
-                  stat_re,stat_im,stat);
+              printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) , stat %d\n",subframe,phase,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     stat_re,stat_im,stat);
 #endif
-          }
-
-          for (l2=0,l=(nsymb>>1); l < nsymb; l++,l2++) {
-            stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb;
-            stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb;
-            off+=2;
+            }
 
+            for (l2=0,l=(nsymb>>1); l < nsymb; l++,l2++) {
+              stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb;
+              stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb;
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d), stat %d\n",subframe,phase,l2,re,
-                  rxcomp[aa][off],rxcomp[aa][1+off],
-                  cfo[l2<<1],cfo[1+(l2<<1)],
-                  stat_re,stat_im,stat);
+              printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d), stat %d\n",subframe,phase,l2,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l2<<1],cfo[1+(l2<<1)],
+                     stat_re,stat_im,stat);
 #endif
+            }
 
+            stat += ((stat_re*stat_re) + (stat_im*stat_im));
+          } //re
+        } // aa
 
-          }
-	  stat += ((stat_re*stat_re) + (stat_im*stat_im));
-
-       } //re
-      } // aa
-
- 
-      if (stat>stat_max) {
-        stat_max = stat;
-        phase_max = phase;
-      }
-
-    } //phase
+        if (stat>stat_max) {
+          stat_max = stat;
+          phase_max = phase;
+        }
+      } //phase
 
-//    stat_max *= nsymb;  // normalize to energy per symbol
-//    stat_max /= (frame_parms->N_RB_UL*12); //
-    stat_max /= 12;
-    
+      //    stat_max *= nsymb;  // normalize to energy per symbol
+      //    stat_max /= (frame_parms->N_RB_UL*12); //
+      stat_max /= 12;
 #ifdef DEBUG_PUCCH_RX
-    printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
+      printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
 #endif
-
 #ifdef DEBUG_PUCCH_RX
-    LOG_I(PHY,"[eNB] PUCCH fmt1:  stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,eNB->measurements.n0_subband_power_tot_dBm[6],pucch1_thres,phase_max);
+      LOG_I(PHY,"[eNB] PUCCH fmt1:  stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,eNB->measurements.n0_subband_power_tot_dBm[6],pucch1_thres,phase_max);
 #endif
+      eNB->pucch1_stats[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = stat_max;
+      eNB->pucch1_stats_thres[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = sigma2_dB+pucch1_thres;
+      eNB->pucch1_stats_cnt[UE_id][subframe] = (eNB->pucch1_stats_cnt[UE_id][subframe]+1)&1023;
+      T(T_ENB_PHY_PUCCH_1_ENERGY, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(frame), T_INT(subframe),
+        T_INT(stat_max), T_INT(sigma2_dB+pucch1_thres));
+
+      /*
+      if (eNB->pucch1_stats_cnt[UE_id][subframe] == 0) {
+        LOG_M("pucch_debug.m","pucch_energy",
+         &eNB->pucch1_stats[UE_id][(subframe<<10)],
+         1024,1,2);
+        AssertFatal(0,"Exiting for PUCCH 1 debug\n");
 
-    
-    eNB->pucch1_stats[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = stat_max;
-    eNB->pucch1_stats_thres[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = sigma2_dB+pucch1_thres;
-    eNB->pucch1_stats_cnt[UE_id][subframe] = (eNB->pucch1_stats_cnt[UE_id][subframe]+1)&1023;
-
-    T(T_ENB_PHY_PUCCH_1_ENERGY, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(frame), T_INT(subframe),
-      T_INT(stat_max), T_INT(sigma2_dB+pucch1_thres));
-
-    /*
-    if (eNB->pucch1_stats_cnt[UE_id][subframe] == 0) {
-      LOG_M("pucch_debug.m","pucch_energy",
-		   &eNB->pucch1_stats[UE_id][(subframe<<10)],
-		   1024,1,2);
-      AssertFatal(0,"Exiting for PUCCH 1 debug\n");
+      }
+      */
 
-    }
-    */
+      // This is a moving average of the PUCCH1 statistics conditioned on being above or below the threshold
+      if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres))  {
+        *payload = 1;
+      } else {
+        *payload = 0;
+      }
 
-    // This is a moving average of the PUCCH1 statistics conditioned on being above or below the threshold
-    if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres))  {
-      *payload = 1;
-    }
-    else {
-      *payload = 0;
-    }
-    if (UE_id==0) {
-      VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,dB_fixed(stat_max));
-      VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,sigma2_dB+pucch1_thres);
-    }
-  } else if ((fmt == pucch_format1a)||(fmt == pucch_format1b)) {
-    stat_max = 0;
+      if (UE_id==0) {
+        VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,dB_fixed(stat_max));
+        VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,sigma2_dB+pucch1_thres);
+      }
+    } else if ((fmt == pucch_format1a)||(fmt == pucch_format1b)) {
+      stat_max = 0;
 #ifdef DEBUG_PUCCH_RX
-    LOG_D(PHY,"Doing PUCCH detection for format 1a/1b\n");
+      LOG_D(PHY,"Doing PUCCH detection for format 1a/1b\n");
 #endif
 
-    for (phase=0; phase<7; phase++) {
-      stat=0;
-
-      for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-        for (re=0; re<12; re++) {
-
-	  // compute received energy first slot, seperately for data and reference
-	  // by coherent combining across symbols but not resource elements
-	  // Note: assumption is that channel is stationary over symbols in slot after CFO
-          stat_re=0;
-          stat_im=0;
-          stat_ref_re=0;
-          stat_ref_im=0;
-          off=re<<1;
-          cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
-
-
-          for (l=0; l<(nsymb>>1); l++) {
-            if ((l<2)||(l>(nsymb>>1) - 3)) {  //data symbols
-              stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-              stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
-            } else { //reference symbols
-              stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-              stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+      for (phase=0; phase<7; phase++) {
+        stat=0;
+
+        for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+          for (re=0; re<12; re++) {
+            // compute received energy first slot, seperately for data and reference
+            // by coherent combining across symbols but not resource elements
+            // Note: assumption is that channel is stationary over symbols in slot after CFO
+            stat_re=0;
+            stat_im=0;
+            stat_ref_re=0;
+            stat_ref_im=0;
+            off=re<<1;
+            cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
+
+            for (l=0; l<(nsymb>>1); l++) {
+              if ((l<2)||(l>(nsymb>>1) - 3)) {  //data symbols
+                stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+                stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              } else { //reference symbols
+                stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+                stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              }
+
+              off+=2;
+#ifdef DEBUG_PUCCH_RX
+              printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     stat_re,stat_im);
+#endif
             }
 
-            off+=2;
+            // this is total energy received, summed over data and reference
+            stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) +
+                      ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb);
+            // now second slot
+            stat_re=0;
+            stat_im=0;
+            stat_ref_re=0;
+            stat_ref_im=0;
+
+            for (l2=0,l=(nsymb>>1); l< nsymb; l++,l2++) {
+              if ((l2<2) || ((l2>(nsymb>>1) - 3)) ) {  // data symbols
+                stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15);
+                stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15);
+              } else { //reference_symbols
+                stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15);
+                stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15);
+              }
+
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re,
-                  rxcomp[aa][off],rxcomp[aa][1+off],
-                  cfo[l<<1],cfo[1+(l<<1)],
-                  stat_re,stat_im);
+              printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l2,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l2<<1],cfo[1+(l2<<1)],
+                     stat_re,stat_im);
 #endif
-          }
-	  // this is total energy received, summed over data and reference
-	  stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) +
-		    ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb);
-
-	  // now second slot
-	  stat_re=0;
-	  stat_im=0;
-          stat_ref_re=0;
-          stat_ref_im=0;
-
-          for (l2=0,l=(nsymb>>1); l< nsymb; l++,l2++) {
-            if ((l2<2) || ((l2>(nsymb>>1) - 3)) ) {  // data symbols
-              stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15);
-              stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15);
-            } else { //reference_symbols
-              stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15);
-              stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15);
             }
 
-            off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l2,re,
-                  rxcomp[aa][off],rxcomp[aa][1+off],
-                  cfo[l2<<1],cfo[1+(l2<<1)],
-                  stat_re,stat_im);
+            printf("aa%d re %d : phase %d : stat %d\n",aa,re,phase,stat);
 #endif
-
-          }
+            stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) +
+                      ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb);
+          } //re
+        } // aa
 
 #ifdef DEBUG_PUCCH_RX
-          printf("aa%d re %d : phase %d : stat %d\n",aa,re,phase,stat);
+        LOG_D(PHY,"Format 1A: phase %d : stat %d\n",phase,stat);
 #endif
 
-	  stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) +
-		    ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb);
-
-
-        } //re
-      } // aa
+        if (stat>stat_max) {
+          stat_max = stat;
+          phase_max = phase;
+        }
+      } //phase
 
+      stat_max/=(12);  //normalize to energy per symbol and RE
 #ifdef DEBUG_PUCCH_RX
-      LOG_D(PHY,"Format 1A: phase %d : stat %d\n",phase,stat);
+      LOG_I(PHY,"[eNB] PUCCH fmt1a/b:  stat_max : %d (%d : sigma2 %d), phase_max : %d\n",stat_max,dB_fixed(stat_max),sigma2_dB,phase_max);
 #endif
-      if (stat>stat_max) {
-        stat_max = stat;
-        phase_max = phase;
-      }
-    } //phase
+      stat_re=0;
+      stat_im=0;
+      // Do detection now
+#if defined(USRP_REC_PLAY)
 
-    stat_max/=(12);  //normalize to energy per symbol and RE
-#ifdef DEBUG_PUCCH_RX
-    LOG_I(PHY,"[eNB] PUCCH fmt1a/b:  stat_max : %d (%d : sigma2 %d), phase_max : %d\n",stat_max,dB_fixed(stat_max),sigma2_dB,phase_max);
+      // It looks like the value is a bit messy when RF is replayed.
+      // For instance i assume to skip pucch1_thres from the test below.
+      // Not 100% sure
+      if (sigma2_dB<(dB_fixed(stat_max)))  {//
+#else
+      if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres))  {//
 #endif
+        chL = (nsymb>>1)-4;
+        chest_mag=0;
+        cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max];
+
+        for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+          // channel estimates first
+          for (re=0; re<12; re++) {
+            // channel estimate for first slot
+            chest0_re[aa][re]=0;
+            chest0_im[aa][re]=0;
+
+            for (l=2; l<(nsymb>>1)-2; l++) {
+              off=(re<<1) + (24*l);
+              chest0_re[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL;
+              chest0_im[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL;
+            }
 
-    stat_re=0;
-    stat_im=0;
+            // channel estimate for second slot
+            chest1_re[aa][re]=0;
+            chest1_im[aa][re]=0;
 
-    // Do detection now
-#if defined(USRP_REC_PLAY)
-    // It looks like the value is a bit messy when RF is replayed.
-    // For instance i assume to skip pucch1_thres from the test below.
-    // Not 100% sure
-    if (sigma2_dB<(dB_fixed(stat_max)))  {//
-#else
-    if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres))  {//
-#endif
-      chL = (nsymb>>1)-4;
-      chest_mag=0;
-      cfo =  (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max];
-
-      for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-	// channel estimates first
-        for (re=0; re<12; re++) {
-
-          // channel estimate for first slot
-          chest0_re[aa][re]=0;
-          chest0_im[aa][re]=0;
-	  for (l=2; l<(nsymb>>1)-2; l++) {
-	    off=(re<<1) + (24*l);
-	    chest0_re[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL;
-	    chest0_im[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL;
-	  }	    
-	  
-
-          // channel estimate for second slot
-	  chest1_re[aa][re]=0;
-	  chest1_im[aa][re]=0;
-          for (l=2; l<(nsymb>>1)-2; l++) {
-            off=(re<<1) + (24*l) + (nsymb>>1)*24;
-            chest1_re[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL;
-	    chest1_im[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL;
+            for (l=2; l<(nsymb>>1)-2; l++) {
+              off=(re<<1) + (24*l) + (nsymb>>1)*24;
+              chest1_re[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL;
+              chest1_im[aa][re] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL;
+            }
+
+            chest_mag = max(chest_mag,(chest0_re[aa][re]*chest0_re[aa][re]) + (chest0_im[aa][re]*chest0_im[aa][re]));
+            chest_mag = max(chest_mag,(chest1_re[aa][re]*chest1_re[aa][re]) + (chest1_im[aa][re]*chest1_im[aa][re]));
           }
-	  chest_mag = max(chest_mag,(chest0_re[aa][re]*chest0_re[aa][re]) + (chest0_im[aa][re]*chest0_im[aa][re]));
-	  chest_mag = max(chest_mag,(chest1_re[aa][re]*chest1_re[aa][re]) + (chest1_im[aa][re]*chest1_im[aa][re]));
+        }
 
-	}
-      }
-      log2_maxh = log2_approx(chest_mag)/2;
+        log2_maxh = log2_approx(chest_mag)/2;
 #ifdef DEBUG_PUCCH_RX
-      printf("PUCCH 1A: log2_maxh %d\n",log2_maxh);
+        printf("PUCCH 1A: log2_maxh %d\n",log2_maxh);
 #endif
-	// now do channel matched filter
-      for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
-	for (re=0; re<12; re++) {
 
+        // now do channel matched filter
+        for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
+          for (re=0; re<12; re++) {
 #ifdef DEBUG_PUCCH_RX
-          printf("[eNB] PUCCH subframe %d chest0[%d][%d] => (%d,%d)\n",subframe,aa,re,
-                chest0_re[aa][re],chest0_im[aa][re]);
+            printf("[eNB] PUCCH subframe %d chest0[%d][%d] => (%d,%d)\n",subframe,aa,re,
+                   chest0_re[aa][re],chest0_im[aa][re]);
 #endif
-	  // first slot, left of RS    
-          for (l=0; l<2; l++) {
-            off=(re<<1) + (24*l);
-            tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-            tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
-            stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh));
-            stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh));
-            off+=2;
+
+            // first slot, left of RS
+            for (l=0; l<2; l++) {
+              off=(re<<1) + (24*l);
+              tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+              tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh));
+              stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh));
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
-		   rxcomp[aa][off],rxcomp[aa][1+off],
-		   cfo[l<<1],cfo[1+(l<<1)],
-		   tmp_re,tmp_im,
-		   stat_re,stat_im);
+              printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     tmp_re,tmp_im,
+                     stat_re,stat_im);
 #endif
-	  }
-	  // first slot, right of RS
-          for (l=(nsymb>>1)-2; l<(nsymb>>1); l++) {
-            off=(re<<1) + (24*l);
-            tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-            tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
-            stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh));
-            stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh));
-            off+=2;
+            }
+
+            // first slot, right of RS
+            for (l=(nsymb>>1)-2; l<(nsymb>>1); l++) {
+              off=(re<<1) + (24*l);
+              tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+              tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh));
+              stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh));
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
-		   rxcomp[aa][off],rxcomp[aa][1+off],
-		   cfo[l<<1],cfo[1+(l<<1)],
-		   tmp_re,tmp_im,
-		   stat_re,stat_im);
+              printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     tmp_re,tmp_im,
+                     stat_re,stat_im);
 #endif
-	  }
-	  
-	  
+            }
 
 #ifdef DEBUG_PUCCH_RX
-          printf("[eNB] PUCCH subframe %d chest1[%d][%d] => (%d,%d)\n",subframe,aa,re,
-                chest0_re[aa][re],chest0_im[aa][re]);
+            printf("[eNB] PUCCH subframe %d chest1[%d][%d] => (%d,%d)\n",subframe,aa,re,
+                   chest0_re[aa][re],chest0_im[aa][re]);
 #endif
-	  // second slot, left of RS    	  
-          for (l=0; l<2; l++) {
-	    off=(re<<1) + (24*l) + (nsymb>>1)*24;
-	    tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-	    tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
-	    stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh));
-            stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh));
-            off+=2;
+
+            // second slot, left of RS
+            for (l=0; l<2; l++) {
+              off=(re<<1) + (24*l) + (nsymb>>1)*24;
+              tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+              tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh));
+              stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh));
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
-		   rxcomp[aa][off],rxcomp[aa][1+off],
-		   cfo[l<<1],cfo[1+(l<<1)],
-		   tmp_re,tmp_im,
-		   stat_re,stat_im);
+              printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     tmp_re,tmp_im,
+                     stat_re,stat_im);
 #endif
-          }
+            }
 
-	  // second slot, right of RS    	  
-          for (l=(nsymb>>1)-2; l<(nsymb>>1)-1; l++) {
-            off=(re<<1) + (24*l) + (nsymb>>1)*24;
-            tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
-            tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
-            stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh));
-            stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh));
-            off+=2;
+            // second slot, right of RS
+            for (l=(nsymb>>1)-2; l<(nsymb>>1)-1; l++) {
+              off=(re<<1) + (24*l) + (nsymb>>1)*24;
+              tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15)     - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15);
+              tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15);
+              stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh));
+              stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh));
+              off+=2;
 #ifdef DEBUG_PUCCH_RX
-            printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
-		   rxcomp[aa][off],rxcomp[aa][1+off],
-		   cfo[l<<1],cfo[1+(l<<1)],
-		   tmp_re,tmp_im,
-		   stat_re,stat_im);
+              printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re,
+                     rxcomp[aa][off],rxcomp[aa][1+off],
+                     cfo[l<<1],cfo[1+(l<<1)],
+                     tmp_re,tmp_im,
+                     stat_re,stat_im);
 #endif
-          }
+            }
 
 #ifdef DEBUG_PUCCH_RX
-          printf("aa%d re %d : stat %d,%d\n",aa,re,stat_re,stat_im);
+            printf("aa%d re %d : stat %d,%d\n",aa,re,stat_re,stat_im);
 #endif
-
-        } //re
-      } // aa
-
-
-      LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
-	    (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
-      LOG_D(PHY,"In pucch.c PUCCH 1a/b: ACK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
-      
-      eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
-      eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
-      eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
-
-      /* frame not available here - set to -1 for the moment */
-      T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im));
-
-      *payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK
-
-      if (fmt==pucch_format1b)
-        *(1+payload) = (stat_im<0) ? 1 : 2;
-    } else { // insufficient energy on PUCCH so NAK
+          } //re
+        } // aa
+
+        LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
+              (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
+        LOG_D(PHY,"In pucch.c PUCCH 1a/b: ACK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
+        eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
+        eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
+        eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
+        /* frame not available here - set to -1 for the moment */
+        T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im));
+        *payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK
+
+        if (fmt==pucch_format1b)
+          *(1+payload) = (stat_im<0) ? 1 : 2;
+      } else { // insufficient energy on PUCCH so NAK
 #if defined(USRP_REC_PLAY)
-      LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
+        LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
 #else
-      LOG_D(PHY,"In pucch.c PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
+        LOG_D(PHY,"In pucch.c PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
 #endif
+        *payload = 4;  // DTX
+        ((int16_t *)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
+        ((int16_t *)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
+        eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
 
-      *payload = 4;  // DTX
-      ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
-      ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
-      eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
-
-      if (fmt==pucch_format1b)
-        *(1+payload) = 4;
+        if (fmt==pucch_format1b)
+          *(1+payload) = 4;
+      }
+    } else {
+      LOG_E(PHY,"[eNB] PUCCH fmt2/2a/2b not supported\n");
     }
-  } else {
-    LOG_E(PHY,"[eNB] PUCCH fmt2/2a/2b not supported\n");
-  }
-  
-  /* PUCCH format3 >> */
+
+    /* PUCCH format3 >> */
   } else {
     /* SubCarrier Demap */
     Ret = pucchfmt3_subCarrierDeMapping( eNB, SubCarrierDeMapData, n3_pucch );
+
     if(Ret != 0) {
-        //***log pucchfmt3_subCarrierDeMapping Error!
-        return(-1);
+      //***log pucchfmt3_subCarrierDeMapping Error!
+      return(-1);
     }
-    
+
     /* cyclic shift hopping remove */
     Ret = pucchfmt3_Baseseq_csh_remove( SubCarrierDeMapData, CshData_fmt3, frame_parms, subframe, eNB->ncs_cell );
+
     if(Ret != 0) {
-        //***log pucchfmt3_Baseseq_csh_remove Error!
-        return(-1);
+      //***log pucchfmt3_Baseseq_csh_remove Error!
+      return(-1);
     }
-    
+
     /* Channel Estimation */
     Ret = pucchfmt3_ChannelEstimation( SubCarrierDeMapData, delta_theta, ChestValue, &Interpw, subframe, shortened_format, frame_parms, n3_pucch, n3_pucch_array, eNB->ncs_cell );
+
     if(Ret != 0) {
-        //***log pucchfmt3_ChannelEstimation Error!
-        return(-1);
+      //***log pucchfmt3_ChannelEstimation Error!
+      return(-1);
     }
-    
+
     /* Channel Equalization */
     Ret = pucchfmt3_Equalization( CshData_fmt3, ChdetAfterValue_fmt3, ChestValue, frame_parms );
+
     if(Ret != 0) {
-        //***log pucchfmt3_Equalization Error!
-        return(-1);
+      //***log pucchfmt3_Equalization Error!
+      return(-1);
     }
-    
+
     /* Frequency deviation remove AFC */
     Ret = pucchfmt3_FrqDevRemove( ChdetAfterValue_fmt3, delta_theta, RemoveFrqDev_fmt3, frame_parms );
+
     if(Ret != 0) {
-        //***log pucchfmt3_FrqDevRemove Error!
-        return(-1);
+      //***log pucchfmt3_FrqDevRemove Error!
+      return(-1);
     }
-    
+
     /* orthogonal sequence remove */
     Ret = pucchfmt3_OrthSeqRemove( RemoveFrqDev_fmt3, Fmt3xDataRmvOrth, shortened_format, n3_pucch, frame_parms );
+
     if(Ret != 0) {
-        //***log pucchfmt3_OrthSeqRemove Error!
-        return(-1);
+      //***log pucchfmt3_OrthSeqRemove Error!
+      return(-1);
     }
-    
+
     /* averaging antenna */
     pucchfmt3_AvgAnt( Fmt3xDataRmvOrth, Fmt3xDataAvgAnt, shortened_format, frame_parms );
-    
     /* averaging symbol */
     pucchfmt3_AvgSym( Fmt3xDataAvgAnt, Fmt3xDataAvgSym, shortened_format );
-    
     /* IDFT */
-    pucchfmt3_IDft2( (int16_t*)Fmt3xDataAvgSym[0], (int16_t*)IFFTOutData_Fmt3[0] );
-    pucchfmt3_IDft2( (int16_t*)Fmt3xDataAvgSym[1], (int16_t*)IFFTOutData_Fmt3[1] );
-    
+    pucchfmt3_IDft2( (int16_t *)Fmt3xDataAvgSym[0], (int16_t *)IFFTOutData_Fmt3[0] );
+    pucchfmt3_IDft2( (int16_t *)Fmt3xDataAvgSym[1], (int16_t *)IFFTOutData_Fmt3[1] );
     /* descramble */
     pucchfmt3_Descramble(IFFTOutData_Fmt3, b, subframe, frame_parms->Nid_cell, crnti);
 
     /* Is payload 6bit or 7bit? */
     if( do_sr == 1 ) {
-        payload_max = 7;
+      payload_max = 7;
     } else {
-        payload_max = 6;
+      payload_max = 6;
     }
-    
+
     /* decode */
     payload_entity = pucchfmt3_Decode( b, subframe, DTXthreshold, Interpw, do_sr );
+
     if (payload_entity == -1) {
-        //***log pucchfmt3_Decode Error!
-        return(-1);
+      //***log pucchfmt3_Decode Error!
+      return(-1);
     }
-    
+
     for(i=0; i<payload_max; i++) {
       *(payload+i) = (uint8_t)((payload_entity>>i) & 0x01);
     }
   }
-  /* PUCCH format3 << */
 
+  /* PUCCH format3 << */
   return((int32_t)stat_max);
-
 }
diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common.h b/openair1/PHY/LTE_TRANSPORT/transport_common.h
index 8540c30166cae2a5503524784064629e2f3b7d84..321789d54b380a95c221c38e497e85de12925092 100644
--- a/openair1/PHY/LTE_TRANSPORT/transport_common.h
+++ b/openair1/PHY/LTE_TRANSPORT/transport_common.h
@@ -36,7 +36,7 @@
 #include "mdci.h"
 //#include "uci.h"
 #ifndef STANDALONE_COMPILE
-#include "UTIL/LISTS/list.h"
+  #include "UTIL/LISTS/list.h"
 #endif
 
 #define MOD_TABLE_QPSK_OFFSET 1
@@ -66,19 +66,19 @@
 #define MAX_NUM_RE (14*1200)
 
 #if !defined(SI_RNTI)
-#define SI_RNTI  (rnti_t)0xffff
+  #define SI_RNTI  (rnti_t)0xffff
 #endif
 #if !defined(M_RNTI)
-#define M_RNTI   (rnti_t)0xfffd
+  #define M_RNTI   (rnti_t)0xfffd
 #endif
 #if !defined(P_RNTI)
-#define P_RNTI   (rnti_t)0xfffe
+  #define P_RNTI   (rnti_t)0xfffe
 #endif
 #if !defined(CBA_RNTI)
-#define CBA_RNTI (rnti_t)0xfff4
+  #define CBA_RNTI (rnti_t)0xfff4
 #endif
 #if !defined(C_RNTI)
-#define C_RNTI   (rnti_t)0x1234
+  #define C_RNTI   (rnti_t)0x1234
 #endif
 // These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
 //1 layer
@@ -92,7 +92,8 @@
 #define PMI_2A_R1_1j 2
 
 typedef enum { SEARCH_EXIST=0,
-	       SEARCH_EXIST_OR_FREE} find_type_t;
+               SEARCH_EXIST_OR_FREE
+             } find_type_t;
 
 typedef enum {
   SCH_IDLE=0,
@@ -102,14 +103,10 @@ typedef enum {
 } SCH_status_t;
 
 
-
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 typedef enum {
   CEmodeA = 0,
   CEmodeB = 1
 } CEmode_t;
-#endif
 
 #define PUSCH_x 2
 #define PUSCH_y 3
@@ -134,20 +131,14 @@ typedef enum {
   HARQ_SR,
   HARQ_CQI,
   SR_CQI,
-  HARQ_SR_CQI  
+  HARQ_SR_CQI
 } UCI_type_t;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 typedef enum {
   NOCE,
   CEMODEA,
   CEMODEB
 } UE_type_t;
-#endif
-
-
-
-
 
 typedef enum {
   SI_PDSCH=0,
@@ -182,8 +173,6 @@ typedef struct {
   PRACH_TDD_PREAMBLE_MAP_elem map[6];
 } PRACH_TDD_PREAMBLE_MAP;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
 typedef struct {
   uint16_t slss_id;
   uint8_t *slmib;
@@ -252,7 +241,7 @@ typedef struct {
 typedef struct {
   /// payload length
   int payload_length;
-	uint8_t payload[100];
+  uint8_t payload[100];
 } SLDCH_t;
 
 #define TTI_SYNC 0
@@ -275,7 +264,6 @@ typedef struct UE_tport_s {
   uint8_t payload[1500];
 } UE_tport_t;
 
-#endif
 
 /**@}*/
 #endif
diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h
index 5bccca25b7351e5963f8273a680b566e14d2466f..1d7aa598afd652b59432a919c061461996419c2d 100644
--- a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h
+++ b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h
@@ -103,7 +103,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
 
 
 #ifndef modOrder
-#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
+  #define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
 #endif
 
 /** \fn uint8_t I_TBS2I_MCS(uint8_t I_TBS);
@@ -132,10 +132,10 @@ uint8_t SE2I_TBS(float SE,
     @returns 0 on success*/
 
 int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
-		 SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
-		 int *txdataF,
-		 int16_t amp,
-		 uint32_t subframe);
+                 SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
+                 int *txdataF,
+                 int16_t amp,
+                 uint32_t subframe);
 
 
 /*!
@@ -149,7 +149,7 @@ int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
 void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
 
 
-int32_t compareints (const void * a, const void * b);
+int32_t compareints (const void *a, const void *b);
 
 uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
 
@@ -240,11 +240,11 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
   @param Xu DFT output
 */
 void compute_prach_seq(uint16_t rootSequenceIndex,
-		       uint8_t prach_ConfigIndex,
-		       uint8_t zeroCorrelationZoneConfig,
-		       uint8_t highSpeedFlag,
-		       lte_frame_type_t frame_type,
-		       uint32_t X_u[64][839]);
+                       uint8_t prach_ConfigIndex,
+                       uint8_t zeroCorrelationZoneConfig,
+                       uint8_t highSpeedFlag,
+                       lte_frame_type_t frame_type,
+                       uint32_t X_u[64][839]);
 
 
 void init_prach_tables(int N_ZC);
@@ -258,7 +258,7 @@ void init_prach_tables(int N_ZC);
 */
 int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 /*!
   \brief Return the status of CAS in this frame/subframe
   @param frame Frame index
@@ -276,7 +276,7 @@ int is_fembms_cas_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *fram
   @returns 1 if subframe is for MBSFN
 */
 int is_fembms_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
-#endif
+
 
 
 
@@ -302,10 +302,10 @@ void init_scrambling_lut(void);
 void init_unscrambling_lut(void);
 
 
-uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, 
-			     uint8_t prach_ConfigIndex, 
-			     uint8_t n_ra_prboffset,
-			     uint8_t tdd_mapindex, uint16_t Nf);
+uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
+                             uint8_t prach_ConfigIndex,
+                             uint8_t n_ra_prboffset,
+                             uint8_t tdd_mapindex, uint16_t Nf);
 
 uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
 uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n);
diff --git a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h
index 735b8fd7ff2d2ce13eaba59387f136f2219d2fba..67c627ca001dd8dc521fbb6a7ae60871412d3862 100644
--- a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h
+++ b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h
@@ -37,7 +37,7 @@
 #include "mdci.h"
 #include "uci_common.h"
 #ifndef STANDALONE_COMPILE
-#include "UTIL/LISTS/list.h"
+  #include "UTIL/LISTS/list.h"
 #endif
 
 
@@ -126,14 +126,12 @@ typedef struct {
   /// codeword this transport block is mapped to
   uint8_t codeword;
 #ifdef PHY_TX_THREAD
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
   uint8_t sib1_br_flag;
   /// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
   uint16_t i0;
   CEmode_t CEmode;
 #endif
-#endif
 } LTE_DL_eNB_HARQ_t;
 
 
@@ -185,14 +183,12 @@ typedef struct {
   /// amplitude of PDSCH (compared to RS) in symbols containing pilots
   int16_t sqrt_rho_b;
 #ifndef PHY_TX_THREAD
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
   uint8_t sib1_br_flag;
   /// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
   uint16_t i0;
   CEmode_t CEmode;
 #endif
-#endif
 } LTE_eNB_DLSCH_t;
 
 
@@ -344,7 +340,7 @@ typedef struct {
   uint16_t    n_pucch_1[4][2];
   /// two antenna n1_pucch 1_0 for SR
   uint16_t    n_pucch_1_0_sr[2];
-   /// two antenna n2_pucch
+  /// two antenna n2_pucch
   uint16_t    n_pucch_2[2];
   /// two antenna n3_pucch
   uint16_t    n_pucch_3[2];
@@ -352,7 +348,6 @@ typedef struct {
   uint8_t     tdd_bundling;
   /// Received Energy
   uint32_t stat;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// non BL/CE, CEmodeA, CEmodeB
   UE_type_t ue_type;
   /// Indicates the symbols that are left empty due to eMTC retuning.
@@ -369,7 +364,6 @@ typedef struct {
   uint8_t cdm_Index;
   // Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.
   uint8_t Nsrs;
-#endif
 } LTE_eNB_UCI;
 
 typedef struct {
@@ -447,10 +441,8 @@ typedef struct {
 } LTE_eNB_UE_stats;
 
 typedef struct {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// UE type (normal, CEModeA, CEModeB)
   uint8_t ue_type;
-#endif
   /// HARQ process mask, indicates which processes are currently active
   uint16_t harq_mask;
   /// Pointers to 8 HARQ processes for the ULSCH
diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h
index df1999b13f34d85c51625aeda7594768ce6669cb..f034039e7e23479059f9f7be3036a4b0f2877412 100644
--- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h
+++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h
@@ -60,7 +60,7 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
     @param abstraction_flag Flag to indicate abstracted interface
     @param frame_parms Pointer to frame descriptor structure
 */
-LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms);
+LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS *frame_parms);
 
 void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
 
@@ -73,18 +73,18 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch);
 LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
 
 int dlsch_encoding_all(PHY_VARS_eNB *eNB,
-		       unsigned char *a,
-		       uint8_t num_pdcch_symbols,
-		       LTE_eNB_DLSCH_t *dlsch,
-		       int frame,
-		       uint8_t subframe,
-		       time_stats_t *rm_stats,
-		       time_stats_t *te_stats,
-		       time_stats_t *te_wait_stats,
-		       time_stats_t *te_main_stats,
-		       time_stats_t *te_wakeup_stats0,
-		       time_stats_t *te_wakeup_stats1,
-		       time_stats_t *i_stats);
+                       unsigned char *a,
+                       uint8_t num_pdcch_symbols,
+                       LTE_eNB_DLSCH_t *dlsch,
+                       int frame,
+                       uint8_t subframe,
+                       time_stats_t *rm_stats,
+                       time_stats_t *te_stats,
+                       time_stats_t *te_wait_stats,
+                       time_stats_t *te_main_stats,
+                       time_stats_t *te_wakeup_stats0,
+                       time_stats_t *te_wakeup_stats1,
+                       time_stats_t *i_stats);
 
 /** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
     uint8_t *input_buffer,
@@ -155,12 +155,12 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
                                 uint8_t subframe,
                                 time_stats_t *rm_stats,
                                 time_stats_t *te_stats,
-				time_stats_t *te_wait_stats,
-				time_stats_t *te_main_stats,
-				time_stats_t *te_wakeup_stats0,
-				time_stats_t *te_wakeup_stats1,
+                                time_stats_t *te_wait_stats,
+                                time_stats_t *te_main_stats,
+                                time_stats_t *te_wakeup_stats0,
+                                time_stats_t *te_wakeup_stats1,
                                 time_stats_t *i_stats,
-				int worker_num);
+                                int worker_num);
 
 // Functions below implement 36-211
 
@@ -199,7 +199,7 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
     \param frame_parms Frame parameter descriptor
 */
 
-int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
+int32_t allocate_REs_in_RB(PHY_VARS_eNB *phy_vars_eNB,
                            int32_t **txdataF,
                            uint32_t *jj,
                            uint32_t *jj2,
@@ -238,7 +238,7 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
     @param dlsch0 Pointer to Transport Block 0 DLSCH descriptor for this allocation
     @param dlsch1 Pointer to Transport Block 0 DLSCH descriptor for this allocation
 */
-int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
+int32_t dlsch_modulation(PHY_VARS_eNB *phy_vars_eNB,
                          int32_t **txdataF,
                          int16_t amp,
                          int frame,
@@ -248,11 +248,11 @@ int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
                          LTE_eNB_DLSCH_t *dlsch1);
 
 int32_t dlsch_modulation_SIC(int32_t **sic_buffer,
-                         uint32_t sub_frame_offset,
-                         LTE_DL_FRAME_PARMS *frame_parms,
-                         uint8_t num_pdcch_symbols,
-                         LTE_eNB_DLSCH_t *dlsch0,
-                         int G);
+                             uint32_t sub_frame_offset,
+                             LTE_DL_FRAME_PARMS *frame_parms,
+                             uint8_t num_pdcch_symbols,
+                             LTE_eNB_DLSCH_t *dlsch0,
+                             int G);
 /*
   \brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
   @param txdataF Table of pointers for frequency-domain TX signals
@@ -376,7 +376,7 @@ void dci_encoding(uint8_t *a,
 */
 
 uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
-			 uint8_t num_dci,
+                         uint8_t num_dci,
                          DCI_ALLOC_t *dci_alloc,
                          uint32_t n_rnti,
                          int16_t amp,
@@ -385,7 +385,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
                          uint32_t sub_frame_offset);
 
 
-void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF);
+void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe, int16_t amp, int32_t **txdataF);
 
 void generate_64qam_table(void);
 void generate_16qam_table(void);
@@ -412,21 +412,21 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
 void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
                         int frame,
                         int subframe,
-			L1_rxtx_proc_t *proc,
-			DCI_ALLOC_t *dci_alloc,
-			nfapi_dl_config_dci_dl_pdu *pdu);
+                        L1_rxtx_proc_t *proc,
+                        DCI_ALLOC_t *dci_alloc,
+                        nfapi_dl_config_dci_dl_pdu *pdu);
 
 void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dci_alloc,nfapi_dl_config_mpdcch_pdu *pdu);
 
 void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
-	      nfapi_hi_dci0_dci_pdu *pdu);
+               nfapi_hi_dci0_dci_pdu *pdu);
 
 void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe);
 
-void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t * dci_alloc, nfapi_hi_dci0_mpdcch_dci_pdu * pdu);
+void fill_mpdcch_dci0 (PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, mDCI_ALLOC_t *dci_alloc, nfapi_hi_dci0_mpdcch_dci_pdu *pdu);
 
 int generate_eNB_ulsch_params_from_rar(PHY_VARS_eNB *eNB,
-				       unsigned char *rar_pdu,
+                                       unsigned char *rar_pdu,
                                        uint32_t frame,
                                        unsigned char subframe);
 
@@ -467,9 +467,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
 
 
 int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,
-                        int UE_id,
-                        int harq_pid,
-                        int llr8_flag);
+                            int UE_id,
+                            int harq_pid,
+                            int llr8_flag);
 
 /*!
   \brief Decoding of PUSCH/ACK/RI/ACK from 36-212.
@@ -516,7 +516,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,
                         int llr8_flag);
 
 void generate_phich_top(PHY_VARS_eNB *phy_vars_eNB,
-			L1_rxtx_proc_t *proc,
+                        L1_rxtx_proc_t *proc,
                         int16_t amp);
 
 
@@ -529,17 +529,17 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **w
 
 void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
                         uint8_t subframe,
-                        int8_t* llr,
+                        int8_t *llr,
                         uint32_t length);
 
 
 void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
                       int mbsfn_flag,
                       LTE_eNB_DLSCH_t *dlsch,
-		      int hard_pid,
+                      int hard_pid,
                       int G,
                       uint8_t q,
-		      uint16_t frame,
+                      uint16_t frame,
                       uint8_t Ns);
 
 
@@ -553,11 +553,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
                   uint8_t *payload,
                   int     frame,
                   uint8_t subframe,
-                  uint8_t pucch1_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 
-                  ,int     br_flag                  
-#endif
-                  );
+                  uint8_t pucch1_thres,
+                  int     br_flag
+                 );
 
 
 /*!
@@ -574,16 +572,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
 
 */
 void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
-	      uint16_t *max_preamble, 
-	      uint16_t *max_preamble_energy, 
-	      uint16_t *max_preamble_delay, 
-	      uint16_t *avg_preamble_energy, 
-	      uint16_t Nf, uint8_t tdd_mapindex
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	      ,
+              uint16_t *max_preamble,
+              uint16_t *max_preamble_energy,
+              uint16_t *max_preamble_delay,
+              uint16_t *avg_preamble_energy,
+              uint16_t Nf, uint8_t tdd_mapindex,
               uint8_t br_flag
-#endif
-	      );
+             );
 
 
 void init_unscrambling_lut(void);
@@ -597,12 +592,12 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp,
 
 
 double computeRhoA_eNB(uint8_t pa,
-		       LTE_eNB_DLSCH_t *dlsch_eNB,
+                       LTE_eNB_DLSCH_t *dlsch_eNB,
                        int dl_power_off,
                        uint8_t n_antenna_port);
 
 double computeRhoB_eNB(uint8_t pa,
-		       uint8_t pb,
+                       uint8_t pb,
                        uint8_t n_antenna_port,
                        LTE_eNB_DLSCH_t *dlsch_eNB,
                        int dl_power_off);
@@ -610,8 +605,8 @@ double computeRhoB_eNB(uint8_t pa,
 
 
 void conv_eMTC_rballoc(uint16_t resource_block_coding,
-		       uint32_t N_RB_DL,
-		       uint32_t *rb_alloc);
+                       uint32_t N_RB_DL,
+                       uint32_t *rb_alloc);
 
 int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
 
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
index f758b217c6d14de0458583bf6265d67ffb231cc7..e324f76c2b29e2852953af50792985882996eee0 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
@@ -357,7 +357,6 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
 void *td_thread(void *param) {
   PHY_VARS_eNB *eNB = ((td_params *)param)->eNB;
   L1_proc_t *proc  = &eNB->proc;
-
   pthread_setname_np( pthread_self(),"td processing");
   LOG_I(PHY,"thread td created id=%ld\n", syscall(__NR_gettid));
   //wait_sync("td_thread");
@@ -736,18 +735,14 @@ unsigned int  ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
   int frame = proc->frame_rx;
   int subframe = proc->subframe_rx;
   LTE_UL_eNB_HARQ_t *ulsch_harq;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
+
   if (ulsch->ue_type>0)     harq_pid = 0;
-  else
-#endif
-    {
-      harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
-    }
+  else {
+    harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
+  }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
-
   // x1 is set in lte_gold_generic
   x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
   ulsch_harq = ulsch->harq_processes[harq_pid];
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
index da213c39199b6e748de919d8aa4d41a605cdd3db..1b0d7feaf51cd647d6e199c08016df49c9e057b3 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
@@ -48,8 +48,7 @@
 static short jitter[8]  __attribute__ ((aligned(16))) = {1,0,0,1,0,1,1,0};
 static short jitterc[8] __attribute__ ((aligned(16))) = {0,1,1,0,1,0,0,1};
 
-void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
-{
+void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
 #if defined(__x86_64__) || defined(__i386__)
   __m128i idft_in128[3][1200],idft_out128[3][1200];
   __m128i norm128;
@@ -57,15 +56,11 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
   int16x8_t idft_in128[3][1200],idft_out128[3][1200];
   int16x8_t norm128;
 #endif
-  int16_t *idft_in0=(int16_t*)idft_in128[0],*idft_out0=(int16_t*)idft_out128[0];
-  int16_t *idft_in1=(int16_t*)idft_in128[1],*idft_out1=(int16_t*)idft_out128[1];
-  int16_t *idft_in2=(int16_t*)idft_in128[2],*idft_out2=(int16_t*)idft_out128[2];
-
+  int16_t *idft_in0=(int16_t *)idft_in128[0],*idft_out0=(int16_t *)idft_out128[0];
+  int16_t *idft_in1=(int16_t *)idft_in128[1],*idft_out1=(int16_t *)idft_out128[1];
+  int16_t *idft_in2=(int16_t *)idft_in128[2],*idft_out2=(int16_t *)idft_out128[2];
   uint32_t *z0,*z1,*z2,*z3,*z4,*z5,*z6,*z7,*z8,*z9,*z10=NULL,*z11=NULL;
   int i,ip;
-
-
-
   LOG_T(PHY,"Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
 
   if (frame_parms->Ncp == 0) { // Normal prefix
@@ -76,7 +71,6 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
     z3 = z2+(2*frame_parms->N_RB_DL*12);
     z4 = z3+(frame_parms->N_RB_DL*12);
     z5 = z4+(frame_parms->N_RB_DL*12);
-
     z6 = z5+(frame_parms->N_RB_DL*12);
     z7 = z6+(frame_parms->N_RB_DL*12);
     z8 = z7+(frame_parms->N_RB_DL*12);
@@ -92,7 +86,6 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
     z2 = z1+(2*frame_parms->N_RB_DL*12);
     z3 = z2+(frame_parms->N_RB_DL*12);
     z4 = z3+(frame_parms->N_RB_DL*12);
-
     z5 = z4+(frame_parms->N_RB_DL*12);
     z6 = z5+(frame_parms->N_RB_DL*12);
     //pilot
@@ -105,351 +98,350 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
   // conjugate input
   for (i=0; i<(Msc_PUSCH>>2); i++) {
 #if defined(__x86_64__)||defined(__i386__)
-    *&(((__m128i*)z0)[i])=_mm_sign_epi16(*&(((__m128i*)z0)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z1)[i])=_mm_sign_epi16(*&(((__m128i*)z1)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z2)[i])=_mm_sign_epi16(*&(((__m128i*)z2)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z3)[i])=_mm_sign_epi16(*&(((__m128i*)z3)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z4)[i])=_mm_sign_epi16(*&(((__m128i*)z4)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z5)[i])=_mm_sign_epi16(*&(((__m128i*)z5)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z6)[i])=_mm_sign_epi16(*&(((__m128i*)z6)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z7)[i])=_mm_sign_epi16(*&(((__m128i*)z7)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z8)[i])=_mm_sign_epi16(*&(((__m128i*)z8)[i]),*(__m128i*)&conjugate2[0]);
-    *&(((__m128i*)z9)[i])=_mm_sign_epi16(*&(((__m128i*)z9)[i]),*(__m128i*)&conjugate2[0]);
+    * &(((__m128i *)z0)[i])=_mm_sign_epi16( *&(((__m128i *)z0)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z1)[i])=_mm_sign_epi16( *&(((__m128i *)z1)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z2)[i])=_mm_sign_epi16( *&(((__m128i *)z2)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z3)[i])=_mm_sign_epi16( *&(((__m128i *)z3)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z4)[i])=_mm_sign_epi16( *&(((__m128i *)z4)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z5)[i])=_mm_sign_epi16( *&(((__m128i *)z5)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z6)[i])=_mm_sign_epi16( *&(((__m128i *)z6)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z7)[i])=_mm_sign_epi16( *&(((__m128i *)z7)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z8)[i])=_mm_sign_epi16( *&(((__m128i *)z8)[i]),*(__m128i *)&conjugate2[0]);
+    * &(((__m128i *)z9)[i])=_mm_sign_epi16( *&(((__m128i *)z9)[i]),*(__m128i *)&conjugate2[0]);
 
     if (frame_parms->Ncp==NORMAL) {
-      *&(((__m128i*)z10)[i])=_mm_sign_epi16(*&(((__m128i*)z10)[i]),*(__m128i*)&conjugate2[0]);
-      *&(((__m128i*)z11)[i])=_mm_sign_epi16(*&(((__m128i*)z11)[i]),*(__m128i*)&conjugate2[0]);
+      * &(((__m128i *)z10)[i])=_mm_sign_epi16( *&(((__m128i *)z10)[i]),*(__m128i *)&conjugate2[0]);
+      * &(((__m128i *)z11)[i])=_mm_sign_epi16( *&(((__m128i *)z11)[i]),*(__m128i *)&conjugate2[0]);
     }
-#elif defined(__arm__)
-    *&(((int16x8_t*)z0)[i])=vmulq_s16(*&(((int16x8_t*)z0)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z1)[i])=vmulq_s16(*&(((int16x8_t*)z1)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z2)[i])=vmulq_s16(*&(((int16x8_t*)z2)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z3)[i])=vmulq_s16(*&(((int16x8_t*)z3)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z4)[i])=vmulq_s16(*&(((int16x8_t*)z4)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z5)[i])=vmulq_s16(*&(((int16x8_t*)z5)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z6)[i])=vmulq_s16(*&(((int16x8_t*)z6)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z7)[i])=vmulq_s16(*&(((int16x8_t*)z7)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z8)[i])=vmulq_s16(*&(((int16x8_t*)z8)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z9)[i])=vmulq_s16(*&(((int16x8_t*)z9)[i]),*(int16x8_t*)&conjugate2[0]);
 
+#elif defined(__arm__)
+    * &(((int16x8_t *)z0)[i])=vmulq_s16( *&(((int16x8_t *)z0)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z1)[i])=vmulq_s16( *&(((int16x8_t *)z1)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z2)[i])=vmulq_s16( *&(((int16x8_t *)z2)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z3)[i])=vmulq_s16( *&(((int16x8_t *)z3)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z4)[i])=vmulq_s16( *&(((int16x8_t *)z4)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z5)[i])=vmulq_s16( *&(((int16x8_t *)z5)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z6)[i])=vmulq_s16( *&(((int16x8_t *)z6)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z7)[i])=vmulq_s16( *&(((int16x8_t *)z7)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z8)[i])=vmulq_s16( *&(((int16x8_t *)z8)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z9)[i])=vmulq_s16( *&(((int16x8_t *)z9)[i]),*(int16x8_t *)&conjugate2[0]);
 
     if (frame_parms->Ncp==NORMAL) {
-      *&(((int16x8_t*)z10)[i])=vmulq_s16(*&(((int16x8_t*)z10)[i]),*(int16x8_t*)&conjugate2[0]);
-      *&(((int16x8_t*)z11)[i])=vmulq_s16(*&(((int16x8_t*)z11)[i]),*(int16x8_t*)&conjugate2[0]);
+      * &(((int16x8_t *)z10)[i])=vmulq_s16( *&(((int16x8_t *)z10)[i]),*(int16x8_t *)&conjugate2[0]);
+      * &(((int16x8_t *)z11)[i])=vmulq_s16( *&(((int16x8_t *)z11)[i]),*(int16x8_t *)&conjugate2[0]);
     }
 
 #endif
   }
 
   for (i=0,ip=0; i<Msc_PUSCH; i++,ip+=4) {
-    ((uint32_t*)idft_in0)[ip+0] =  z0[i];
-    ((uint32_t*)idft_in0)[ip+1] =  z1[i];
-    ((uint32_t*)idft_in0)[ip+2] =  z2[i];
-    ((uint32_t*)idft_in0)[ip+3] =  z3[i];
-    ((uint32_t*)idft_in1)[ip+0] =  z4[i];
-    ((uint32_t*)idft_in1)[ip+1] =  z5[i];
-    ((uint32_t*)idft_in1)[ip+2] =  z6[i];
-    ((uint32_t*)idft_in1)[ip+3] =  z7[i];
-    ((uint32_t*)idft_in2)[ip+0] =  z8[i];
-    ((uint32_t*)idft_in2)[ip+1] =  z9[i];
+    ((uint32_t *)idft_in0)[ip+0] =  z0[i];
+    ((uint32_t *)idft_in0)[ip+1] =  z1[i];
+    ((uint32_t *)idft_in0)[ip+2] =  z2[i];
+    ((uint32_t *)idft_in0)[ip+3] =  z3[i];
+    ((uint32_t *)idft_in1)[ip+0] =  z4[i];
+    ((uint32_t *)idft_in1)[ip+1] =  z5[i];
+    ((uint32_t *)idft_in1)[ip+2] =  z6[i];
+    ((uint32_t *)idft_in1)[ip+3] =  z7[i];
+    ((uint32_t *)idft_in2)[ip+0] =  z8[i];
+    ((uint32_t *)idft_in2)[ip+1] =  z9[i];
 
     if (frame_parms->Ncp==0) {
-      ((uint32_t*)idft_in2)[ip+2] =  z10[i];
-      ((uint32_t*)idft_in2)[ip+3] =  z11[i];
+      ((uint32_t *)idft_in2)[ip+2] =  z10[i];
+      ((uint32_t *)idft_in2)[ip+3] =  z11[i];
     }
   }
 
-
   switch (Msc_PUSCH) {
-  case 12:
-    dft12((int16_t *)idft_in0,(int16_t *)idft_out0);
-    dft12((int16_t *)idft_in1,(int16_t *)idft_out1);
-    dft12((int16_t *)idft_in2,(int16_t *)idft_out2);
-
+    case 12:
+      dft12((int16_t *)idft_in0,(int16_t *)idft_out0);
+      dft12((int16_t *)idft_in1,(int16_t *)idft_out1);
+      dft12((int16_t *)idft_in2,(int16_t *)idft_out2);
 #if defined(__x86_64__)||defined(__i386__)
-    norm128 = _mm_set1_epi16(9459);
+      norm128 = _mm_set1_epi16(9459);
 #elif defined(__arm__)
-    norm128 = vdupq_n_s16(9459);
+      norm128 = vdupq_n_s16(9459);
 #endif
-    for (i=0; i<12; i++) {
+
+      for (i=0; i<12; i++) {
 #if defined(__x86_64__)||defined(__i386__)
-      ((__m128i*)idft_out0)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i*)idft_out0)[i],norm128),1);
-      ((__m128i*)idft_out1)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i*)idft_out1)[i],norm128),1);
-      ((__m128i*)idft_out2)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i*)idft_out2)[i],norm128),1);
+        ((__m128i *)idft_out0)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i *)idft_out0)[i],norm128),1);
+        ((__m128i *)idft_out1)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i *)idft_out1)[i],norm128),1);
+        ((__m128i *)idft_out2)[i] = _mm_slli_epi16(_mm_mulhi_epi16(((__m128i *)idft_out2)[i],norm128),1);
 #elif defined(__arm__)
-      ((int16x8_t*)idft_out0)[i] = vqdmulhq_s16(((int16x8_t*)idft_out0)[i],norm128);
-      ((int16x8_t*)idft_out1)[i] = vqdmulhq_s16(((int16x8_t*)idft_out1)[i],norm128);
-      ((int16x8_t*)idft_out2)[i] = vqdmulhq_s16(((int16x8_t*)idft_out2)[i],norm128);
+        ((int16x8_t *)idft_out0)[i] = vqdmulhq_s16(((int16x8_t *)idft_out0)[i],norm128);
+        ((int16x8_t *)idft_out1)[i] = vqdmulhq_s16(((int16x8_t *)idft_out1)[i],norm128);
+        ((int16x8_t *)idft_out2)[i] = vqdmulhq_s16(((int16x8_t *)idft_out2)[i],norm128);
 #endif
-    }
+      }
 
-    break;
-
-  case 24:
-    dft24(idft_in0,idft_out0,1);
-    dft24(idft_in1,idft_out1,1);
-    dft24(idft_in2,idft_out2,1);
-    break;
-
-  case 36:
-    dft36(idft_in0,idft_out0,1);
-    dft36(idft_in1,idft_out1,1);
-    dft36(idft_in2,idft_out2,1);
-    break;
-
-  case 48:
-    dft48(idft_in0,idft_out0,1);
-    dft48(idft_in1,idft_out1,1);
-    dft48(idft_in2,idft_out2,1);
-    break;
-
-  case 60:
-    dft60(idft_in0,idft_out0,1);
-    dft60(idft_in1,idft_out1,1);
-    dft60(idft_in2,idft_out2,1);
-    break;
-
-  case 72:
-    dft72(idft_in0,idft_out0,1);
-    dft72(idft_in1,idft_out1,1);
-    dft72(idft_in2,idft_out2,1);
-    break;
-
-  case 96:
-    dft96(idft_in0,idft_out0,1);
-    dft96(idft_in1,idft_out1,1);
-    dft96(idft_in2,idft_out2,1);
-    break;
-
-  case 108:
-    dft108(idft_in0,idft_out0,1);
-    dft108(idft_in1,idft_out1,1);
-    dft108(idft_in2,idft_out2,1);
-    break;
-
-  case 120:
-    dft120(idft_in0,idft_out0,1);
-    dft120(idft_in1,idft_out1,1);
-    dft120(idft_in2,idft_out2,1);
-    break;
-
-  case 144:
-    dft144(idft_in0,idft_out0,1);
-    dft144(idft_in1,idft_out1,1);
-    dft144(idft_in2,idft_out2,1);
-    break;
-
-  case 180:
-    dft180(idft_in0,idft_out0,1);
-    dft180(idft_in1,idft_out1,1);
-    dft180(idft_in2,idft_out2,1);
-    break;
-
-  case 192:
-    dft192(idft_in0,idft_out0,1);
-    dft192(idft_in1,idft_out1,1);
-    dft192(idft_in2,idft_out2,1);
-    break;
-
-  case 216:
-    dft216(idft_in0,idft_out0,1);
-    dft216(idft_in1,idft_out1,1);
-    dft216(idft_in2,idft_out2,1);
-    break;
-
-  case 240:
-    dft240(idft_in0,idft_out0,1);
-    dft240(idft_in1,idft_out1,1);
-    dft240(idft_in2,idft_out2,1);
-    break;
-
-  case 288:
-    dft288(idft_in0,idft_out0,1);
-    dft288(idft_in1,idft_out1,1);
-    dft288(idft_in2,idft_out2,1);
-    break;
-
-  case 300:
-    dft300(idft_in0,idft_out0,1);
-    dft300(idft_in1,idft_out1,1);
-    dft300(idft_in2,idft_out2,1);
-    break;
-
-  case 324:
-    dft324((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft324((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft324((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 360:
-    dft360((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft360((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft360((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 384:
-    dft384((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft384((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft384((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 432:
-    dft432((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft432((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft432((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 480:
-    dft480((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft480((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft480((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 540:
-    dft540((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft540((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft540((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 576:
-    dft576((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft576((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft576((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 600:
-    dft600((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft600((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft600((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 648:
-    dft648((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft648((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft648((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 720:
-    dft720((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft720((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft720((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 768:
-    dft768((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft768((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft768((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 864:
-    dft864((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft864((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft864((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 900:
-    dft900((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft900((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft900((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 960:
-    dft960((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft960((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft960((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 972:
-    dft972((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft972((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft972((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 1080:
-    dft1080((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft1080((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft1080((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 1152:
-    dft1152((int16_t*)idft_in0,(int16_t*)idft_out0,1);
-    dft1152((int16_t*)idft_in1,(int16_t*)idft_out1,1);
-    dft1152((int16_t*)idft_in2,(int16_t*)idft_out2,1);
-    break;
-
-  case 1200:
-    dft1200(idft_in0,idft_out0,1);
-    dft1200(idft_in1,idft_out1,1);
-    dft1200(idft_in2,idft_out2,1);
-    break;
-
-  default:
-    // should not be reached
-    LOG_E( PHY, "Unsupported Msc_PUSCH value of %"PRIu16"\n", Msc_PUSCH );
-    return;
-  }
+      break;
 
+    case 24:
+      dft24(idft_in0,idft_out0,1);
+      dft24(idft_in1,idft_out1,1);
+      dft24(idft_in2,idft_out2,1);
+      break;
+
+    case 36:
+      dft36(idft_in0,idft_out0,1);
+      dft36(idft_in1,idft_out1,1);
+      dft36(idft_in2,idft_out2,1);
+      break;
+
+    case 48:
+      dft48(idft_in0,idft_out0,1);
+      dft48(idft_in1,idft_out1,1);
+      dft48(idft_in2,idft_out2,1);
+      break;
+
+    case 60:
+      dft60(idft_in0,idft_out0,1);
+      dft60(idft_in1,idft_out1,1);
+      dft60(idft_in2,idft_out2,1);
+      break;
 
+    case 72:
+      dft72(idft_in0,idft_out0,1);
+      dft72(idft_in1,idft_out1,1);
+      dft72(idft_in2,idft_out2,1);
+      break;
+
+    case 96:
+      dft96(idft_in0,idft_out0,1);
+      dft96(idft_in1,idft_out1,1);
+      dft96(idft_in2,idft_out2,1);
+      break;
+
+    case 108:
+      dft108(idft_in0,idft_out0,1);
+      dft108(idft_in1,idft_out1,1);
+      dft108(idft_in2,idft_out2,1);
+      break;
+
+    case 120:
+      dft120(idft_in0,idft_out0,1);
+      dft120(idft_in1,idft_out1,1);
+      dft120(idft_in2,idft_out2,1);
+      break;
+
+    case 144:
+      dft144(idft_in0,idft_out0,1);
+      dft144(idft_in1,idft_out1,1);
+      dft144(idft_in2,idft_out2,1);
+      break;
+
+    case 180:
+      dft180(idft_in0,idft_out0,1);
+      dft180(idft_in1,idft_out1,1);
+      dft180(idft_in2,idft_out2,1);
+      break;
+
+    case 192:
+      dft192(idft_in0,idft_out0,1);
+      dft192(idft_in1,idft_out1,1);
+      dft192(idft_in2,idft_out2,1);
+      break;
+
+    case 216:
+      dft216(idft_in0,idft_out0,1);
+      dft216(idft_in1,idft_out1,1);
+      dft216(idft_in2,idft_out2,1);
+      break;
+
+    case 240:
+      dft240(idft_in0,idft_out0,1);
+      dft240(idft_in1,idft_out1,1);
+      dft240(idft_in2,idft_out2,1);
+      break;
+
+    case 288:
+      dft288(idft_in0,idft_out0,1);
+      dft288(idft_in1,idft_out1,1);
+      dft288(idft_in2,idft_out2,1);
+      break;
+
+    case 300:
+      dft300(idft_in0,idft_out0,1);
+      dft300(idft_in1,idft_out1,1);
+      dft300(idft_in2,idft_out2,1);
+      break;
+
+    case 324:
+      dft324((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft324((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft324((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 360:
+      dft360((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft360((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft360((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 384:
+      dft384((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft384((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft384((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 432:
+      dft432((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft432((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft432((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 480:
+      dft480((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft480((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft480((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 540:
+      dft540((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft540((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft540((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 576:
+      dft576((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft576((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft576((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 600:
+      dft600((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft600((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft600((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 648:
+      dft648((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft648((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft648((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 720:
+      dft720((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft720((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft720((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 768:
+      dft768((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft768((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft768((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 864:
+      dft864((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft864((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft864((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 900:
+      dft900((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft900((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft900((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 960:
+      dft960((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft960((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft960((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 972:
+      dft972((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft972((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft972((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 1080:
+      dft1080((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft1080((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft1080((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 1152:
+      dft1152((int16_t *)idft_in0,(int16_t *)idft_out0,1);
+      dft1152((int16_t *)idft_in1,(int16_t *)idft_out1,1);
+      dft1152((int16_t *)idft_in2,(int16_t *)idft_out2,1);
+      break;
+
+    case 1200:
+      dft1200(idft_in0,idft_out0,1);
+      dft1200(idft_in1,idft_out1,1);
+      dft1200(idft_in2,idft_out2,1);
+      break;
+
+    default:
+      // should not be reached
+      LOG_E( PHY, "Unsupported Msc_PUSCH value of %"PRIu16"\n", Msc_PUSCH );
+      return;
+  }
 
   for (i=0,ip=0; i<Msc_PUSCH; i++,ip+=4) {
-    z0[i]     = ((uint32_t*)idft_out0)[ip];
-      if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
-        LOG_I(PHY,"out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
-            ((int16_t*)&idft_out0[ip])[0],((int16_t*)&idft_out0[ip])[1],
-            ((int16_t*)&idft_out0[ip+1])[0],((int16_t*)&idft_out0[ip+1])[1],
-            ((int16_t*)&idft_out0[ip+2])[0],((int16_t*)&idft_out0[ip+2])[1],
-            ((int16_t*)&idft_out0[ip+3])[0],((int16_t*)&idft_out0[ip+3])[1]);
-      }
-    z1[i]     = ((uint32_t*)idft_out0)[ip+1];
-    z2[i]     = ((uint32_t*)idft_out0)[ip+2];
-    z3[i]     = ((uint32_t*)idft_out0)[ip+3];
-    z4[i]     = ((uint32_t*)idft_out1)[ip+0];
-    z5[i]     = ((uint32_t*)idft_out1)[ip+1];
-    z6[i]     = ((uint32_t*)idft_out1)[ip+2];
-    z7[i]     = ((uint32_t*)idft_out1)[ip+3];
-    z8[i]     = ((uint32_t*)idft_out2)[ip];
-    z9[i]     = ((uint32_t*)idft_out2)[ip+1];
+    z0[i]     = ((uint32_t *)idft_out0)[ip];
+
+    if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
+      LOG_I(PHY,"out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
+            ((int16_t *)&idft_out0[ip])[0],((int16_t *)&idft_out0[ip])[1],
+            ((int16_t *)&idft_out0[ip+1])[0],((int16_t *)&idft_out0[ip+1])[1],
+            ((int16_t *)&idft_out0[ip+2])[0],((int16_t *)&idft_out0[ip+2])[1],
+            ((int16_t *)&idft_out0[ip+3])[0],((int16_t *)&idft_out0[ip+3])[1]);
+    }
+
+    z1[i]     = ((uint32_t *)idft_out0)[ip+1];
+    z2[i]     = ((uint32_t *)idft_out0)[ip+2];
+    z3[i]     = ((uint32_t *)idft_out0)[ip+3];
+    z4[i]     = ((uint32_t *)idft_out1)[ip+0];
+    z5[i]     = ((uint32_t *)idft_out1)[ip+1];
+    z6[i]     = ((uint32_t *)idft_out1)[ip+2];
+    z7[i]     = ((uint32_t *)idft_out1)[ip+3];
+    z8[i]     = ((uint32_t *)idft_out2)[ip];
+    z9[i]     = ((uint32_t *)idft_out2)[ip+1];
 
     if (frame_parms->Ncp==0) {
-      z10[i]    = ((uint32_t*)idft_out2)[ip+2];
-      z11[i]    = ((uint32_t*)idft_out2)[ip+3];
+      z10[i]    = ((uint32_t *)idft_out2)[ip+2];
+      z11[i]    = ((uint32_t *)idft_out2)[ip+3];
     }
   }
 
   // conjugate output
   for (i=0; i<(Msc_PUSCH>>2); i++) {
 #if defined(__x86_64__) || defined(__i386__)
-    ((__m128i*)z0)[i]=_mm_sign_epi16(((__m128i*)z0)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z1)[i]=_mm_sign_epi16(((__m128i*)z1)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z2)[i]=_mm_sign_epi16(((__m128i*)z2)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z3)[i]=_mm_sign_epi16(((__m128i*)z3)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z4)[i]=_mm_sign_epi16(((__m128i*)z4)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z5)[i]=_mm_sign_epi16(((__m128i*)z5)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z6)[i]=_mm_sign_epi16(((__m128i*)z6)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z7)[i]=_mm_sign_epi16(((__m128i*)z7)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z8)[i]=_mm_sign_epi16(((__m128i*)z8)[i],*(__m128i*)&conjugate2[0]);
-    ((__m128i*)z9)[i]=_mm_sign_epi16(((__m128i*)z9)[i],*(__m128i*)&conjugate2[0]);
+    ((__m128i *)z0)[i]=_mm_sign_epi16(((__m128i *)z0)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z1)[i]=_mm_sign_epi16(((__m128i *)z1)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z2)[i]=_mm_sign_epi16(((__m128i *)z2)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z3)[i]=_mm_sign_epi16(((__m128i *)z3)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z4)[i]=_mm_sign_epi16(((__m128i *)z4)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z5)[i]=_mm_sign_epi16(((__m128i *)z5)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z6)[i]=_mm_sign_epi16(((__m128i *)z6)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z7)[i]=_mm_sign_epi16(((__m128i *)z7)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z8)[i]=_mm_sign_epi16(((__m128i *)z8)[i],*(__m128i *)&conjugate2[0]);
+    ((__m128i *)z9)[i]=_mm_sign_epi16(((__m128i *)z9)[i],*(__m128i *)&conjugate2[0]);
 
     if (frame_parms->Ncp==NORMAL) {
-      ((__m128i*)z10)[i]=_mm_sign_epi16(((__m128i*)z10)[i],*(__m128i*)&conjugate2[0]);
-      ((__m128i*)z11)[i]=_mm_sign_epi16(((__m128i*)z11)[i],*(__m128i*)&conjugate2[0]);
+      ((__m128i *)z10)[i]=_mm_sign_epi16(((__m128i *)z10)[i],*(__m128i *)&conjugate2[0]);
+      ((__m128i *)z11)[i]=_mm_sign_epi16(((__m128i *)z11)[i],*(__m128i *)&conjugate2[0]);
     }
-#elif defined(__arm__)
-    *&(((int16x8_t*)z0)[i])=vmulq_s16(*&(((int16x8_t*)z0)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z1)[i])=vmulq_s16(*&(((int16x8_t*)z1)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z2)[i])=vmulq_s16(*&(((int16x8_t*)z2)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z3)[i])=vmulq_s16(*&(((int16x8_t*)z3)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z4)[i])=vmulq_s16(*&(((int16x8_t*)z4)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z5)[i])=vmulq_s16(*&(((int16x8_t*)z5)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z6)[i])=vmulq_s16(*&(((int16x8_t*)z6)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z7)[i])=vmulq_s16(*&(((int16x8_t*)z7)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z8)[i])=vmulq_s16(*&(((int16x8_t*)z8)[i]),*(int16x8_t*)&conjugate2[0]);
-    *&(((int16x8_t*)z9)[i])=vmulq_s16(*&(((int16x8_t*)z9)[i]),*(int16x8_t*)&conjugate2[0]);
 
+#elif defined(__arm__)
+    * &(((int16x8_t *)z0)[i])=vmulq_s16( *&(((int16x8_t *)z0)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z1)[i])=vmulq_s16( *&(((int16x8_t *)z1)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z2)[i])=vmulq_s16( *&(((int16x8_t *)z2)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z3)[i])=vmulq_s16( *&(((int16x8_t *)z3)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z4)[i])=vmulq_s16( *&(((int16x8_t *)z4)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z5)[i])=vmulq_s16( *&(((int16x8_t *)z5)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z6)[i])=vmulq_s16( *&(((int16x8_t *)z6)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z7)[i])=vmulq_s16( *&(((int16x8_t *)z7)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z8)[i])=vmulq_s16( *&(((int16x8_t *)z8)[i]),*(int16x8_t *)&conjugate2[0]);
+    * &(((int16x8_t *)z9)[i])=vmulq_s16( *&(((int16x8_t *)z9)[i]),*(int16x8_t *)&conjugate2[0]);
 
     if (frame_parms->Ncp==NORMAL) {
-      *&(((int16x8_t*)z10)[i])=vmulq_s16(*&(((int16x8_t*)z10)[i]),*(int16x8_t*)&conjugate2[0]);
-      *&(((int16x8_t*)z11)[i])=vmulq_s16(*&(((int16x8_t*)z11)[i]),*(int16x8_t*)&conjugate2[0]);
+      * &(((int16x8_t *)z10)[i])=vmulq_s16( *&(((int16x8_t *)z10)[i]),*(int16x8_t *)&conjugate2[0]);
+      * &(((int16x8_t *)z11)[i])=vmulq_s16( *&(((int16x8_t *)z11)[i]),*(int16x8_t *)&conjugate2[0]);
     }
 
 #endif
@@ -459,7 +451,6 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
   _mm_empty();
   _m_empty();
 #endif
-
 }
 
 
@@ -472,16 +463,14 @@ int32_t ulsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
                        int16_t *ulsch_llr,
                        uint8_t symbol,
                        uint16_t nb_rb,
-                       int16_t **llrp)
-{
+                       int16_t **llrp) {
 #if defined(__x86_64__) || defined(__i386__)
-  __m128i *rxF=(__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  __m128i *rxF=(__m128i *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   __m128i **llrp128 = (__m128i **)llrp;
 #elif defined(__arm__)
-  int16x8_t *rxF= (int16x8_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  int16x8_t *rxF= (int16x8_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   int16x8_t **llrp128 = (int16x8_t **)llrp;
 #endif
-
   int i;
 
   for (i=0; i<(nb_rb*3); i++) {
@@ -494,9 +483,7 @@ int32_t ulsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
   _mm_empty();
   _m_empty();
 #endif
-
   return(0);
-
 }
 
 void ulsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
@@ -505,32 +492,27 @@ void ulsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
                      int32_t **ul_ch_mag,
                      uint8_t symbol,
                      uint16_t nb_rb,
-                     int16_t **llrp)
-{
-int i;
-
+                     int16_t **llrp) {
+  int i;
 #if defined(__x86_64__) || defined(__i386__)
-  __m128i *rxF=(__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  __m128i *rxF=(__m128i *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   __m128i *ch_mag;
   __m128i mmtmpU0;
   __m128i **llrp128=(__m128i **)llrp;
-  ch_mag =(__m128i*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag =(__m128i *)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
 #elif defined(__arm__)
-  int16x8_t *rxF=(int16x8_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  int16x8_t *rxF=(int16x8_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   int16x8_t *ch_mag;
   int16x8_t xmm0;
   int16_t **llrp16=llrp;
-  ch_mag =(int16x8_t*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag =(int16x8_t *)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
 #endif
 
   for (i=0; i<(nb_rb*3); i++) {
-
 #if defined(__x86_64__) || defined(__i386__)
     mmtmpU0 = _mm_abs_epi16(rxF[i]);
     //    print_shorts("tmp0",&tmp0);
-
     mmtmpU0 = _mm_subs_epi16(ch_mag[i],mmtmpU0);
-
     (*llrp128)[0] = _mm_unpacklo_epi32(rxF[i],mmtmpU0);
     (*llrp128)[1] = _mm_unpackhi_epi32(rxF[i],mmtmpU0);
     (*llrp128)+=2;
@@ -555,8 +537,6 @@ int i;
     (*llrp16)[15] = vgetq_lane_s16(xmm0,7);
     (*llrp16)+=16;
 #endif
-
-
     //    print_bytes("rxF[i]",&rxF[i]);
     //    print_bytes("rxF[i+1]",&rxF[i+1]);
   }
@@ -565,7 +545,6 @@ int i;
   _mm_empty();
   _m_empty();
 #endif
-
 }
 
 void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
@@ -575,40 +554,33 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
                      int32_t **ul_ch_magb,
                      uint8_t symbol,
                      uint16_t nb_rb,
-                     int16_t **llrp)
-{
+                     int16_t **llrp) {
   int i;
   int32_t **llrp32=(int32_t **)llrp;
-
 #if defined(__x86_64__) || defined(__i386)
-  __m128i *rxF=(__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  __m128i *rxF=(__m128i *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   __m128i *ch_mag,*ch_magb;
   __m128i mmtmpU1,mmtmpU2;
-
-  ch_mag =(__m128i*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
-  ch_magb =(__m128i*)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag =(__m128i *)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_magb =(__m128i *)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
 #elif defined(__arm__)
-  int16x8_t *rxF=(int16x8_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  int16x8_t *rxF=(int16x8_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   int16x8_t *ch_mag,*ch_magb;
   int16x8_t mmtmpU1,mmtmpU2;
-
-  ch_mag =(int16x8_t*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
-  ch_magb =(int16x8_t*)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag =(int16x8_t *)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_magb =(int16x8_t *)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
 #endif
+
   if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
-     LOG_UI(PHY,"symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
+    LOG_UI(PHY,"symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
   }
-  for (i=0; i<(nb_rb*3); i++) {
-
 
+  for (i=0; i<(nb_rb*3); i++) {
 #if defined(__x86_64__) || defined(__i386__)
     mmtmpU1 = _mm_abs_epi16(rxF[i]);
-
     mmtmpU1  = _mm_subs_epi16(ch_mag[i],mmtmpU1);
-
     mmtmpU2 = _mm_abs_epi16(mmtmpU1);
     mmtmpU2 = _mm_subs_epi16(ch_magb[i],mmtmpU2);
-
     (*llrp32)[0]  = _mm_extract_epi32(rxF[i],0);
     (*llrp32)[1]  = _mm_extract_epi32(mmtmpU1,0);
     (*llrp32)[2]  = _mm_extract_epi32(mmtmpU2,0);
@@ -623,12 +595,9 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     (*llrp32)[11] = _mm_extract_epi32(mmtmpU2,3);
 #elif defined(__arm__)
     mmtmpU1 = vabsq_s16(rxF[i]);
-
     mmtmpU1 = vqsubq_s16(ch_mag[i],mmtmpU1);
-
     mmtmpU2 = vabsq_s16(mmtmpU1);
     mmtmpU2 = vqsubq_s16(ch_magb[i],mmtmpU2);
-
     (*llrp32)[0]  = vgetq_lane_s32((int32x4_t)rxF[i],0);
     (*llrp32)[1]  = vgetq_lane_s32((int32x4_t)mmtmpU1,0);
     (*llrp32)[2]  = vgetq_lane_s32((int32x4_t)mmtmpU2,0);
@@ -641,10 +610,10 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     (*llrp32)[9]  = vgetq_lane_s32((int32x4_t)rxF[i],3);
     (*llrp32)[10] = vgetq_lane_s32((int32x4_t)mmtmpU1,3);
     (*llrp32)[11] = vgetq_lane_s32((int32x4_t)mmtmpU2,3);
-
 #endif
     (*llrp32)+=12;
   }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
@@ -656,19 +625,13 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
                          int32_t **ul_ch_mag,
                          int32_t **ul_ch_magb,
                          uint8_t symbol,
-                         uint16_t nb_rb)
-{
-
-
+                         uint16_t nb_rb) {
 #if defined(__x86_64__) || defined(__i386__)
-
   __m128i *rxdataF_comp128_0,*ul_ch_mag128_0,*ul_ch_mag128_0b;
   __m128i *rxdataF_comp128_1,*ul_ch_mag128_1,*ul_ch_mag128_1b;
 #elif defined(__arm__)
-
   int16x8_t *rxdataF_comp128_0,*ul_ch_mag128_0,*ul_ch_mag128_0b;
   int16x8_t *rxdataF_comp128_1,*ul_ch_mag128_1,*ul_ch_mag128_1b;
-
 #endif
   int32_t i;
 
@@ -686,8 +649,9 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
       rxdataF_comp128_0[i] = _mm_adds_epi16(_mm_srai_epi16(rxdataF_comp128_0[i],1),_mm_srai_epi16(rxdataF_comp128_1[i],1));
       ul_ch_mag128_0[i]    = _mm_adds_epi16(_mm_srai_epi16(ul_ch_mag128_0[i],1),_mm_srai_epi16(ul_ch_mag128_1[i],1));
       ul_ch_mag128_0b[i]   = _mm_adds_epi16(_mm_srai_epi16(ul_ch_mag128_0b[i],1),_mm_srai_epi16(ul_ch_mag128_1b[i],1));
-      rxdataF_comp128_0[i] = _mm_add_epi16(rxdataF_comp128_0[i],(*(__m128i*)&jitterc[0]));
-   }
+      rxdataF_comp128_0[i] = _mm_add_epi16(rxdataF_comp128_0[i],(*(__m128i *)&jitterc[0]));
+    }
+
 #elif defined(__arm__)
     rxdataF_comp128_0   = (int16x8_t *)&rxdataF_comp[0][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128_1   = (int16x8_t *)&rxdataF_comp[1][symbol*frame_parms->N_RB_DL*12];
@@ -701,11 +665,10 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
       rxdataF_comp128_0[i] = vhaddq_s16(rxdataF_comp128_0[i],rxdataF_comp128_1[i]);
       ul_ch_mag128_0[i]    = vhaddq_s16(ul_ch_mag128_0[i],ul_ch_mag128_1[i]);
       ul_ch_mag128_0b[i]   = vhaddq_s16(ul_ch_mag128_0b[i],ul_ch_mag128_1b[i]);
-      rxdataF_comp128_0[i] = vqaddq_s16(rxdataF_comp128_0[i],(*(int16x8_t*)&jitterc[0]));
+      rxdataF_comp128_0[i] = vqaddq_s16(rxdataF_comp128_0[i],(*(int16x8_t *)&jitterc[0]));
     }
 
 #endif
-
   }
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -720,28 +683,21 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
                               uint32_t nb_rb,
                               uint8_t l,
                               uint8_t Ns,
-                              LTE_DL_FRAME_PARMS *frame_parms)
-{
-
-
+                              LTE_DL_FRAME_PARMS *frame_parms) {
   uint16_t nb_rb1,nb_rb2;
   uint8_t aarx;
   int32_t *rxF,*rxF_ext;
-
   //uint8_t symbol = l+Ns*frame_parms->symbols_per_tti/2;
   uint8_t symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
-
   AssertFatal((frame_parms->nb_antennas_rx>0) && (frame_parms->nb_antennas_rx<5),
-	      "nb_antennas_rx not in (1-4)\n");
+              "nb_antennas_rx not in (1-4)\n");
 
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
-
     nb_rb1 = cmin(cmax((int)(frame_parms->N_RB_UL) - (int)(2*first_rb),(int)0),(int)(2*nb_rb));    // 2 times no. RBs before the DC
     nb_rb2 = 2*nb_rb - nb_rb1;                                   // 2 times no. RBs after the DC
- 
+
     if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
-       LOG_UI(PHY,"ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
+      LOG_UI(PHY,"ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
     }
 
     rxF_ext   = &rxdataF_ext[aarx][(symbol*frame_parms->N_RB_UL*12)];
@@ -762,16 +718,13 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
       rxF_ext += nb_rb2*6;
     }
   }
-
 }
 
 void ulsch_correct_ext(int32_t **rxdataF_ext,
                        int32_t **rxdataF_ext2,
                        uint16_t symbol,
                        LTE_DL_FRAME_PARMS *frame_parms,
-                       uint16_t nb_rb)
-{
-
+                       uint16_t nb_rb) {
   int32_t i,j,aarx;
   int32_t *rxF_ext2,*rxF_ext;
 
@@ -796,78 +749,52 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
                                 uint8_t symbol,
                                 uint8_t Qm,
                                 uint16_t nb_rb,
-                                uint8_t output_shift)
-{
-
+                                uint8_t output_shift) {
   uint16_t rb;
-
 #if defined(__x86_64__) || defined(__i386__)
-
   __m128i *ul_ch128,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128;
   uint8_t aarx;//,symbol_mod;
   __m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
-
 #elif defined(__arm__)
-
   int16x4_t *ul_ch128,*rxdataF128;
   int16x8_t *ul_ch_mag128,*ul_ch_mag128b,*rxdataF_comp128;
-
   uint8_t aarx;//,symbol_mod;
   int32x4_t mmtmpU0,mmtmpU1,mmtmpU0b,mmtmpU1b;
   int16_t conj[4]__attribute__((aligned(16))) = {1,-1,1,-1};
   int32x4_t output_shift128 = vmovq_n_s32(-(int32_t)output_shift);
-
-
-
 #endif
 
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
 #if defined(__x86_64__) || defined(__i386__)
-
     ul_ch128          = (__m128i *)&ul_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     ul_ch_mag128      = (__m128i *)&ul_ch_mag[aarx][symbol*frame_parms->N_RB_DL*12];
     ul_ch_mag128b     = (__m128i *)&ul_ch_magb[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF128        = (__m128i *)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128   = (__m128i *)&rxdataF_comp[aarx][symbol*frame_parms->N_RB_DL*12];
-
 #elif defined(__arm__)
-
-
     ul_ch128          = (int16x4_t *)&ul_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     ul_ch_mag128      = (int16x8_t *)&ul_ch_mag[aarx][symbol*frame_parms->N_RB_DL*12];
     ul_ch_mag128b     = (int16x8_t *)&ul_ch_magb[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF128        = (int16x4_t *)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128   = (int16x8_t *)&rxdataF_comp[aarx][symbol*frame_parms->N_RB_DL*12];
-
 #endif
+
     for (rb=0; rb<nb_rb; rb++) {
       LOG_D(PHY,"comp: symbol %d rb %d\n",symbol,rb);
-
-// just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
-
+      // just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
 #if defined(__x86_64__) || defined(__i386__)
       mmtmpU0 = _mm_madd_epi16(ul_ch128[0],ul_ch128[0]);
-
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,output_shift);
       mmtmpU1 = _mm_madd_epi16(ul_ch128[1],ul_ch128[1]);
-
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,output_shift);
-
       mmtmpU0 = _mm_packs_epi32(mmtmpU0,mmtmpU1);
-
       ul_ch_mag128[0] = _mm_unpacklo_epi16(mmtmpU0,mmtmpU0);
       ul_ch_mag128[1] = _mm_unpackhi_epi16(mmtmpU0,mmtmpU0);
-
       mmtmpU0 = _mm_madd_epi16(ul_ch128[2],ul_ch128[2]);
-
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,output_shift);
       mmtmpU1 = _mm_packs_epi32(mmtmpU0,mmtmpU0);
       ul_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpU1,mmtmpU1);
-
-      LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
-
-
+      LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t *)&ul_ch_mag128[0]),*((int16_t *)&ul_ch_mag128[1]),*((int16_t *)&ul_ch_mag128[2]),output_shift);
 #elif defined(__arm__)
       mmtmpU0 = vmull_s16(ul_ch128[0], ul_ch128[0]);
       mmtmpU0 = vqshlq_s32(vqaddq_s32(mmtmpU0,vrev64q_s32(mmtmpU0)),-output_shift128);
@@ -884,19 +811,15 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
       mmtmpU1 = vmull_s16(ul_ch128[5], ul_ch128[5]);
       mmtmpU1 = vqshlq_s32(vqaddq_s32(mmtmpU1,vrev64q_s32(mmtmpU1)),-output_shift128);
       ul_ch_mag128[2] = vcombine_s16(vmovn_s32(mmtmpU0),vmovn_s32(mmtmpU1));
-      
 #endif
-
 #if defined(__x86_64__) || defined(__i386__)
       // multiply by conjugated channel
       mmtmpU0 = _mm_madd_epi16(ul_ch128[0],rxdataF128[0]);
       //        print_ints("re",&mmtmpU0);
-      
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ch128[0],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)&conjugate[0]);
-
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)&conjugate[0]);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[0]);
       //      print_ints("im",&mmtmpU1);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
@@ -919,14 +842,13 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ch128[1],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[1]);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,output_shift);
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,output_shift);
       mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
       mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-
       rxdataF_comp128[1] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
       //        print_shorts("rx:",rxdataF128[1]);
       //        print_shorts("ch:",ul_ch128[1]);
@@ -936,24 +858,21 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
       // mmtmpU0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpU1 = _mm_shufflelo_epi16(ul_ch128[2],_MM_SHUFFLE(2,3,0,1));
       mmtmpU1 = _mm_shufflehi_epi16(mmtmpU1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i*)conjugate);
+      mmtmpU1 = _mm_sign_epi16(mmtmpU1,*(__m128i *)conjugate);
       mmtmpU1 = _mm_madd_epi16(mmtmpU1,rxdataF128[2]);
       // mmtmpU1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpU0 = _mm_srai_epi32(mmtmpU0,output_shift);
       mmtmpU1 = _mm_srai_epi32(mmtmpU1,output_shift);
       mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1);
       mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1);
-
       rxdataF_comp128[2] = _mm_packs_epi32(mmtmpU2,mmtmpU3);
       //        print_shorts("rx:",rxdataF128[2]);
       //        print_shorts("ch:",ul_ch128[2]);
       //        print_shorts("pack:",rxdataF_comp128[2]);
-
       // Add a jitter to compensate for the saturation in "packs" resulting in a bias on the DC after IDFT
-      rxdataF_comp128[0] = _mm_add_epi16(rxdataF_comp128[0],(*(__m128i*)&jitter[0]));
-      rxdataF_comp128[1] = _mm_add_epi16(rxdataF_comp128[1],(*(__m128i*)&jitter[0]));
-      rxdataF_comp128[2] = _mm_add_epi16(rxdataF_comp128[2],(*(__m128i*)&jitter[0]));
-
+      rxdataF_comp128[0] = _mm_add_epi16(rxdataF_comp128[0],(*(__m128i *)&jitter[0]));
+      rxdataF_comp128[1] = _mm_add_epi16(rxdataF_comp128[1],(*(__m128i *)&jitter[0]));
+      rxdataF_comp128[2] = _mm_add_epi16(rxdataF_comp128[2],(*(__m128i *)&jitter[0]));
       ul_ch128+=3;
       ul_ch_mag128+=3;
       ul_ch_mag128b+=3;
@@ -961,64 +880,54 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
       rxdataF_comp128+=3;
 #elif defined(__arm__)
       mmtmpU0 = vmull_s16(ul_ch128[0], rxdataF128[0]);
-      //mmtmpU0 = [Re(ch[0])Re(rx[0]) Im(ch[0])Im(ch[0]) Re(ch[1])Re(rx[1]) Im(ch[1])Im(ch[1])] 
+      //mmtmpU0 = [Re(ch[0])Re(rx[0]) Im(ch[0])Im(ch[0]) Re(ch[1])Re(rx[1]) Im(ch[1])Im(ch[1])]
       mmtmpU1 = vmull_s16(ul_ch128[1], rxdataF128[1]);
-      //mmtmpU1 = [Re(ch[2])Re(rx[2]) Im(ch[2])Im(ch[2]) Re(ch[3])Re(rx[3]) Im(ch[3])Im(ch[3])] 
+      //mmtmpU1 = [Re(ch[2])Re(rx[2]) Im(ch[2])Im(ch[2]) Re(ch[3])Re(rx[3]) Im(ch[3])Im(ch[3])]
       mmtmpU0 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0),vget_high_s32(mmtmpU0)),
-			     vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
-      //mmtmpU0 = [Re(ch[0])Re(rx[0])+Im(ch[0])Im(ch[0]) Re(ch[1])Re(rx[1])+Im(ch[1])Im(ch[1]) Re(ch[2])Re(rx[2])+Im(ch[2])Im(ch[2]) Re(ch[3])Re(rx[3])+Im(ch[3])Im(ch[3])] 
-      
-      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[0],*(int16x4_t*)conj)), rxdataF128[0]);
+                             vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
+      //mmtmpU0 = [Re(ch[0])Re(rx[0])+Im(ch[0])Im(ch[0]) Re(ch[1])Re(rx[1])+Im(ch[1])Im(ch[1]) Re(ch[2])Re(rx[2])+Im(ch[2])Im(ch[2]) Re(ch[3])Re(rx[3])+Im(ch[3])Im(ch[3])]
+      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[0],*(int16x4_t *)conj)), rxdataF128[0]);
       //mmtmpU0 = [-Im(ch[0])Re(rx[0]) Re(ch[0])Im(rx[0]) -Im(ch[1])Re(rx[1]) Re(ch[1])Im(rx[1])]
-      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[1],*(int16x4_t*)conj)), rxdataF128[1]);
+      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[1],*(int16x4_t *)conj)), rxdataF128[1]);
       //mmtmpU0 = [-Im(ch[2])Re(rx[2]) Re(ch[2])Im(rx[2]) -Im(ch[3])Re(rx[3]) Re(ch[3])Im(rx[3])]
       mmtmpU1 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0b),vget_high_s32(mmtmpU0b)),
-			     vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
+                             vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
       //mmtmpU1 = [-Im(ch[0])Re(rx[0])+Re(ch[0])Im(rx[0]) -Im(ch[1])Re(rx[1])+Re(ch[1])Im(rx[1]) -Im(ch[2])Re(rx[2])+Re(ch[2])Im(rx[2]) -Im(ch[3])Re(rx[3])+Re(ch[3])Im(rx[3])]
-      
       mmtmpU0 = vqshlq_s32(mmtmpU0,-output_shift128);
       mmtmpU1 = vqshlq_s32(mmtmpU1,-output_shift128);
       rxdataF_comp128[0] = vcombine_s16(vmovn_s32(mmtmpU0),vmovn_s32(mmtmpU1));
       mmtmpU0 = vmull_s16(ul_ch128[2], rxdataF128[2]);
       mmtmpU1 = vmull_s16(ul_ch128[3], rxdataF128[3]);
       mmtmpU0 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0),vget_high_s32(mmtmpU0)),
-			     vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
-      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[2],*(int16x4_t*)conj)), rxdataF128[2]);
-      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[3],*(int16x4_t*)conj)), rxdataF128[3]);
+                             vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
+      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[2],*(int16x4_t *)conj)), rxdataF128[2]);
+      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[3],*(int16x4_t *)conj)), rxdataF128[3]);
       mmtmpU1 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0b),vget_high_s32(mmtmpU0b)),
-			     vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
+                             vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
       mmtmpU0 = vqshlq_s32(mmtmpU0,-output_shift128);
       mmtmpU1 = vqshlq_s32(mmtmpU1,-output_shift128);
       rxdataF_comp128[1] = vcombine_s16(vmovn_s32(mmtmpU0),vmovn_s32(mmtmpU1));
-      
       mmtmpU0 = vmull_s16(ul_ch128[4], rxdataF128[4]);
       mmtmpU1 = vmull_s16(ul_ch128[5], rxdataF128[5]);
       mmtmpU0 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0),vget_high_s32(mmtmpU0)),
-			     vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
-      
-      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[4],*(int16x4_t*)conj)), rxdataF128[4]);
-      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[5],*(int16x4_t*)conj)), rxdataF128[5]);
+                             vpadd_s32(vget_low_s32(mmtmpU1),vget_high_s32(mmtmpU1)));
+      mmtmpU0b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[4],*(int16x4_t *)conj)), rxdataF128[4]);
+      mmtmpU1b = vmull_s16(vrev32_s16(vmul_s16(ul_ch128[5],*(int16x4_t *)conj)), rxdataF128[5]);
       mmtmpU1 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpU0b),vget_high_s32(mmtmpU0b)),
-			     vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
-      
-      
+                             vpadd_s32(vget_low_s32(mmtmpU1b),vget_high_s32(mmtmpU1b)));
       mmtmpU0 = vqshlq_s32(mmtmpU0,-output_shift128);
       mmtmpU1 = vqshlq_s32(mmtmpU1,-output_shift128);
       rxdataF_comp128[2] = vcombine_s16(vmovn_s32(mmtmpU0),vmovn_s32(mmtmpU1));
-      
       // Add a jitter to compensate for the saturation in "packs" resulting in a bias on the DC after IDFT
-      rxdataF_comp128[0] = vqaddq_s16(rxdataF_comp128[0],(*(int16x8_t*)&jitter[0]));
-      rxdataF_comp128[1] = vqaddq_s16(rxdataF_comp128[1],(*(int16x8_t*)&jitter[0]));
-      rxdataF_comp128[2] = vqaddq_s16(rxdataF_comp128[2],(*(int16x8_t*)&jitter[0]));
-      
-      
+      rxdataF_comp128[0] = vqaddq_s16(rxdataF_comp128[0],(*(int16x8_t *)&jitter[0]));
+      rxdataF_comp128[1] = vqaddq_s16(rxdataF_comp128[1],(*(int16x8_t *)&jitter[0]));
+      rxdataF_comp128[2] = vqaddq_s16(rxdataF_comp128[2],(*(int16x8_t *)&jitter[0]));
       ul_ch128+=6;
       ul_ch_mag128+=3;
       ul_ch_mag128b+=3;
       rxdataF128+=6;
       rxdataF_comp128+=3;
 #endif
-      
     }
   }
 
@@ -1031,9 +940,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
 void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
                          LTE_DL_FRAME_PARMS *frame_parms,
                          int32_t *avg,
-                         uint16_t nb_rb)
-{
-
+                         uint16_t nb_rb) {
   int16_t rb;
   uint8_t aarx;
 #if defined(__x86_64__) || defined(__i386__)
@@ -1043,6 +950,7 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
   int32x4_t avg128U;
   int16x4_t *ul_ch128;
 #endif
+
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
     //clear average level
 #if defined(__x86_64__) || defined(__i386__)
@@ -1050,14 +958,10 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
     ul_ch128=(__m128i *)drs_ch_estimates_ext[aarx];
 
     for (rb=0; rb<nb_rb; rb++) {
-
       avg128U = _mm_add_ps(avg128U,_mm_cvtepi32_ps(_mm_madd_epi16(ul_ch128[0],ul_ch128[0])));
       avg128U = _mm_add_ps(avg128U,_mm_cvtepi32_ps(_mm_madd_epi16(ul_ch128[1],ul_ch128[1])));
       avg128U = _mm_add_ps(avg128U,_mm_cvtepi32_ps(_mm_madd_epi16(ul_ch128[2],ul_ch128[2])));
-
       ul_ch128+=3;
-
-
     }
 
 #elif defined(__arm__)
@@ -1065,26 +969,21 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
     ul_ch128=(int16x4_t *)drs_ch_estimates_ext[aarx];
 
     for (rb=0; rb<nb_rb; rb++) {
-
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[0],ul_ch128[0]));
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[1],ul_ch128[1]));
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[2],ul_ch128[2]));
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[3],ul_ch128[3]));
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[4],ul_ch128[4]));
-       avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[5],ul_ch128[5]));
-       ul_ch128+=6;
-
-
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[0],ul_ch128[0]));
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[1],ul_ch128[1]));
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[2],ul_ch128[2]));
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[3],ul_ch128[3]));
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[4],ul_ch128[4]));
+      avg128U = vqaddq_s32(avg128U,vmull_s16(ul_ch128[5],ul_ch128[5]));
+      ul_ch128+=6;
     }
 
 #endif
-
     DevAssert( nb_rb );
-    avg[aarx] = (int)((((float*)&avg128U)[0] +
-                       ((float*)&avg128U)[1] +
-                       ((float*)&avg128U)[2] +
-                       ((float*)&avg128U)[3])/(float)(nb_rb*12));
-
+    avg[aarx] = (int)((((float *)&avg128U)[0] +
+                       ((float *)&avg128U)[1] +
+                       ((float *)&avg128U)[2] +
+                       ((float *)&avg128U)[3])/(float)(nb_rb*12));
   }
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -1096,60 +995,51 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
 int ulsch_power_LUT[750];
 
 void init_ulsch_power_LUT(void) {
-  
   int i;
 
-  for (i=0;i<750;i++) ulsch_power_LUT[i] = (int)ceil((pow(2.0,(double)i/100) - 1.0));
-
+  for (i=0; i<750; i++) ulsch_power_LUT[i] = (int)ceil((pow(2.0,(double)i/100) - 1.0));
 }
 
 void rx_ulsch(PHY_VARS_eNB *eNB,
-	      L1_rxtx_proc_t *proc,
+              L1_rxtx_proc_t *proc,
               uint8_t UE_id) {
-
-
   LTE_eNB_ULSCH_t **ulsch = eNB->ulsch;
-
   // flagMag = 0;
   LTE_eNB_COMMON *common_vars = &eNB->common_vars;
   LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id];
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
-
   uint32_t l,i;
   int32_t avgs;
   uint8_t log2_maxh=0,aarx;
   int32_t avgU[eNB->frame_parms.nb_antennas_rx];
-
-
   //  uint8_t harq_pid = ( ulsch->RRCConnRequest_flag== 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0;
   uint8_t harq_pid;
   uint8_t Qm;
   int16_t *llrp;
   int subframe = proc->subframe_rx;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (ulsch[UE_id]->ue_type > 0) harq_pid =0;
-  else
-#endif
-    {
-      harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
-    }
+  else {
+    harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
+  }
+
   Qm = ulsch[UE_id]->harq_processes[harq_pid]->Qm;
+
   if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
-     LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
+    LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
   }
 
   AssertFatal(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb > 0,
-	      "PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
-  for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
+              "PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
 
-  if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
-    LOG_I(PHY,"rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
-        ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
-        ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
-        common_vars->rxdataF,
-        pusch_vars->rxdataF_ext);
-  }
+  for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
+    if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
+      LOG_I(PHY,"rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
+            ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
+            ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+            common_vars->rxdataF,
+            pusch_vars->rxdataF_ext);
+    }
 
     ulsch_extract_rbs_single(common_vars->rxdataF,
                              pusch_vars->rxdataF_ext,
@@ -1158,7 +1048,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
                              l%(frame_parms->symbols_per_tti/2),
                              l/(frame_parms->symbols_per_tti/2),
                              frame_parms);
-    
     lte_ul_channel_estimation(eNB,proc,
                               UE_id,
                               l%(frame_parms->symbols_per_tti/2),
@@ -1166,96 +1055,82 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
   }
 
   int correction_factor = 1;
-  int deltaMCS=1; 
+  int deltaMCS=1;
   int MPR_times_100Ks;
 
   if (deltaMCS==1) {
     // Note we're using TBS instead of sumKr, since didn't run segmentation yet!
-
     MPR_times_100Ks = 500*ulsch[UE_id]->harq_processes[harq_pid]->TBS/(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
-
     AssertFatal(MPR_times_100Ks < 750 && MPR_times_100Ks >= 0,"Impossible value for MPR_times_100Ks %d (TBS %d,Nre %d)\n",
-		MPR_times_100Ks,ulsch[UE_id]->harq_processes[harq_pid]->TBS,
-		(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch));
+                MPR_times_100Ks,ulsch[UE_id]->harq_processes[harq_pid]->TBS,
+                (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch));
 
     if (MPR_times_100Ks > 0) correction_factor = ulsch_power_LUT[MPR_times_100Ks];
-			       
   }
+
   for (i=0; i<frame_parms->nb_antennas_rx; i++) {
-    
     pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i],
-						    ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor;
-    LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d)  power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i])); 
-     
+                                 ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor;
+    LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d)  power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid,
+          ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
   }
 
   ulsch_channel_level(pusch_vars->drs_ch_estimates,
-		      frame_parms,
-		      avgU,
-		      ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
-  
+                      frame_parms,
+                      avgU,
+                      ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
   LOG_D(PHY,"[ULSCH] avg[0] %d\n",avgU[0]);
-  
-  
   avgs = 0;
-  
+
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
     avgs = cmax(avgs,avgU[aarx]);
-  
+
   //      log2_maxh = 4+(log2_approx(avgs)/2);
-  
   log2_maxh = (log2_approx(avgs)/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+4;
-  
-
   LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
 
-
-
   for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
-
     if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))||   // skip pilots
         ((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
       l++;
     }
 
     ulsch_channel_compensation(
-			       pusch_vars->rxdataF_ext,
-			       pusch_vars->drs_ch_estimates,
-			       pusch_vars->ul_ch_mag,
-			       pusch_vars->ul_ch_magb,
-			       pusch_vars->rxdataF_comp,
-			       frame_parms,
-			       l,
-			       Qm,
-			       ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
-			       log2_maxh); // log2_maxh+I0_shift
+      pusch_vars->rxdataF_ext,
+      pusch_vars->drs_ch_estimates,
+      pusch_vars->ul_ch_mag,
+      pusch_vars->ul_ch_magb,
+      pusch_vars->rxdataF_comp,
+      frame_parms,
+      l,
+      Qm,
+      ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+      log2_maxh); // log2_maxh+I0_shift
 
     if (frame_parms->nb_antennas_rx > 1)
       ulsch_detection_mrc(frame_parms,
-			  pusch_vars->rxdataF_comp,
-			  pusch_vars->ul_ch_mag,
-			  pusch_vars->ul_ch_magb,
-			  l,
-			  ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
-    
-    //    if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0]) 
+                          pusch_vars->rxdataF_comp,
+                          pusch_vars->ul_ch_mag,
+                          pusch_vars->ul_ch_magb,
+                          l,
+                          ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
+
+    //    if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0])
     if (23<pusch_vars->ulsch_power[0]) {
       freq_equalization(frame_parms,
-			pusch_vars->rxdataF_comp,
-			pusch_vars->ul_ch_mag,
-			pusch_vars->ul_ch_magb,
-			l,
-			ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12,
-			Qm);
+                        pusch_vars->rxdataF_comp,
+                        pusch_vars->ul_ch_mag,
+                        pusch_vars->ul_ch_magb,
+                        l,
+                        ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12,
+                        Qm);
     }
   }
 
   lte_idft(frame_parms,
-           (uint32_t*)pusch_vars->rxdataF_comp[0],
+           (uint32_t *)pusch_vars->rxdataF_comp[0],
            ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
-
-  llrp = (int16_t*)&pusch_vars->llr[0];
-
+  llrp = (int16_t *)&pusch_vars->llr[0];
   T(T_ENB_PHY_PUSCH_IQ, T_INT(0), T_INT(ulsch[UE_id]->rnti), T_INT(proc->frame_rx),
     T_INT(subframe), T_INT(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb),
     T_INT(frame_parms->N_RB_UL), T_INT(frame_parms->symbols_per_tti),
@@ -1263,93 +1138,86 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
              2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2));
 
   for (l=0; l<frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active; l++) {
-
     if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))||   // skip pilots
         ((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
       l++;
     }
 
     switch (Qm) {
-    case 2 :
-      ulsch_qpsk_llr(frame_parms,
-                     pusch_vars->rxdataF_comp,
-                     pusch_vars->llr,
-                     l,
-                     ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
-                     &llrp);
-      break;
-
-    case 4 :
-      ulsch_16qam_llr(frame_parms,
-                      pusch_vars->rxdataF_comp,
-                      pusch_vars->llr,
-                      pusch_vars->ul_ch_mag,
-                      l,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
-                      &llrp);
-      break;
-
-    case 6 :
-      ulsch_64qam_llr(frame_parms,
-                      pusch_vars->rxdataF_comp,
-                      pusch_vars->llr,
-                      pusch_vars->ul_ch_mag,
-                      pusch_vars->ul_ch_magb,
-                      l,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
-                      &llrp);
-      break;
-
-    default:
-      LOG_E(PHY,"ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
-
-      break;
+      case 2 :
+        ulsch_qpsk_llr(frame_parms,
+                       pusch_vars->rxdataF_comp,
+                       pusch_vars->llr,
+                       l,
+                       ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+                       &llrp);
+        break;
+
+      case 4 :
+        ulsch_16qam_llr(frame_parms,
+                        pusch_vars->rxdataF_comp,
+                        pusch_vars->llr,
+                        pusch_vars->ul_ch_mag,
+                        l,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+                        &llrp);
+        break;
+
+      case 6 :
+        ulsch_64qam_llr(frame_parms,
+                        pusch_vars->rxdataF_comp,
+                        pusch_vars->llr,
+                        pusch_vars->ul_ch_mag,
+                        pusch_vars->ul_ch_magb,
+                        l,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+                        &llrp);
+        break;
+
+      default:
+        LOG_E(PHY,"ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
+        break;
     }
   }
-
 }
 
 void rx_ulsch_emul(PHY_VARS_eNB *eNB,
-		   L1_rxtx_proc_t *proc,
-                   uint8_t UE_index)
-{
+                   L1_rxtx_proc_t *proc,
+                   uint8_t UE_index) {
   LOG_I(PHY,"[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index);
   eNB->pusch_vars[UE_index]->ulsch_power[0] = 31622; //=45dB;
   eNB->pusch_vars[UE_index]->ulsch_power[1] = 31622; //=45dB;
-
 }
 
 
- void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round) {
-  
+void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round) {
   uint32_t nsymb = (eNB->frame_parms.Ncp == 0) ? 14 : 12;
   uint8_t harq_pid;
   char fname[100],vname[100];
-
   harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe);
-
-  LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n", 
-	 subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+  LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
+         subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
          eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm,
          eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
   sprintf(fname,"/tmp/ulsch_r%d_d",round);
   sprintf(vname,"/tmp/ulsch_r%d_dseq",round);
   LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96],
-               eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0);
+         eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0);
+
   if (eNB->common_vars.rxdata) {
     sprintf(fname,"/tmp/rxsig0_r%d.m",round);
     sprintf(vname,"rxs0_r%d",round);
     LOG_UM(fname,vname, &eNB->common_vars.rxdata[0][0],eNB->frame_parms.samples_per_tti*10,1,1);
-  
+
     if (eNB->frame_parms.nb_antennas_rx>1)
       if (eNB->common_vars.rxdata) {
-	sprintf(fname,"/tmp/rxsig1_r%d.m",round);
-	sprintf(vname,"rxs1_r%d",round);
-	LOG_UM(fname,vname, &eNB->common_vars.rxdata[1][0],eNB->frame_parms.samples_per_tti*10,1,1);
+        sprintf(fname,"/tmp/rxsig1_r%d.m",round);
+        sprintf(vname,"rxs1_r%d",round);
+        LOG_UM(fname,vname, &eNB->common_vars.rxdata[1][0],eNB->frame_parms.samples_per_tti*10,1,1);
       }
   }
 
   sprintf(fname,"/tmp/rxsigF0_r%d.m",round);
   sprintf(vname,"rxsF0_r%d",round);
-  LOG_UM(fname,vname, (void*)&eNB->common_vars.rxdataF[0][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
+  LOG_UM(fname,vname, (void *)&eNB->common_vars.rxdataF[0][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
 
   if (eNB->frame_parms.nb_antennas_rx>1) {
     sprintf(fname,"/tmp/rxsigF1_r%d.m",round);
@@ -1366,13 +1234,13 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
     sprintf(vname,"rxsF1_ext_r%d",round);
     LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
   }
+
   /*
   if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est0.m","srsest0",eNB->srs_vars[UE_id].srs_ch_estimates[0],eNB->frame_parms.ofdm_symbol_size,1,1);
 
   if (eNB->frame_parms.nb_antennas_rx>1)
     if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est1.m","srsest1",eNB->srs_vars[UE_id].srs_ch_estimates[1],eNB->frame_parms.ofdm_symbol_size,1,1);
   */
-
   sprintf(fname,"/tmp/drs_est0_r%d.m",round);
   sprintf(vname,"drsest0_r%d",round);
   LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
@@ -1390,8 +1258,8 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
   sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round);
   sprintf(vname,"ulsch_llr_r%d",round);
   LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->llr,
-               eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm
-               *eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch,1,0);
+         eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm
+         *eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch,1,0);
   sprintf(fname,"/tmp/ulsch_ch_mag_r%d.m",round);
   sprintf(vname,"ulsch_ch_mag_r%d",round);
   LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->ul_ch_mag[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
index 0073dd6d7c5f6b510cba8e8da6822da82f1c27fb..7404d2f6b89af8548ec7419bcaf92775e7080269 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
@@ -50,7 +50,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
   uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy;
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
   char phich_resource[6];
-
   LOG_D(PHY,"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)\n",ue->Mod_id,
         ue->rx_offset);
 
@@ -95,7 +94,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
                         0);
   }
 
-
   LOG_D(PHY,"[UE %d] RX RSSI %d dBm, digital (%d, %d) dB, linear (%d, %d), avg rx power %d dB (%d lin), RX gain %d dB\n",
         ue->Mod_id,
         ue->measurements.rx_rssi_dBm[0] - ((ue->frame_parms.nb_antennas_rx==2) ? 3 : 0),
@@ -106,7 +104,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
         ue->measurements.rx_power_avg_dB[0],
         ue->measurements.rx_power_avg[0],
         ue->rx_total_gain_dB);
-
   LOG_D(PHY,"[UE %d] N0 %d dBm digital (%d, %d) dB, linear (%d, %d), avg noise power %d dB (%d lin)\n",
         ue->Mod_id,
         ue->measurements.n0_power_tot_dBm,
@@ -116,58 +113,49 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
         ue->measurements.n0_power[1],
         ue->measurements.n0_power_avg_dB,
         ue->measurements.n0_power_avg);
-
   pbch_decoded = 0;
 
   for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    if (ue->FeMBMS_active != 2){	
-#endif
-    	pbch_tx_ant = rx_pbch(&ue->common_vars,
-                          ue->pbch_vars[0],
-                          frame_parms,
-                          0,
-                          SISO,
-                          ue->high_speed_flag,
-                          frame_mod4);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	}else{
-    	pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
-                          ue->pbch_vars[0],
-                          frame_parms,
-                          0,
-                          SISO,
-                          ue->high_speed_flag,
-                          frame_mod4);
-	}
-#endif
+    if (ue->FeMBMS_active != 2) {
+      pbch_tx_ant = rx_pbch(&ue->common_vars,
+                            ue->pbch_vars[0],
+                            frame_parms,
+                            0,
+                            SISO,
+                            ue->high_speed_flag,
+                            frame_mod4);
+    } else {
+      pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
+                                   ue->pbch_vars[0],
+                                   frame_parms,
+                                   0,
+                                   SISO,
+                                   ue->high_speed_flag,
+                                   frame_mod4);
+    }
 
-    	if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
-      		pbch_decoded = 1;
-      	break;
+    if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
+      pbch_decoded = 1;
+      break;
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    if (ue->FeMBMS_active != 2){
-#endif
-    	pbch_tx_ant = rx_pbch(&ue->common_vars,
-                          ue->pbch_vars[0],
-                          frame_parms,
-                          0,
-                          ALAMOUTI,
-                          ue->high_speed_flag,
-                          frame_mod4);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    }else{
-	    pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
-                          ue->pbch_vars[0],
-                          frame_parms,
-                          0,
-                          ALAMOUTI,
-                          ue->high_speed_flag,
-                          frame_mod4);
+    if (ue->FeMBMS_active != 2) {
+      pbch_tx_ant = rx_pbch(&ue->common_vars,
+                            ue->pbch_vars[0],
+                            frame_parms,
+                            0,
+                            ALAMOUTI,
+                            ue->high_speed_flag,
+                            frame_mod4);
+    } else {
+      pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
+                                   ue->pbch_vars[0],
+                                   frame_parms,
+                                   0,
+                                   ALAMOUTI,
+                                   ue->high_speed_flag,
+                                   frame_mod4);
     }
-#endif
 
     if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
       pbch_decoded = 1;
@@ -217,75 +205,69 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
         break;
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  if(ue->FeMBMS_active != 2) {
-#endif
-    // now check for PHICH parameters
-    frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1);
-    dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3;
-
-    switch (dummy) {
-      case 0:
-        frame_parms->phich_config_common.phich_resource = oneSixth;
-        sprintf(phich_resource,"1/6");
-        break;
-
-      case 1:
-        frame_parms->phich_config_common.phich_resource = half;
-        sprintf(phich_resource,"1/2");
-        break;
-
-      case 2:
-        frame_parms->phich_config_common.phich_resource = one;
-        sprintf(phich_resource,"1");
-        break;
-
-      case 3:
-        frame_parms->phich_config_common.phich_resource = two;
-        sprintf(phich_resource,"2");
-        break;
-
-      default:
-        LOG_E(PHY,"[UE%d] Initial sync: Unknown PHICH_DURATION\n",ue->Mod_id);
-        return -1;
-        break;
-    }
+    if(ue->FeMBMS_active != 2) {
+      // now check for PHICH parameters
+      frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1);
+      dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3;
+
+      switch (dummy) {
+        case 0:
+          frame_parms->phich_config_common.phich_resource = oneSixth;
+          sprintf(phich_resource,"1/6");
+          break;
+
+        case 1:
+          frame_parms->phich_config_common.phich_resource = half;
+          sprintf(phich_resource,"1/2");
+          break;
+
+        case 2:
+          frame_parms->phich_config_common.phich_resource = one;
+          sprintf(phich_resource,"1");
+          break;
+
+        case 3:
+          frame_parms->phich_config_common.phich_resource = two;
+          sprintf(phich_resource,"2");
+          break;
+
+        default:
+          LOG_E(PHY,"[UE%d] Initial sync: Unknown PHICH_DURATION\n",ue->Mod_id);
+          return -1;
+          break;
+      }
 
-    for(int i=0; i<RX_NB_TH; i++) {
-      ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
-      ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
-      ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
-    }
+      for(int i=0; i<RX_NB_TH; i++) {
+        ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
+        ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
+        ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
+      }
 
+      LOG_D(PHY,"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!\n",
+            ue->Mod_id,
+            frame_parms->nb_antenna_ports_eNB,
+            pbch_tx_ant,
+            ue->proc.proc_rxtx[0].frame_rx,
+            frame_parms->N_RB_DL,
+            frame_parms->phich_config_common.phich_duration,
+            phich_resource);  //frame_parms->phich_config_common.phich_resource);
+    } else {
+      for(int i=0; i<RX_NB_TH; i++) {
+        ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&31)<<1) + (ue->pbch_vars[0]->decoded_output[1]>>7))<<4;
+        ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
+      }
 
-    LOG_D(PHY,"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!\n",
-          ue->Mod_id,
-          frame_parms->nb_antenna_ports_eNB,
-          pbch_tx_ant,
-          ue->proc.proc_rxtx[0].frame_rx,
-          frame_parms->N_RB_DL,
-          frame_parms->phich_config_common.phich_duration,
-          phich_resource);  //frame_parms->phich_config_common.phich_resource);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
- }else{
-	for(int i=0; i<RX_NB_TH;i++)
-        { 
-          ue->proc.proc_rxtx[i].frame_rx =   (((ue->pbch_vars[0]->decoded_output[2]&31)<<1) + (ue->pbch_vars[0]->decoded_output[1]>>7))<<4;
-          ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
-	}
-	LOG_D(PHY,"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d\n",
+      LOG_D(PHY,"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d\n",
             ue->Mod_id,
             frame_parms->nb_antenna_ports_eNB,
             pbch_tx_ant,
             ue->proc.proc_rxtx[0].frame_rx,
             frame_parms->N_RB_DL,
-                0,
-                frame_mod4
-        );
-	
- }
-#endif
+            0,
+            frame_mod4
+           );
+    }
+
     return(0);
   } else {
     return(-1);
@@ -310,7 +292,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
   frame_parms->frame_type=FDD;
   frame_parms->nb_antenna_ports_eNB = 2;
   init_frame_parms(frame_parms,1);
-
   /*
   LOG_M("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
 
@@ -326,9 +307,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
   else
     sync_pos2 = sync_pos + FRAME_LENGTH_COMPLEX_SAMPLES - frame_parms->nb_prefix_samples;
 
-
   LOG_D(PHY,"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d\n",ue->Mod_id,sync_pos,ue->common_vars.eNb_id);
-
   // SSS detection
   // PSS is hypothesized in last symbol of first slot in Frame
   sync_pos_slot = (frame_parms->samples_per_tti>>1) - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples;
@@ -351,23 +330,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
     lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
     ret = pbch_detection(ue,mode);
     //   LOG_M("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
-
     LOG_D(PHY,"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
           frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      if (ret==-1){
-	 ue->FeMBMS_active = 2;
-	 ret = pbch_detection(ue,mode);
-	 if (ret==-1){
-		ue->FeMBMS_active = 0;
-		frame_parms->FeMBMS_active = 0;
-	 }
-	 else frame_parms->FeMBMS_active = 1;
+    if (ret==-1) {
+      ue->FeMBMS_active = 2;
+      ret = pbch_detection(ue,mode);
+
+      if (ret==-1) {
+        ue->FeMBMS_active = 0;
+        frame_parms->FeMBMS_active = 0;
+      } else frame_parms->FeMBMS_active = 1;
+
       LOG_D(PHY,"FeMBMS Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
-          frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
-      }
-#endif
+            frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
+    }
   } else {
     LOG_D(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
   }
@@ -407,23 +384,19 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
       //     LOG_M("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
       LOG_D(PHY,"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
             frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
-	
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      if (ret==-1){
-	 ue->FeMBMS_active = 2;
-	 ret = pbch_detection(ue,mode);
-	 if (ret==-1){
-		ue->FeMBMS_active = 0;
-		frame_parms->FeMBMS_active = 0;
-	 }
-	 else frame_parms->FeMBMS_active = 1;
-      LOG_I(PHY,"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
-            frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
 
-      }
-#endif
+      if (ret==-1) {
+        ue->FeMBMS_active = 2;
+        ret = pbch_detection(ue,mode);
 
+        if (ret==-1) {
+          ue->FeMBMS_active = 0;
+          frame_parms->FeMBMS_active = 0;
+        } else frame_parms->FeMBMS_active = 1;
 
+        LOG_I(PHY,"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
+              frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
+      }
     } else {
       LOG_D(PHY,"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
     }
@@ -461,9 +434,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
       lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
       ret = pbch_detection(ue,mode);
       //      LOG_M("rxdata4.m","rxd4",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
-
       LOG_D(PHY,"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
-
             frame_parms->Nid_cell,metric_tdd_ncp,phase_tdd_ncp,flip_tdd_ncp,ret);
 
       if (ret==-1) {
@@ -497,9 +468,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
         lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
         ret = pbch_detection(ue,mode);
         //  LOG_M("rxdata5.m","rxd5",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
-
         LOG_D(PHY,"TDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
-
               frame_parms->Nid_cell,metric_tdd_ecp,phase_tdd_ecp,flip_tdd_ecp,ret);
       }
     }
@@ -526,7 +495,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
       generate_pcfich_reg_mapping(frame_parms);
       generate_phich_reg_mapping(frame_parms);
       ue->pbch_vars[0]->pdu_errors_conseq=0;
-
     }
 
     LOG_I(PHY, "[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm,  rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id,
@@ -563,7 +531,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
           metric_tdd_ecp,Nid_cell_tdd_ecp);*/
     LOG_D(PHY,"[UE%d] Initial sync : Estimated Nid_cell %d, Frame_type %d\n",ue->Mod_id,
           frame_parms->Nid_cell,frame_parms->frame_type);
-
     ue->UE_mode[0] = NOT_SYNCHED;
     ue->pbch_vars[0]->pdu_errors_last=ue->pbch_vars[0]->pdu_errors;
     ue->pbch_vars[0]->pdu_errors++;
@@ -588,7 +555,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
     // we might add a low-pass filter here later
     ue->measurements.rx_power_avg[0] = rx_power/frame_parms->nb_antennas_rx;
     ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]);
-
     LOG_I(PHY,"[UE%d] Initial sync : Estimated power: %d dB\n",ue->Mod_id,ue->measurements.rx_power_avg_dB[0] );
 
     if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
index 5884a159ac54e40399f1edd74d2037b72e3cb6bd..ab65bede5eac22909080bc04905265999e29b395 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
@@ -53,17 +53,12 @@ uint16_t pbch_extract(int **rxdataF,
                       int **dl_ch_estimates_ext,
                       uint32_t symbol,
                       uint32_t high_speed_flag,
-                      LTE_DL_FRAME_PARMS *frame_parms)
-{
-
-
+                      LTE_DL_FRAME_PARMS *frame_parms) {
   uint16_t rb,nb_rb=6;
   uint8_t i,j,aarx,aatx;
   int *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
-
   uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6;
   uint32_t symbol_mod = symbol % nsymb;
-
   int rx_offset = frame_parms->ofdm_symbol_size-3*12;
   int ch_offset = frame_parms->N_RB_DL*6-3*12;
   int nushiftmod3 = frame_parms->nushift%3;
@@ -74,7 +69,6 @@ uint16_t pbch_extract(int **rxdataF,
      (rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2,
      LTE_CE_OFFSET+ch_offset+(symbol_mod*(frame_parms->ofdm_symbol_size)));
     */
-
     rxF        = &rxdataF[aarx][(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))];
     rxF_ext    = &rxdataF_ext[aarx][symbol_mod*(6*12)];
 
@@ -141,7 +135,6 @@ uint16_t pbch_extract(int **rxdataF,
         }
       }
     }  //tx antenna loop
-
   }
 
   return(0);
@@ -152,12 +145,9 @@ uint16_t pbch_extract(int **rxdataF,
 //compute average channel_level on each (TX,RX) antenna pair
 int pbch_channel_level(int **dl_ch_estimates_ext,
                        LTE_DL_FRAME_PARMS *frame_parms,
-                       uint32_t symbol)
-{
-
+                       uint32_t symbol) {
   int16_t rb, nb_rb=6;
   uint8_t aatx,aarx;
-
 #if defined(__x86_64__) || defined(__i386__)
   __m128i avg128;
   __m128i *dl_ch128;
@@ -166,29 +156,27 @@ int pbch_channel_level(int **dl_ch_estimates_ext,
   int16x8_t *dl_ch128;
 #endif
   int avg1=0,avg2=0;
-
   uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6;
   uint32_t symbol_mod = symbol % nsymb;
 
   for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antenna_ports_eNB;aatx++)
     for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
       //clear average level
-
 #if defined(__x86_64__) || defined(__i386__)
       avg128 = _mm_setzero_si128();
       dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
 #elif defined(__arm__)
       avg128 = vdupq_n_s32(0);
       dl_ch128=(int16x8_t *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
-
 #endif
+
       for (rb=0; rb<nb_rb; rb++) {
 #if defined(__x86_64__) || defined(__i386__)
         avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
         avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[1],dl_ch128[1]));
         avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[2],dl_ch128[2]));
 #elif defined(__arm__)
-// to be filled in
+        // to be filled in
 #endif
         dl_ch128+=3;
         /*
@@ -200,56 +188,51 @@ int pbch_channel_level(int **dl_ch_estimates_ext,
         */
       }
 
-      avg1 = (((int*)&avg128)[0] +
-              ((int*)&avg128)[1] +
-              ((int*)&avg128)[2] +
-              ((int*)&avg128)[3])/(nb_rb*12);
+      avg1 = (((int *)&avg128)[0] +
+              ((int *)&avg128)[1] +
+              ((int *)&avg128)[2] +
+              ((int *)&avg128)[3])/(nb_rb*12);
 
       if (avg1>avg2)
         avg2 = avg1;
 
       //msg("Channel level : %d, %d\n",avg1, avg2);
     }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
 #endif
   return(avg2);
-
 }
 
 #if defined(__x86_64__) || defined(__i386__)
-__m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
+  __m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
 #elif defined(__arm__)
-int16x8_t mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
+  int16x8_t mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
 #endif
 void pbch_channel_compensation(int **rxdataF_ext,
                                int **dl_ch_estimates_ext,
                                int **rxdataF_comp,
                                LTE_DL_FRAME_PARMS *frame_parms,
                                uint8_t symbol,
-                               uint8_t output_shift)
-{
-
+                               uint8_t output_shift) {
   uint16_t rb,nb_rb=6;
   uint8_t aatx,aarx,symbol_mod;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *dl_ch128,*rxdataF128,*rxdataF_comp128;
 #elif defined(__arm__)
-
 #endif
   symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
 
   for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antenna_ports_eNB;aatx++)
     for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
 #if defined(__x86_64__) || defined(__i386__)
       dl_ch128          = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
       rxdataF128        = (__m128i *)&rxdataF_ext[aarx][symbol_mod*6*12];
       rxdataF_comp128   = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol_mod*6*12];
-
 #elif defined(__arm__)
-// to be filled in
+      // to be filled in
 #endif
 
       for (rb=0; rb<nb_rb; rb++) {
@@ -261,7 +244,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
         // mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
         mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1));
         mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
-        mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
+        mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
         //  print_ints("im",&mmtmpP1);
         mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[0]);
         // mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
@@ -277,13 +260,12 @@ void pbch_channel_compensation(int **rxdataF_ext,
         //  print_shorts("rx:",rxdataF128);
         //  print_shorts("ch:",dl_ch128);
         //  print_shorts("pack:",rxdataF_comp128);
-
         // multiply by conjugated channel
         mmtmpP0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]);
         // mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
         mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1));
         mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
-        mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
+        mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
         mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[1]);
         // mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
         mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift);
@@ -301,7 +283,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
           // mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
           mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1));
           mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
-          mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
+          mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
           mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[2]);
           // mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
           mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift);
@@ -312,7 +294,6 @@ void pbch_channel_compensation(int **rxdataF_ext,
           //  print_shorts("rx:",rxdataF128+2);
           //  print_shorts("ch:",dl_ch128+2);
           //      print_shorts("pack:",rxdataF_comp128+2);
-
           dl_ch128+=3;
           rxdataF128+=3;
           rxdataF_comp128+=3;
@@ -321,11 +302,13 @@ void pbch_channel_compensation(int **rxdataF_ext,
           rxdataF128+=2;
           rxdataF_comp128+=2;
         }
+
 #elif defined(__arm__)
-// to be filled in
+        // to be filled in
 #endif
       }
     }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
@@ -334,9 +317,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
 
 void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
                         int **rxdataF_comp,
-                        uint8_t symbol)
-{
-
+                        uint8_t symbol) {
   uint8_t aatx, symbol_mod;
   int i, nb_rb=6;
 #if defined(__x86_64__) || defined(__i386__)
@@ -354,19 +335,19 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
 #elif defined(__arm__)
       rxdataF_comp128_0   = (int16x8_t *)&rxdataF_comp[(aatx<<1)][symbol_mod*6*12];
       rxdataF_comp128_1   = (int16x8_t *)&rxdataF_comp[(aatx<<1)+1][symbol_mod*6*12];
-
 #endif
+
       // MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
       for (i=0; i<nb_rb*3; i++) {
 #if defined(__x86_64__) || defined(__i386__)
         rxdataF_comp128_0[i] = _mm_adds_epi16(_mm_srai_epi16(rxdataF_comp128_0[i],1),_mm_srai_epi16(rxdataF_comp128_1[i],1));
 #elif defined(__arm__)
         rxdataF_comp128_0[i] = vhaddq_s16(rxdataF_comp128_0[i],rxdataF_comp128_1[i]);
-
 #endif
       }
     }
   }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
@@ -374,14 +355,12 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
 }
 
 void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
-                       int8_t* llr,
+                       int8_t *llr,
                        uint32_t length,
-                       uint8_t frame_mod4)
-{
+                       uint8_t frame_mod4) {
   int i;
   uint8_t reset;
   uint32_t x1, x2, s=0;
-
   reset = 1;
   // x1 is set in first call to lte_gold_generic
   x2 = frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.6.1
@@ -396,7 +375,6 @@ void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
 
     // take the quarter of the PBCH that corresponds to this frame
     if ((i>=(frame_mod4*(length>>2))) && (i<((1+frame_mod4)*(length>>2)))) {
-
       if (((s>>(i%32))&1)==0)
         llr[i] = -llr[i];
     }
@@ -405,47 +383,33 @@ void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
 
 void pbch_alamouti(LTE_DL_FRAME_PARMS *frame_parms,
                    int **rxdataF_comp,
-                   uint8_t symbol)
-{
-
-
+                   uint8_t symbol) {
   int16_t *rxF0,*rxF1;
   //  __m128i *ch_mag0,*ch_mag1,*ch_mag0b,*ch_mag1b;
   uint8_t rb,re,symbol_mod;
   int jj;
-
   //  printf("Doing alamouti\n");
   symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
   jj         = (symbol_mod*6*12);
-
-  rxF0     = (int16_t*)&rxdataF_comp[0][jj];  //tx antenna 0  h0*y
-  rxF1     = (int16_t*)&rxdataF_comp[2][jj];  //tx antenna 1  h1*y
+  rxF0     = (int16_t *)&rxdataF_comp[0][jj]; //tx antenna 0  h0*y
+  rxF1     = (int16_t *)&rxdataF_comp[2][jj]; //tx antenna 1  h1*y
 
   for (rb=0; rb<6; rb++) {
-
     for (re=0; re<12; re+=2) {
-
       // Alamouti RX combining
-
       rxF0[0] = rxF0[0] + rxF1[2];
       rxF0[1] = rxF0[1] - rxF1[3];
-
       rxF0[2] = rxF0[2] - rxF1[0];
       rxF0[3] = rxF0[3] + rxF1[1];
-
       rxF0+=4;
       rxF1+=4;
     }
-
   }
-
 }
 
 void pbch_quantize(int8_t *pbch_llr8,
                    int16_t *pbch_llr,
-                   uint16_t len)
-{
-
+                   uint16_t len) {
   uint16_t i;
 
   for (i=0; i<len; i++) {
@@ -455,7 +419,6 @@ void pbch_quantize(int8_t *pbch_llr8,
       pbch_llr8[i]=-8;
     else
       pbch_llr8[i] = (char)(pbch_llr[i]);
-
   }
 }
 
@@ -469,36 +432,27 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
                  uint8_t eNB_id,
                  MIMO_mode_t mimo_mode,
                  uint32_t high_speed_flag,
-                 uint8_t frame_mod4)
-{
-
+                 uint8_t frame_mod4) {
   uint8_t log2_maxh;//,aatx,aarx;
   int max_h=0;
-
   int symbol,i;
   uint32_t nsymb = (frame_parms->Ncp==0) ? 14:12;
   uint16_t  pbch_E;
   uint8_t pbch_a[8];
   uint8_t RCC;
-
   int8_t *pbch_e_rx;
   uint8_t *decoded_output = lte_ue_pbch_vars->decoded_output;
   uint16_t crc;
-
-
   //  pbch_D    = 16+PBCH_A;
-
   pbch_E  = (frame_parms->Ncp==0) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
   pbch_e_rx = &lte_ue_pbch_vars->llr[frame_mod4*(pbch_E>>2)];
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] starting symbol loop (Ncp %d, frame_mod4 %d,mimo_mode %d\n",frame_parms->Ncp,frame_mod4,mimo_mode);
 #endif
-
   // clear LLR buffer
   memset(lte_ue_pbch_vars->llr,0,pbch_E);
 
   for (symbol=(nsymb>>1); symbol<(nsymb>>1)+4; symbol++) {
-
 #ifdef DEBUG_PBCH
     LOG_D(PHY,"[PBCH] starting extract\n");
 #endif
@@ -513,16 +467,13 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
     LOG_D(PHY,"[PHY] PBCH Symbol %d\n",symbol);
     LOG_D(PHY,"[PHY] PBCH starting channel_level\n");
 #endif
-
     max_h = pbch_channel_level(lte_ue_pbch_vars->dl_ch_estimates_ext,
                                frame_parms,
                                symbol);
     log2_maxh = 3+(log2_approx(max_h)/2);
-
 #ifdef DEBUG_PBCH
     LOG_D(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n",log2_maxh,max_h);
 #endif
-
     pbch_channel_compensation(lte_ue_pbch_vars->rxdataF_ext,
                               lte_ue_pbch_vars->dl_ch_estimates_ext,
                               lte_ue_pbch_vars->rxdataF_comp,
@@ -535,7 +486,6 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
                          lte_ue_pbch_vars->rxdataF_comp,
                          symbol);
 
-
     if (mimo_mode == ALAMOUTI) {
       pbch_alamouti(frame_parms,lte_ue_pbch_vars->rxdataF_comp,symbol);
     } else if (mimo_mode != SISO) {
@@ -545,60 +495,38 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
 
     if (symbol>(nsymb>>1)+1) {
       pbch_quantize(pbch_e_rx,
-                    (short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
+                    (short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
                     144);
-
       pbch_e_rx+=144;
     } else {
       pbch_quantize(pbch_e_rx,
-                    (short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
+                    (short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
                     96);
-
       pbch_e_rx+=96;
     }
-
-
   }
 
   pbch_e_rx = lte_ue_pbch_vars->llr;
-
-
-
   //un-scrambling
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] doing unscrambling\n");
 #endif
-
-
   pbch_unscrambling(frame_parms,
                     pbch_e_rx,
                     pbch_E,
                     frame_mod4);
-
-
-
   //un-rate matching
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] doing un-rate-matching\n");
 #endif
-
-
   memset(dummy_w_rx,0,3*3*(16+PBCH_A));
   RCC = generate_dummy_w_cc(16+PBCH_A,
                             dummy_w_rx);
-
-
   lte_rate_matching_cc_rx(RCC,pbch_E,pbch_w_rx,dummy_w_rx,pbch_e_rx);
-
   sub_block_deinterleaving_cc((unsigned int)(PBCH_A+16),
                               &pbch_d_rx[96],
                               &pbch_w_rx[0]);
-
   memset(pbch_a,0,((16+PBCH_A)>>3));
-
-
-
-
   phy_viterbi_lte_sse2(pbch_d_rx+96,pbch_a,16+PBCH_A);
 
   // Fix byte endian of PBCH (bit 23 goes in first)
@@ -611,13 +539,11 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
     LOG_I(PHY,"[PBCH] pbch_a[%d] = %x\n",i,decoded_output[i]);
 
 #endif //DEBUG_PBCH
-
 #ifdef DEBUG_PBCH
   LOG_I(PHY,"PBCH CRC %x : %x\n",
-      crc16(pbch_a,PBCH_A),
-      ((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
+        crc16(pbch_a,PBCH_A),
+        ((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
 #endif
-
   crc = (crc16(pbch_a,PBCH_A)>>16) ^
         (((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
 
@@ -629,20 +555,16 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
     return(4);
   else
     return(-1);
-
-
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
-                       int8_t* llr,
-                       uint32_t length,
-                       uint8_t frame_mod4)
-{
+                              int8_t *llr,
+                              uint32_t length,
+                              uint8_t frame_mod4) {
   int i;
   uint8_t reset;
   uint32_t x1, x2, s=0;
-
   reset = 1;
   // x1 is set in first call to lte_gold_generic
   x2 = frame_parms->Nid_cell+(1<<9); //this is c_init for FeMBMS in 36.211 Sec 6.6.1
@@ -654,9 +576,9 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
       //      printf("lte_gold[%d]=%x\n",i,s);
       reset = 0;
     }
+
     // take the quarter of the PBCH that corresponds to this frame
     if ((i>=(frame_mod4*(length>>2))) && (i<((1+frame_mod4)*(length>>2)))) {
-
       if (((s>>(i%32))&1)==0)
         llr[i] = -llr[i];
     }
@@ -664,41 +586,32 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
 }
 
 uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
-                 LTE_UE_PBCH *lte_ue_pbch_vars,
-                 LTE_DL_FRAME_PARMS *frame_parms,
-                 uint8_t eNB_id,
-                 MIMO_mode_t mimo_mode,
-                 uint32_t high_speed_flag,
-                 uint8_t frame_mod4)
-{
-
+                        LTE_UE_PBCH *lte_ue_pbch_vars,
+                        LTE_DL_FRAME_PARMS *frame_parms,
+                        uint8_t eNB_id,
+                        MIMO_mode_t mimo_mode,
+                        uint32_t high_speed_flag,
+                        uint8_t frame_mod4) {
   uint8_t log2_maxh;//,aatx,aarx;
   int max_h=0;
-
   int symbol,i;
   uint32_t nsymb = (frame_parms->Ncp==0) ? 14:12;
   uint16_t  pbch_E;
   uint8_t pbch_a[8];
   uint8_t RCC;
-
   int8_t *pbch_e_rx;
   uint8_t *decoded_output = lte_ue_pbch_vars->decoded_output;
   uint16_t crc;
-
-
   //  pbch_D    = 16+PBCH_A;
-
   pbch_E  = (frame_parms->Ncp==0) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
   pbch_e_rx = &lte_ue_pbch_vars->llr[frame_mod4*(pbch_E>>2)];
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] starting symbol loop (Ncp %d, frame_mod4 %d,mimo_mode %d\n",frame_parms->Ncp,frame_mod4,mimo_mode);
 #endif
-
   // clear LLR buffer
   memset(lte_ue_pbch_vars->llr,0,pbch_E);
 
   for (symbol=(nsymb>>1); symbol<(nsymb>>1)+4; symbol++) {
-
 #ifdef DEBUG_PBCH
     LOG_D(PHY,"[PBCH] starting extract\n");
 #endif
@@ -713,17 +626,13 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
     LOG_D(PHY,"[PHY] PBCH Symbol %d\n",symbol);
     LOG_D(PHY,"[PHY] PBCH starting channel_level\n");
 #endif
-
     max_h = pbch_channel_level(lte_ue_pbch_vars->dl_ch_estimates_ext,
                                frame_parms,
                                symbol);
     log2_maxh = 3+(log2_approx(max_h)/2);
-
 #ifdef DEBUG_PBCH
-
     LOG_D(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n",log2_maxh,max_h);
 #endif
-
     pbch_channel_compensation(lte_ue_pbch_vars->rxdataF_ext,
                               lte_ue_pbch_vars->dl_ch_estimates_ext,
                               lte_ue_pbch_vars->rxdataF_comp,
@@ -736,7 +645,6 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
                          lte_ue_pbch_vars->rxdataF_comp,
                          symbol);
 
-
     if (mimo_mode == ALAMOUTI) {
       pbch_alamouti(frame_parms,lte_ue_pbch_vars->rxdataF_comp,symbol);
     } else if (mimo_mode != SISO) {
@@ -746,58 +654,38 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
 
     if (symbol>(nsymb>>1)+1) {
       pbch_quantize(pbch_e_rx,
-                    (short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
+                    (short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
                     144);
-
       pbch_e_rx+=144;
     } else {
       pbch_quantize(pbch_e_rx,
-                    (short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
+                    (short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
                     96);
-
       pbch_e_rx+=96;
     }
-
-
   }
 
   pbch_e_rx = lte_ue_pbch_vars->llr;
-
-
-
   //un-scrambling
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] doing unscrambling\n");
 #endif
-
-pbch_unscrambling_fembms(frame_parms,
-                    pbch_e_rx,
-                    pbch_E,
-                    frame_mod4);
-
-
+  pbch_unscrambling_fembms(frame_parms,
+                           pbch_e_rx,
+                           pbch_E,
+                           frame_mod4);
   //un-rate matching
 #ifdef DEBUG_PBCH
   LOG_D(PHY,"[PBCH] doing un-rate-matching\n");
 #endif
-
-
   memset(dummy_w_rx,0,3*3*(16+PBCH_A));
   RCC = generate_dummy_w_cc(16+PBCH_A,
                             dummy_w_rx);
-
-
   lte_rate_matching_cc_rx(RCC,pbch_E,pbch_w_rx,dummy_w_rx,pbch_e_rx);
-
   sub_block_deinterleaving_cc((unsigned int)(PBCH_A+16),
                               &pbch_d_rx[96],
                               &pbch_w_rx[0]);
-
   memset(pbch_a,0,((16+PBCH_A)>>3));
-
-
-
-
   phy_viterbi_lte_sse2(pbch_d_rx+96,pbch_a,16+PBCH_A);
 
   // Fix byte endian of PBCH (bit 23 goes in first)
@@ -810,17 +698,15 @@ pbch_unscrambling_fembms(frame_parms,
     LOG_I(PHY,"[PBCH] pbch_a[%d] = %x\n",i,decoded_output[i]);
 
 #endif //DEBUG_PBCH
-
 #ifdef DEBUG_PBCH
   LOG_I(PHY,"PBCH CRC %x : %x\n",
-      crc16(pbch_a,PBCH_A),
-      ((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
+        crc16(pbch_a,PBCH_A),
+        ((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
 #endif
-
   crc = (crc16(pbch_a,PBCH_A)>>16) ^
         (((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
 
-   if (crc == 0x0000)
+  if (crc == 0x0000)
     return(1);
   else if (crc == 0xffff)
     return(2);
@@ -829,4 +715,4 @@ pbch_unscrambling_fembms(frame_parms,
   else
     return(-1);
 }
-#endif
+
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c
index 362c1bf77342952ab9b5ca40bcf5af4404e3ded8..287f76ac9132603d843b351083656408869168f1 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c
@@ -52,9 +52,7 @@
 
 
 
-void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,int subframe)
-{
-
+void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,int subframe) {
   char fname[32],vname[32];
 #define NSYMB_PMCH 12
   sprintf(fname,"mch_rxF_ext0.m");
@@ -81,15 +79,12 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
   sprintf(fname,"mch_mag2.m");
   sprintf(vname,"pmch_mag2");
   LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
-
   LOG_M("mch00_ch0.m","pmch00_ch0",
-               &(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
-               ue->frame_parms.ofdm_symbol_size*12,1,1);
-
+        &(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
+        ue->frame_parms.ofdm_symbol_size*12,1,1);
   LOG_M("rxsig_mch.m","rxs_mch",
-               &ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],
-               ue->frame_parms.samples_per_tti,1,1);
-
+        &ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],
+        ue->frame_parms.samples_per_tti,1,1);
   /*
   if (PHY_vars_eNB_g)
     LOG_M("txsig_mch.m","txs_mch",
@@ -98,12 +93,9 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
 }
 
 
-void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id)
-{
-
+void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id) {
   LTE_UE_DLSCH_t *dlsch = ue->dlsch_MCH[eNB_id];
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
-
   //  dlsch->rnti   = M_RNTI;
   dlsch->harq_processes[0]->mcs   = mcs;
   dlsch->harq_processes[0]->rvidx = rvidx;
@@ -114,69 +106,68 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id)
   dlsch->harq_processes[0]->nb_rb = frame_parms->N_RB_DL;
 
   switch(frame_parms->N_RB_DL) {
-  case 6:
-    dlsch->harq_processes[0]->rb_alloc_even[0] = 0x3f;
-    dlsch->harq_processes[0]->rb_alloc_odd[0] = 0x3f;
-    break;
-
-  case 25:
-    dlsch->harq_processes[0]->rb_alloc_even[0] = 0x1ffffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[0] = 0x1ffffff;
-    break;
-
-  case 50:
-    dlsch->harq_processes[0]->rb_alloc_even[0] = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[0]  = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_even[1] = 0x3ffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[1]  = 0x3ffff;
-    break;
-
-  case 100:
-    dlsch->harq_processes[0]->rb_alloc_even[0] = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[0]  = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_even[1] = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[1]  = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_even[2] = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_odd[2]  = 0xffffffff;
-    dlsch->harq_processes[0]->rb_alloc_even[3] = 0xf;
-    dlsch->harq_processes[0]->rb_alloc_odd[3]  = 0xf;
-    break;
+    case 6:
+      dlsch->harq_processes[0]->rb_alloc_even[0] = 0x3f;
+      dlsch->harq_processes[0]->rb_alloc_odd[0] = 0x3f;
+      break;
+
+    case 25:
+      dlsch->harq_processes[0]->rb_alloc_even[0] = 0x1ffffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[0] = 0x1ffffff;
+      break;
+
+    case 50:
+      dlsch->harq_processes[0]->rb_alloc_even[0] = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[0]  = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_even[1] = 0x3ffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[1]  = 0x3ffff;
+      break;
+
+    case 100:
+      dlsch->harq_processes[0]->rb_alloc_even[0] = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[0]  = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_even[1] = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[1]  = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_even[2] = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_odd[2]  = 0xffffffff;
+      dlsch->harq_processes[0]->rb_alloc_even[3] = 0xf;
+      dlsch->harq_processes[0]->rb_alloc_odd[3]  = 0xf;
+      break;
   }
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void mch_extract_rbs_khz_1dot25(int **rxdataF,
-                     int **dl_ch_estimates,
-                     int **rxdataF_ext,
-                     int **dl_ch_estimates_ext,
-                     /*unsigned char symbol,*/
-                     unsigned char subframe,
-                     LTE_DL_FRAME_PARMS *frame_parms)
-{
 
+void mch_extract_rbs_khz_1dot25(int **rxdataF,
+                                int **dl_ch_estimates,
+                                int **rxdataF_ext,
+                                int **dl_ch_estimates_ext,
+                                /*unsigned char symbol,*/
+                                unsigned char subframe,
+                                LTE_DL_FRAME_PARMS *frame_parms) {
   int i,j,offset,aarx,numext;
 
-  if( (subframe&0x1) == 0){
-        offset=0;
-  }else{
-        offset=3;
+  if( (subframe&0x1) == 0) {
+    offset=0;
+  } else {
+    offset=3;
   }
+
   numext=0;
+
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-      for (i=0,j=0; i<frame_parms->N_RB_DL*72; i++) {
-                if( ((i-offset)%6) != 0 ){
-                        //rxdataF_ext[aarx][j+0] = rxdataF[aarx][i+4344 +0];
-                        rxdataF_ext[aarx][j+0] = rxdataF[aarx][i+frame_parms->first_carrier_offset_khz_1dot25 +0];
-                        rxdataF_ext[aarx][(frame_parms->N_RB_DL*60)+j+0] = rxdataF[aarx][i+1+0]; //DC
-                        dl_ch_estimates_ext[aarx][j+0] = dl_ch_estimates[aarx][i+0];
-                        dl_ch_estimates_ext[aarx][(frame_parms->N_RB_DL*60)+j+0] = dl_ch_estimates[aarx][i+(frame_parms->N_RB_DL*72)+0];
-                        numext+=2;
-                        j++;
-                }
+    for (i=0,j=0; i<frame_parms->N_RB_DL*72; i++) {
+      if( ((i-offset)%6) != 0 ) {
+        //rxdataF_ext[aarx][j+0] = rxdataF[aarx][i+4344 +0];
+        rxdataF_ext[aarx][j+0] = rxdataF[aarx][i+frame_parms->first_carrier_offset_khz_1dot25 +0];
+        rxdataF_ext[aarx][(frame_parms->N_RB_DL*60)+j+0] = rxdataF[aarx][i+1+0]; //DC
+        dl_ch_estimates_ext[aarx][j+0] = dl_ch_estimates[aarx][i+0];
+        dl_ch_estimates_ext[aarx][(frame_parms->N_RB_DL*60)+j+0] = dl_ch_estimates[aarx][i+(frame_parms->N_RB_DL*72)+0];
+        numext+=2;
+        j++;
       }
+    }
   }
 }
-#endif
 
 
 void mch_extract_rbs(int **rxdataF,
@@ -185,9 +176,7 @@ void mch_extract_rbs(int **rxdataF,
                      int **dl_ch_estimates_ext,
                      unsigned char symbol,
                      unsigned char subframe,
-                     LTE_DL_FRAME_PARMS *frame_parms)
-{
-
+                     LTE_DL_FRAME_PARMS *frame_parms) {
   int pilots=0,i,j,offset,aarx;
 
   if ((symbol==2)||
@@ -199,9 +188,7 @@ void mch_extract_rbs(int **rxdataF,
     offset = 0;
   }
 
-
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
     if (pilots==1) {
       for (i=offset,j=0; i<frame_parms->N_RB_DL*6; i+=2,j++) {
         /*  printf("MCH with pilots: i %d, j %d => %d,%d\n",i,j,
@@ -214,49 +201,40 @@ void mch_extract_rbs(int **rxdataF,
         dl_ch_estimates_ext[aarx][(frame_parms->N_RB_DL*3)+j+symbol*(frame_parms->N_RB_DL*12)] = dl_ch_estimates[aarx][i+(frame_parms->N_RB_DL*6)+(symbol*frame_parms->ofdm_symbol_size)];
       }
     } else {
-
-      memcpy((void*)&rxdataF_ext[aarx][symbol*(frame_parms->N_RB_DL*12)],
-             (void*)&rxdataF[aarx][frame_parms->first_carrier_offset + (symbol*frame_parms->ofdm_symbol_size)],
+      memcpy((void *)&rxdataF_ext[aarx][symbol*(frame_parms->N_RB_DL*12)],
+             (void *)&rxdataF[aarx][frame_parms->first_carrier_offset + (symbol*frame_parms->ofdm_symbol_size)],
              frame_parms->N_RB_DL*24);
-      memcpy((void*)&rxdataF_ext[aarx][(frame_parms->N_RB_DL*6) + symbol*(frame_parms->N_RB_DL*12)],
-             (void*)&rxdataF[aarx][1 + (symbol*frame_parms->ofdm_symbol_size)],
+      memcpy((void *)&rxdataF_ext[aarx][(frame_parms->N_RB_DL*6) + symbol*(frame_parms->N_RB_DL*12)],
+             (void *)&rxdataF[aarx][1 + (symbol*frame_parms->ofdm_symbol_size)],
              frame_parms->N_RB_DL*24);
-      memcpy((void*)&dl_ch_estimates_ext[aarx][symbol*(frame_parms->N_RB_DL*12)],
-             (void*)&dl_ch_estimates[aarx][(symbol*frame_parms->ofdm_symbol_size)],
+      memcpy((void *)&dl_ch_estimates_ext[aarx][symbol*(frame_parms->N_RB_DL*12)],
+             (void *)&dl_ch_estimates[aarx][(symbol*frame_parms->ofdm_symbol_size)],
              frame_parms->N_RB_DL*48);
-
     }
-
   }
-
-
-
 }
 
 void mch_channel_level(int **dl_ch_estimates_ext,
                        LTE_DL_FRAME_PARMS *frame_parms,
                        int *avg,
                        uint8_t symbol,
-                       unsigned short nb_rb)
-{
-
+                       unsigned short nb_rb) {
   int i,aarx,nre;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *dl_ch128,avg128;
 #elif defined(__arm__)
-  int32x4_t avg128; 
+  int32x4_t avg128;
 #endif
+
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
 #if defined(__x86_64__) || defined(__i386__)
-   //clear average level
+    //clear average level
     avg128 = _mm_setzero_si128();
     // 5 is always a symbol with no pilots for both normal and extended prefix
-
     dl_ch128=(__m128i *)&dl_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12];
 #elif defined(__arm__)
-
-
 #endif
+
     if ((symbol == 2) || (symbol == 6) || (symbol == 10))
       nre = (frame_parms->N_RB_DL*6);
     else
@@ -266,15 +244,13 @@ void mch_channel_level(int **dl_ch_estimates_ext,
 #if defined(__x86_64__) || defined(__i386__)
       avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
 #elif defined(__arm__)
-
 #endif
     }
 
-    avg[aarx] = (((int*)&avg128)[0] +
-                 ((int*)&avg128)[1] +
-                 ((int*)&avg128)[2] +
-                 ((int*)&avg128)[3])/nre;
-
+    avg[aarx] = (((int *)&avg128)[0] +
+                 ((int *)&avg128)[1] +
+                 ((int *)&avg128)[2] +
+                 ((int *)&avg128)[3])/nre;
     //            printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
   }
 
@@ -284,30 +260,25 @@ void mch_channel_level(int **dl_ch_estimates_ext,
 #endif
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext,
-                       LTE_DL_FRAME_PARMS *frame_parms,
-                       int *avg,
-                       /*uint8_t symbol,*/
-                       unsigned short nb_rb)
-{
-
+                                  LTE_DL_FRAME_PARMS *frame_parms,
+                                  int *avg,
+                                  /*uint8_t symbol,*/
+                                  unsigned short nb_rb) {
   int i,aarx,nre;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *dl_ch128,avg128;
 #elif defined(__arm__)
   int32x4_t avg128;
 #endif
+
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
 #if defined(__x86_64__) || defined(__i386__)
-   //clear average level
+    //clear average level
     avg128 = _mm_setzero_si128();
     // 5 is always a symbol with no pilots for both normal and extended prefix
-
     dl_ch128=(__m128i *)&dl_ch_estimates_ext[aarx][0/*symbol*frame_parms->N_RB_DL*12*/];
 #elif defined(__arm__)
-
-
 #endif
     /*if ((symbol == 2) || (symbol == 6) || (symbol == 10))
       nre = (frame_parms->N_RB_DL*6);
@@ -320,16 +291,14 @@ void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext,
 #if defined(__x86_64__) || defined(__i386__)
       avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
 #elif defined(__arm__)
-
 #endif
     }
 
-    avg[aarx] = (((int*)&avg128)[0] +
-                 ((int*)&avg128)[1] +
-                 ((int*)&avg128)[2] +
-                 ((int*)&avg128)[3])/nre;
-
-                //printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
+    avg[aarx] = (((int *)&avg128)[0] +
+                 ((int *)&avg128)[1] +
+                 ((int *)&avg128)[2] +
+                 ((int *)&avg128)[3])/nre;
+    //printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
   }
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -337,7 +306,7 @@ void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext,
   _m_empty();
 #endif
 }
-#endif
+
 
 
 void mch_channel_compensation(int **rxdataF_ext,
@@ -348,22 +317,21 @@ void mch_channel_compensation(int **rxdataF_ext,
                               LTE_DL_FRAME_PARMS *frame_parms,
                               unsigned char symbol,
                               unsigned char mod_order,
-                              unsigned char output_shift)
-{
-
+                              unsigned char output_shift) {
   int aarx,nre,i;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
   __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
 #elif defined(__arm__)
-
 #endif
+
   if ((symbol == 2) || (symbol == 6) || (symbol == 10))
     nre = frame_parms->N_RB_DL*6;
   else
     nre = frame_parms->N_RB_DL*12;
 
 #if defined(__x86_64__) || defined(__i386__)
+
   if (mod_order == 4) {
     QAM_amp128 = _mm_set1_epi16(QAM16_n1);  // 2/sqrt(10)
     QAM_amp128b = _mm_setzero_si128();
@@ -371,71 +339,54 @@ void mch_channel_compensation(int **rxdataF_ext,
     QAM_amp128  = _mm_set1_epi16(QAM64_n1); //
     QAM_amp128b = _mm_set1_epi16(QAM64_n2);
   }
-#elif defined(__arm__)
 
+#elif defined(__arm__)
 #endif
 
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
 #if defined(__x86_64__) || defined(__i386__)
-
     dl_ch128          = (__m128i *)&dl_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128      = (__m128i *)&dl_ch_mag[aarx][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128b     = (__m128i *)&dl_ch_magb[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF128        = (__m128i *)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128   = (__m128i *)&rxdataF_comp[aarx][symbol*frame_parms->N_RB_DL*12];
 #elif defined(__arm__)
-
 #endif
 
     for (i=0; i<(nre>>2); i+=2) {
       if (mod_order>2) {
         // get channel amplitude if not QPSK
 #if defined(__x86_64__) || defined(__i386__)
-
         mmtmpD0 = _mm_madd_epi16(dl_ch128[0],dl_ch128[0]);
         mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
-
         mmtmpD1 = _mm_madd_epi16(dl_ch128[1],dl_ch128[1]);
         mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
-
         mmtmpD0 = _mm_packs_epi32(mmtmpD0,mmtmpD1);
-
         // store channel magnitude here in a new field of dlsch
-
         dl_ch_mag128[0] = _mm_unpacklo_epi16(mmtmpD0,mmtmpD0);
         dl_ch_mag128b[0] = dl_ch_mag128[0];
         dl_ch_mag128[0] = _mm_mulhi_epi16(dl_ch_mag128[0],QAM_amp128);
         dl_ch_mag128[0] = _mm_slli_epi16(dl_ch_mag128[0],1);
-
         dl_ch_mag128[1] = _mm_unpackhi_epi16(mmtmpD0,mmtmpD0);
         dl_ch_mag128b[1] = dl_ch_mag128[1];
         dl_ch_mag128[1] = _mm_mulhi_epi16(dl_ch_mag128[1],QAM_amp128);
         dl_ch_mag128[1] = _mm_slli_epi16(dl_ch_mag128[1],1);
-
-
         dl_ch_mag128b[0] = _mm_mulhi_epi16(dl_ch_mag128b[0],QAM_amp128b);
         dl_ch_mag128b[0] = _mm_slli_epi16(dl_ch_mag128b[0],1);
-
-
         dl_ch_mag128b[1] = _mm_mulhi_epi16(dl_ch_mag128b[1],QAM_amp128b);
         dl_ch_mag128b[1] = _mm_slli_epi16(dl_ch_mag128b[1],1);
-
 #elif defined(__arm__)
-
 #endif
       }
 
 #if defined(__x86_64__) || defined(__i386__)
-
       // multiply by conjugated channel
       mmtmpD0 = _mm_madd_epi16(dl_ch128[0],rxdataF128[0]);
       //  print_ints("re",&mmtmpD0);
-
       // mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1));
       mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate[0]);
+      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)&conjugate[0]);
       //  print_ints("im",&mmtmpD1);
       mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[0]);
       // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
@@ -451,33 +402,28 @@ void mch_channel_compensation(int **rxdataF_ext,
       //  print_shorts("rx:",rxdataF128);
       //  print_shorts("ch:",dl_ch128);
       //  print_shorts("pack:",rxdataF_comp128);
-
       // multiply by conjugated channel
       mmtmpD0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]);
       // mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1));
       mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate);
+      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)conjugate);
       mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[1]);
       // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
       mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
       mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1);
       mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1);
-
       rxdataF_comp128[1] = _mm_packs_epi32(mmtmpD2,mmtmpD3);
       //  print_shorts("rx:",rxdataF128+1);
       //  print_shorts("ch:",dl_ch128+1);
       //  print_shorts("pack:",rxdataF_comp128+1);
-
       dl_ch128+=2;
       dl_ch_mag128+=2;
       dl_ch_mag128b+=2;
       rxdataF128+=2;
       rxdataF_comp128+=2;
-
 #elif defined(__arm__)
-
 #endif
     }
   }
@@ -486,38 +432,32 @@ void mch_channel_compensation(int **rxdataF_ext,
   _mm_empty();
   _m_empty();
 #endif
-
 }
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
-                              int **dl_ch_estimates_ext,
-                              int **dl_ch_mag,
-                              int **dl_ch_magb,
-                              int **rxdataF_comp,
-                              LTE_DL_FRAME_PARMS *frame_parms,
-                              /*unsigned char symbol,*/
-                              unsigned char mod_order,
-                              unsigned char output_shift)
-{
 
+void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
+    int **dl_ch_estimates_ext,
+    int **dl_ch_mag,
+    int **dl_ch_magb,
+    int **rxdataF_comp,
+    LTE_DL_FRAME_PARMS *frame_parms,
+    /*unsigned char symbol,*/
+    unsigned char mod_order,
+    unsigned char output_shift) {
   int aarx,nre,i;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
   __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
 #elif defined(__arm__)
-
 #endif
   /*if ((symbol == 2) || (symbol == 6) || (symbol == 10))
     nre = frame_parms->N_RB_DL*6;
   else
     nre = frame_parms->N_RB_DL*12;*/
-
   nre = frame_parms->N_RB_DL*12*10;
-
-
 #if defined(__x86_64__) || defined(__i386__)
+
   if (mod_order == 4) {
     QAM_amp128 = _mm_set1_epi16(QAM16_n1);  // 2/sqrt(10)
     QAM_amp128b = _mm_setzero_si128();
@@ -525,73 +465,54 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
     QAM_amp128  = _mm_set1_epi16(QAM64_n1); //
     QAM_amp128b = _mm_set1_epi16(QAM64_n2);
   }
-#elif defined(__arm__)
 
+#elif defined(__arm__)
 #endif
 
   for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-
 #if defined(__x86_64__) || defined(__i386__)
-
     dl_ch128          = (__m128i *)&dl_ch_estimates_ext[aarx][0];
     dl_ch_mag128      = (__m128i *)&dl_ch_mag[aarx][0];
     dl_ch_mag128b     = (__m128i *)&dl_ch_magb[aarx][0];
     rxdataF128        = (__m128i *)&rxdataF_ext[aarx][0];
     rxdataF_comp128   = (__m128i *)&rxdataF_comp[aarx][0];
-
-   #elif defined(__arm__)
-
+#elif defined(__arm__)
 #endif
 
     for (i=0; i<(nre>>2); i+=2) {
       if (mod_order>2) {
         // get channel amplitude if not QPSK
 #if defined(__x86_64__) || defined(__i386__)
-
         mmtmpD0 = _mm_madd_epi16(dl_ch128[0],dl_ch128[0]);
         mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
-
         mmtmpD1 = _mm_madd_epi16(dl_ch128[1],dl_ch128[1]);
         mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
-
         mmtmpD0 = _mm_packs_epi32(mmtmpD0,mmtmpD1);
-
         // store channel magnitude here in a new field of dlsch
-
         dl_ch_mag128[0] = _mm_unpacklo_epi16(mmtmpD0,mmtmpD0);
         dl_ch_mag128b[0] = dl_ch_mag128[0];
         dl_ch_mag128[0] = _mm_mulhi_epi16(dl_ch_mag128[0],QAM_amp128);
-
         dl_ch_mag128[0] = _mm_slli_epi16(dl_ch_mag128[0],1);
-
         dl_ch_mag128[1] = _mm_unpackhi_epi16(mmtmpD0,mmtmpD0);
         dl_ch_mag128b[1] = dl_ch_mag128[1];
         dl_ch_mag128[1] = _mm_mulhi_epi16(dl_ch_mag128[1],QAM_amp128);
         dl_ch_mag128[1] = _mm_slli_epi16(dl_ch_mag128[1],1);
-
-
         dl_ch_mag128b[0] = _mm_mulhi_epi16(dl_ch_mag128b[0],QAM_amp128b);
         dl_ch_mag128b[0] = _mm_slli_epi16(dl_ch_mag128b[0],1);
-
-
         dl_ch_mag128b[1] = _mm_mulhi_epi16(dl_ch_mag128b[1],QAM_amp128b);
         dl_ch_mag128b[1] = _mm_slli_epi16(dl_ch_mag128b[1],1);
-
 #elif defined(__arm__)
-
 #endif
       }
 
 #if defined(__x86_64__) || defined(__i386__)
-
       // multiply by conjugated channel
       mmtmpD0 = _mm_madd_epi16(dl_ch128[0],rxdataF128[0]);
       //  print_ints("re",&mmtmpD0);
-
       // mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1));
       mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate[0]);
+      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)&conjugate[0]);
       //  print_ints("im",&mmtmpD1);
       mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[0]);
       // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
@@ -607,33 +528,28 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
       //  print_shorts("rx:",rxdataF128);
       //  print_shorts("ch:",dl_ch128);
       //  print_shorts("pack:",rxdataF_comp128);
-
       // multiply by conjugated channel
       mmtmpD0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]);
       // mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
       mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1));
       mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1));
-      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate);
+      mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i *)conjugate);
       mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[1]);
       // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
       mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
       mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
       mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1);
       mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1);
-
       rxdataF_comp128[1] = _mm_packs_epi32(mmtmpD2,mmtmpD3);
-  //      print_shorts("rx:",rxdataF128+1);
-  //     print_shorts("ch:",dl_ch128+1);
-  //      print_shorts("pack:",rxdataF_comp128+1);
-
-        dl_ch128+=2;
+      //      print_shorts("rx:",rxdataF128+1);
+      //     print_shorts("ch:",dl_ch128+1);
+      //      print_shorts("pack:",rxdataF_comp128+1);
+      dl_ch128+=2;
       dl_ch_mag128+=2;
       dl_ch_mag128b+=2;
       rxdataF128+=2;
       rxdataF_comp128+=2;
-
 #elif defined(__arm__)
-
 #endif
     }
   }
@@ -642,36 +558,30 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
   _mm_empty();
   _m_empty();
 #endif
-
 }
-#endif
+
 
 
 void mch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
                        int **rxdataF_comp,
                        int **dl_ch_mag,
                        int **dl_ch_magb,
-                       unsigned char symbol)
-{
-
-
+                       unsigned char symbol) {
   int i;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b;
 #elif defined(__arm__)
   int16x8_t *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b;
 #endif
-  if (frame_parms->nb_antennas_rx>1) {
 
+  if (frame_parms->nb_antennas_rx>1) {
 #if defined(__x86_64__) || defined(__i386__)
-
     rxdataF_comp128_0   = (__m128i *)&rxdataF_comp[0][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128_1   = (__m128i *)&rxdataF_comp[1][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_0      = (__m128i *)&dl_ch_mag[0][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_1      = (__m128i *)&dl_ch_mag[1][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_0b     = (__m128i *)&dl_ch_magb[0][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_1b     = (__m128i *)&dl_ch_magb[1][symbol*frame_parms->N_RB_DL*12];
-
 #elif defined(__arm__)
     rxdataF_comp128_0   = (int16x8_t *)&rxdataF_comp[0][symbol*frame_parms->N_RB_DL*12];
     rxdataF_comp128_1   = (int16x8_t *)&rxdataF_comp[1][symbol*frame_parms->N_RB_DL*12];
@@ -679,8 +589,8 @@ void mch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
     dl_ch_mag128_1      = (int16x8_t *)&dl_ch_mag[1][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_0b     = (int16x8_t *)&dl_ch_magb[0][symbol*frame_parms->N_RB_DL*12];
     dl_ch_mag128_1b     = (int16x8_t *)&dl_ch_magb[1][symbol*frame_parms->N_RB_DL*12];
-
 #endif
+
     // MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
     for (i=0; i<frame_parms->N_RB_DL*3; i++) {
 #if defined(__x86_64__) || defined(__i386__)
@@ -694,38 +604,34 @@ void mch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
 #endif
     }
   }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
 #endif
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void mch_detection_mrc_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
-                       int **rxdataF_comp,
-                       int **dl_ch_mag,
-                       int **dl_ch_magb/*,
-                       unsigned char symbol*/)
-{
-
 
+void mch_detection_mrc_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
+                                  int **rxdataF_comp,
+                                  int **dl_ch_mag,
+                                  int **dl_ch_magb/*,
+                       unsigned char symbol*/) {
   int i;
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b;
 #elif defined(__arm__)
   int16x8_t *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b;
 #endif
-  if (frame_parms->nb_antennas_rx>1) {
 
+  if (frame_parms->nb_antennas_rx>1) {
 #if defined(__x86_64__) || defined(__i386__)
-
     rxdataF_comp128_0   = (__m128i *)&rxdataF_comp[0][0];
     rxdataF_comp128_1   = (__m128i *)&rxdataF_comp[1][0];
     dl_ch_mag128_0      = (__m128i *)&dl_ch_mag[0][0];
     dl_ch_mag128_1      = (__m128i *)&dl_ch_mag[1][0];
     dl_ch_mag128_0b     = (__m128i *)&dl_ch_magb[0][0];
     dl_ch_mag128_1b     = (__m128i *)&dl_ch_magb[1][0];
-
 #elif defined(__arm__)
     rxdataF_comp128_0   = (int16x8_t *)&rxdataF_comp[0][0];
     rxdataF_comp128_1   = (int16x8_t *)&rxdataF_comp[1][0];
@@ -733,8 +639,8 @@ void mch_detection_mrc_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
     dl_ch_mag128_1      = (int16x8_t *)&dl_ch_mag[1][0];
     dl_ch_mag128_0b     = (int16x8_t *)&dl_ch_magb[0][0];
     dl_ch_mag128_1b     = (int16x8_t *)&dl_ch_magb[1][0];
-
 #endif
+
     // MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
     for (i=0; i<frame_parms->N_RB_DL*30; i++) {
 #if defined(__x86_64__) || defined(__i386__)
@@ -748,12 +654,13 @@ void mch_detection_mrc_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
 #endif
     }
   }
+
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
 #endif
 }
-#endif
+
 
 
 
@@ -763,22 +670,19 @@ int mch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
                  int **rxdataF_comp,
                  short *dlsch_llr,
                  unsigned char symbol,
-                 short **llr32p)
-{
-
-  uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+                 short **llr32p) {
+  uint32_t *rxF = (uint32_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   uint32_t *llr32;
   int i,len;
 
   if (symbol==2) {
-    llr32 = (uint32_t*)dlsch_llr;
+    llr32 = (uint32_t *)dlsch_llr;
   } else {
-    llr32 = (uint32_t*)(*llr32p);
+    llr32 = (uint32_t *)(*llr32p);
   }
 
   AssertFatal(llr32!=NULL,"dlsch_qpsk_llr: llr is null, symbol %d, llr32=%p\n",symbol, llr32);
 
-
   if ((symbol==2) || (symbol==6) || (symbol==10)) {
     len = frame_parms->N_RB_DL*6;
   } else {
@@ -792,37 +696,30 @@ int mch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
   }
 
   *llr32p = (short *)llr32;
-
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
 #endif
-
   return(0);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-int mch_qpsk_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
-                 int **rxdataF_comp,
-                 short *dlsch_llr,
-                 /*unsigned char symbol,*/
-                 short **llr32p)
-{
 
-  uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][0/*(symbol*frame_parms->N_RB_DL*12)*/];
+int mch_qpsk_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
+                            int **rxdataF_comp,
+                            short *dlsch_llr,
+                            /*unsigned char symbol,*/
+                            short **llr32p) {
+  uint32_t *rxF = (uint32_t *)&rxdataF_comp[0][0/*(symbol*frame_parms->N_RB_DL*12)*/];
   //uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   uint32_t *llr32;
   int i,len;
-
   //if (symbol==0) {
-    llr32 = (uint32_t*)dlsch_llr;
+  llr32 = (uint32_t *)dlsch_llr;
   //} else {
-    //llr32 = (uint32_t*)(*llr32p);
+  //llr32 = (uint32_t*)(*llr32p);
   //}
-
   //AssertFatal(llr32!=NULL,"dlsch_qpsk_llr: llr is null, symbol %d, llr32=%p\n",symbol, llr32);
   AssertFatal(llr32!=NULL,"dlsch_qpsk_llr: llr is null, llr32=%p\n",llr32);
-
   len = frame_parms->N_RB_DL*12*10;
 
   for (i=0; i<len; i++) {
@@ -832,15 +729,13 @@ int mch_qpsk_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
   }
 
   *llr32p = (short *)llr32;
-
 #if defined(__x86_64__) || defined(__i386__)
   _mm_empty();
   _m_empty();
 #endif
-
   return(0);
 }
-#endif
+
 
 
 //----------------------------------------------------------------------------------------------
@@ -852,49 +747,49 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
                    short *dlsch_llr,
                    int **dl_ch_mag,
                    unsigned char symbol,
-                   int16_t **llr32p)
-{
-
+                   int16_t **llr32p) {
 #if defined(__x86_64__) || defined(__i386__)
-  __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  __m128i *rxF = (__m128i *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   __m128i *ch_mag;
   __m128i llr128[2],xmm0;
   uint32_t *llr32;
 #elif defined(__arm__)
-  int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  int16x8_t *rxF = (int16x8_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
   int16x8_t *ch_mag;
   int16x8_t llr128[2],xmm0;
   int16_t *llr16;
 #endif
   int i,len;
   unsigned char len_mod4=0;
-
 #if defined(__x86_64__) || defined(__i386__)
+
   if (symbol==2) {
-    llr32 = (uint32_t*)dlsch_llr;
+    llr32 = (uint32_t *)dlsch_llr;
   } else {
-    llr32 = (uint32_t*)*llr32p;
+    llr32 = (uint32_t *)*llr32p;
   }
+
 #elif defined(__arm__)
+
   if (symbol==2) {
-    llr16 = (int16_t*)dlsch_llr;
+    llr16 = (int16_t *)dlsch_llr;
   } else {
-    llr16 = (int16_t*)*llr32p;
+    llr16 = (int16_t *)*llr32p;
   }
+
 #endif
 #if defined(__x86_64__) || defined(__i386__)
-  ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag = (__m128i *)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
 #elif defined(__arm__)
-  ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag = (int16x8_t *)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
 #endif
+
   if ((symbol==2) || (symbol==6) || (symbol==10)) {
     len = frame_parms->N_RB_DL*6;
   } else {
     len = frame_parms->N_RB_DL*12;
   }
 
-
-
   // update output pointer according to number of REs in this symbol (<<2 because 4 bits per RE)
   if (symbol==2)
     *llr32p = dlsch_llr + (len<<2);
@@ -906,11 +801,9 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
   len+=(len_mod4==0 ? 0 : 1);
 
   for (i=0; i<len; i++) {
-
 #if defined(__x86_64__) || defined(__i386__)
     xmm0 = _mm_abs_epi16(rxF[i]);
     xmm0 = _mm_subs_epi16(ch_mag[i],xmm0);
-
     // lambda_1=y_R, lambda_2=|y_R|-|h|^2, lamda_3=y_I, lambda_4=|y_I|-|h|^2
     llr128[0] = _mm_unpacklo_epi32(rxF[i],xmm0);
     llr128[1] = _mm_unpackhi_epi32(rxF[i],xmm0);
@@ -923,13 +816,10 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     llr32[6] = ((uint32_t *)&llr128[1])[2];
     llr32[7] = ((uint32_t *)&llr128[1])[3];
     llr32+=8;
-
 #elif defined(__arm__)
     xmm0 = vabsq_s16(rxF[i]);
     xmm0 = vsubq_s16(ch_mag[i],xmm0);
-
     // lambda_1=y_R, lambda_2=|y_R|-|h|^2, lamda_3=y_I, lambda_4=|y_I|-|h|^2
-
     llr16[0] = vgetq_lane_s16(rxF[i],0);
     llr16[1] = vgetq_lane_s16(xmm0,0);
     llr16[2] = vgetq_lane_s16(rxF[i],1);
@@ -948,7 +838,6 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     llr16[15] = vgetq_lane_s16(xmm0,7);
     llr16+=16;
 #endif
-
   }
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -957,67 +846,58 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
 #endif
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
-                   int **rxdataF_comp,
-                   short *dlsch_llr,
-                   int **dl_ch_mag,
-                   /*unsigned char symbol,*/
-                   int16_t **llr32p)
-{
 
+void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
+                              int **rxdataF_comp,
+                              short *dlsch_llr,
+                              int **dl_ch_mag,
+                              /*unsigned char symbol,*/
+                              int16_t **llr32p) {
 #if defined(__x86_64__) || defined(__i386__)
-  __m128i *rxF = (__m128i*)&rxdataF_comp[0][0];
+  __m128i *rxF = (__m128i *)&rxdataF_comp[0][0];
   __m128i *ch_mag;
   __m128i llr128[2],xmm0;
   uint32_t *llr32;
 #elif defined(__arm__)
-  int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][0];
+  int16x8_t *rxF = (int16x8_t *)&rxdataF_comp[0][0];
   int16x8_t *ch_mag;
   int16x8_t llr128[2],xmm0;
   int16_t *llr16;
 #endif
   int i,len;
   unsigned char len_mod4=0;
-
 #if defined(__x86_64__) || defined(__i386__)
   //if (symbol==2) {
-    llr32 = (uint32_t*)dlsch_llr;
+  llr32 = (uint32_t *)dlsch_llr;
   //} else {
-    //llr32 = (uint32_t*)*llr32p;
+  //llr32 = (uint32_t*)*llr32p;
   //}
 #elif defined(__arm__)
   //if (symbol==2) {
-    llr16 = (int16_t*)dlsch_llr;
+  llr16 = (int16_t *)dlsch_llr;
   //} else {
   //  llr16 = (int16_t*)*llr32p;
   //}
 #endif
 #if defined(__x86_64__) || defined(__i386__)
-  ch_mag = (__m128i*)&dl_ch_mag[0][0];
+  ch_mag = (__m128i *)&dl_ch_mag[0][0];
 #elif defined(__arm__)
-  ch_mag = (int16x8_t*)&dl_ch_mag[0][0];
+  ch_mag = (int16x8_t *)&dl_ch_mag[0][0];
 #endif
   len = frame_parms->N_RB_DL*12*10;
-
-
-
   // update output pointer according to number of REs in this symbol (<<2 because 4 bits per RE)
   //if (symbol==2)
-    *llr32p = dlsch_llr + (len<<2);
+  *llr32p = dlsch_llr + (len<<2);
   //else
-    //*llr32p += (len<<2);
-
+  //*llr32p += (len<<2);
   len_mod4 = len&3;
   len>>=2;  // length in quad words (4 REs)
   len+=(len_mod4==0 ? 0 : 1);
 
   for (i=0; i<len; i++) {
-
 #if defined(__x86_64__) || defined(__i386__)
     xmm0 = _mm_abs_epi16(rxF[i]);
     xmm0 = _mm_subs_epi16(ch_mag[i],xmm0);
-
     // lambda_1=y_R, lambda_2=|y_R|-|h|^2, lamda_3=y_I, lambda_4=|y_I|-|h|^2
     llr128[0] = _mm_unpacklo_epi32(rxF[i],xmm0);
     llr128[1] = _mm_unpackhi_epi32(rxF[i],xmm0);
@@ -1030,13 +910,10 @@ void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
     llr32[6] = ((uint32_t *)&llr128[1])[2];
     llr32[7] = ((uint32_t *)&llr128[1])[3];
     llr32+=8;
-
 #elif defined(__arm__)
     xmm0 = vabsq_s16(rxF[i]);
     xmm0 = vsubq_s16(ch_mag[i],xmm0);
-
     // lambda_1=y_R, lambda_2=|y_R|-|h|^2, lamda_3=y_I, lambda_4=|y_I|-|h|^2
-
     llr16[0] = vgetq_lane_s16(rxF[i],0);
     llr16[1] = vgetq_lane_s16(xmm0,0);
     llr16[2] = vgetq_lane_s16(rxF[i],1);
@@ -1055,7 +932,6 @@ void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
     llr16[15] = vgetq_lane_s16(xmm0,7);
     llr16+=16;
 #endif
-
   }
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -1063,7 +939,7 @@ void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
   _m_empty();
 #endif
 }
-#endif
+
 
 //----------------------------------------------------------------------------------------------
 // 64-QAM
@@ -1075,17 +951,14 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
                    int **dl_ch_mag,
                    int **dl_ch_magb,
                    unsigned char symbol,
-                   short **llr_save)
-{
-
+                   short **llr_save) {
 #if defined(__x86_64__) || defined(__i386__)
   __m128i xmm1,xmm2,*ch_mag,*ch_magb;
-  __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  __m128i *rxF = (__m128i *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
 #elif defined(__arm__)
   int16x8_t xmm1,xmm2,*ch_mag,*ch_magb;
-  int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
+  int16x8_t *rxF = (int16x8_t *)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
 #endif
-
   int i,len,len2;
   //   int j=0;
   unsigned char len_mod4;
@@ -1098,27 +971,25 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     llr = *llr_save;
 
 #if defined(__x86_64__) || defined(__i386__)
-  ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
-  ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag = (__m128i *)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_magb = (__m128i *)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
 #elif defined(__arm__)
-  ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
-  ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_mag = (int16x8_t *)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
+  ch_magb = (int16x8_t *)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
 #endif
+
   if ((symbol==2) || (symbol==6) || (symbol==10)) {
     len = frame_parms->N_RB_DL*6;
   } else {
     len = frame_parms->N_RB_DL*12;
   }
 
-
   llr2 = llr;
   llr += (len*6);
-
   len_mod4 =len&3;
   len2=len>>2;  // length in quad words (4 REs)
   len2+=(len_mod4?0:1);
 
-
   for (i=0; i<len2; i++) {
 #if defined(__x86_64__) || defined(__i386__)
     xmm1 = _mm_abs_epi16(rxF[i]);
@@ -1131,7 +1002,6 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     xmm2 = vabsq_s16(xmm1);
     xmm2 = vsubq_s16(ch_magb[i],xmm2);
 #endif
-
     // loop over all LLRs in quad word (24 coded bits)
     /*
     for (j=0;j<8;j+=2) {
@@ -1158,7 +1028,6 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
     llr2[4] = vgetq_lane_s16(xmm2,0);//((short *)&xmm2)[j];
     llr2[5] = vgetq_lane_s16(xmm2,1);//((short *)&xmm2)[j+1];
 #endif
-
     llr2+=6;
     llr2[0] = ((short *)&rxF[i])[2];
     llr2[1] = ((short *)&rxF[i])[3];
@@ -1211,55 +1080,43 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
 #endif
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
-                   int **rxdataF_comp,
-                   short *dlsch_llr,
-                   int **dl_ch_mag,
-                   int **dl_ch_magb,
-                   /*unsigned char symbol,*/
-                   short **llr_save)
-{
-
+                              int **rxdataF_comp,
+                              short *dlsch_llr,
+                              int **dl_ch_mag,
+                              int **dl_ch_magb,
+                              /*unsigned char symbol,*/
+                              short **llr_save) {
 #if defined(__x86_64__) || defined(__i386__)
   __m128i xmm1,xmm2,*ch_mag,*ch_magb;
-  __m128i *rxF = (__m128i*)&rxdataF_comp[0][0];
+  __m128i *rxF = (__m128i *)&rxdataF_comp[0][0];
 #elif defined(__arm__)
   int16x8_t xmm1,xmm2,*ch_mag,*ch_magb;
-  int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][0];
+  int16x8_t *rxF = (int16x8_t *)&rxdataF_comp[0][0];
 #endif
-
   int i,len,len2;
   //   int j=0;
   unsigned char len_mod4;
   short *llr;
   int16_t *llr2;
-
   //if (symbol==2)
-    llr = dlsch_llr;
+  llr = dlsch_llr;
   //else
-    //llr = *llr_save;
-
+  //llr = *llr_save;
 #if defined(__x86_64__) || defined(__i386__)
-  ch_mag = (__m128i*)&dl_ch_mag[0][0];
-  ch_magb = (__m128i*)&dl_ch_magb[0][0];
+  ch_mag = (__m128i *)&dl_ch_mag[0][0];
+  ch_magb = (__m128i *)&dl_ch_magb[0][0];
 #elif defined(__arm__)
-  ch_mag = (int16x8_t*)&dl_ch_mag[0][0];
-  ch_magb = (int16x8_t*)&dl_ch_magb[0][0];
+  ch_mag = (int16x8_t *)&dl_ch_mag[0][0];
+  ch_magb = (int16x8_t *)&dl_ch_magb[0][0];
 #endif
-
   len = frame_parms->N_RB_DL*12*10;
-
-
   llr2 = llr;
   llr += (len*6);
-
   len_mod4 =len&3;
   len2=len>>2;  // length in quad words (4 REs)
   len2+=(len_mod4?0:1);
 
-
   for (i=0; i<len2; i++) {
 #if defined(__x86_64__) || defined(__i386__)
     xmm1 = _mm_abs_epi16(rxF[i]);
@@ -1272,7 +1129,6 @@ void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
     xmm2 = vabsq_s16(xmm1);
     xmm2 = vsubq_s16(ch_magb[i],xmm2);
 #endif
-
     // loop over all LLRs in quad word (24 coded bits)
     /*
     for (j=0;j<8;j+=2) {
@@ -1299,7 +1155,6 @@ void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
     llr2[4] = vgetq_lane_s16(xmm2,0);//((short *)&xmm2)[j];
     llr2[5] = vgetq_lane_s16(xmm2,1);//((short *)&xmm2)[j+1];
 #endif
-
     llr2+=6;
     llr2[0] = ((short *)&rxF[i])[2];
     llr2[1] = ((short *)&rxF[i])[3];
@@ -1351,23 +1206,19 @@ void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,
   _m_empty();
 #endif
 }
-#endif
+
 
 
 int avg_pmch[4];
 int rx_pmch(PHY_VARS_UE *ue,
             unsigned char eNB_id,
             uint8_t subframe,
-            unsigned char symbol)
-{
-
+            unsigned char symbol) {
   LTE_UE_COMMON *common_vars  = &ue->common_vars;
   LTE_UE_PDSCH **pdsch_vars   = &ue->pdsch_vars_MCH[eNB_id];
   LTE_DL_FRAME_PARMS *frame_parms    = &ue->frame_parms;
   LTE_UE_DLSCH_t   **dlsch        = &ue->dlsch_MCH[eNB_id];
   int avgs,aarx;
-
-
   mch_extract_rbs(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
                   common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
                   pdsch_vars[eNB_id]->rxdataF_ext,
@@ -1404,7 +1255,6 @@ int rx_pmch(PHY_VARS_UE *ue,
                            get_Qm(dlsch[0]->harq_processes[0]->mcs),
                            pdsch_vars[eNB_id]->log2_maxh);
 
-
   if (frame_parms->nb_antennas_rx > 1)
     mch_detection_mrc(frame_parms,
                       pdsch_vars[eNB_id]->rxdataF_comp0,
@@ -1413,129 +1263,119 @@ int rx_pmch(PHY_VARS_UE *ue,
                       symbol);
 
   switch (get_Qm(dlsch[0]->harq_processes[0]->mcs)) {
-  case 2 :
-    mch_qpsk_llr(frame_parms,
-                 pdsch_vars[eNB_id]->rxdataF_comp0,
-                 pdsch_vars[eNB_id]->llr[0],
-                 symbol,
-                 pdsch_vars[eNB_id]->llr128);
-    break;
-
-  case 4:
-    mch_16qam_llr(frame_parms,
-                  pdsch_vars[eNB_id]->rxdataF_comp0,
-                  pdsch_vars[eNB_id]->llr[0],
-                  pdsch_vars[eNB_id]->dl_ch_mag0,
-                  symbol,
-                  pdsch_vars[eNB_id]->llr128);
-    break;
-
-  case 6:
-    mch_64qam_llr(frame_parms,
-                  pdsch_vars[eNB_id]->rxdataF_comp0,
-                  pdsch_vars[eNB_id]->llr[0],
-                  pdsch_vars[eNB_id]->dl_ch_mag0,
-                  pdsch_vars[eNB_id]->dl_ch_magb0,
-                  symbol,
-                  pdsch_vars[eNB_id]->llr128);
-    break;
+    case 2 :
+      mch_qpsk_llr(frame_parms,
+                   pdsch_vars[eNB_id]->rxdataF_comp0,
+                   pdsch_vars[eNB_id]->llr[0],
+                   symbol,
+                   pdsch_vars[eNB_id]->llr128);
+      break;
+
+    case 4:
+      mch_16qam_llr(frame_parms,
+                    pdsch_vars[eNB_id]->rxdataF_comp0,
+                    pdsch_vars[eNB_id]->llr[0],
+                    pdsch_vars[eNB_id]->dl_ch_mag0,
+                    symbol,
+                    pdsch_vars[eNB_id]->llr128);
+      break;
+
+    case 6:
+      mch_64qam_llr(frame_parms,
+                    pdsch_vars[eNB_id]->rxdataF_comp0,
+                    pdsch_vars[eNB_id]->llr[0],
+                    pdsch_vars[eNB_id]->dl_ch_mag0,
+                    pdsch_vars[eNB_id]->dl_ch_magb0,
+                    symbol,
+                    pdsch_vars[eNB_id]->llr128);
+      break;
   }
 
   return(0);
 }
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 
-int rx_pmch_khz_1dot25(PHY_VARS_UE *ue, 
-            unsigned char eNB_id, 
-            uint8_t subframe/*, 
-            unsigned char symbol*/ 
-            ,int mcs)  // currently work around TOFIX
-{ 
-  //unsigned int symbol; 
- 
-  LTE_UE_COMMON *common_vars  = &ue->common_vars; 
-  LTE_UE_PDSCH **pdsch_vars   = &ue->pdsch_vars_MCH[eNB_id]; 
-  LTE_DL_FRAME_PARMS *frame_parms    = &ue->frame_parms; 
-  //LTE_UE_DLSCH_t   **dlsch        = &ue->dlsch_MCH[eNB_id]; 
-  int avgs,aarx; 
- 
-     
-  mch_extract_rbs_khz_1dot25(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, 
-                  common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id], 
-                  pdsch_vars[eNB_id]->rxdataF_ext, 
-                  pdsch_vars[eNB_id]->dl_ch_estimates_ext, 
-                  /*symbol,*/ 
-                  subframe, 
-                  frame_parms); 
- 
-  mch_channel_level_khz_1dot25(pdsch_vars[eNB_id]->dl_ch_estimates_ext, 
-                      frame_parms, 
-                      avg_pmch, 
-                      /*symbol,*/ 
-                      frame_parms->N_RB_DL); 
- 
-  avgs = 0; 
- 
-  for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++){ 
-    avgs = cmax(avgs,avg_pmch[aarx]); 
-  } 
- 
- 
-  if (get_Qm(mcs/*dlsch[0]->harq_processes[0]->mcs)==2*/)==2) 
-    pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) ;// + 2 
-  else 
-    pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2); // + 5;// + 2*/ 
- 
 
+int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
+                       unsigned char eNB_id,
+                       uint8_t subframe/*,
+            unsigned char symbol*/
+                       ,int mcs) { // currently work around TOFIX
+  //unsigned int symbol;
+  LTE_UE_COMMON *common_vars  = &ue->common_vars;
+  LTE_UE_PDSCH **pdsch_vars   = &ue->pdsch_vars_MCH[eNB_id];
+  LTE_DL_FRAME_PARMS *frame_parms    = &ue->frame_parms;
+  //LTE_UE_DLSCH_t   **dlsch        = &ue->dlsch_MCH[eNB_id];
+  int avgs,aarx;
+  mch_extract_rbs_khz_1dot25(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
+                             common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
+                             pdsch_vars[eNB_id]->rxdataF_ext,
+                             pdsch_vars[eNB_id]->dl_ch_estimates_ext,
+                             /*symbol,*/
+                             subframe,
+                             frame_parms);
+  mch_channel_level_khz_1dot25(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
+                               frame_parms,
+                               avg_pmch,
+                               /*symbol,*/
+                               frame_parms->N_RB_DL);
+  avgs = 0;
 
+  for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
+    avgs = cmax(avgs,avg_pmch[aarx]);
+  }
 
-  mch_channel_compensation_khz_1dot25(pdsch_vars[eNB_id]->rxdataF_ext,
-                           pdsch_vars[eNB_id]->dl_ch_estimates_ext,
-                           pdsch_vars[eNB_id]->dl_ch_mag0,
-                           pdsch_vars[eNB_id]->dl_ch_magb0,
-                           pdsch_vars[eNB_id]->rxdataF_comp0,
-                           frame_parms,
-                           /*symbol,*/
-                           get_Qm(mcs/*dlsch[0]->harq_processes[0]->mcs*/),
-                           pdsch_vars[eNB_id]->log2_maxh);
+  if (get_Qm(mcs/*dlsch[0]->harq_processes[0]->mcs)==2*/)==2)
+    pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) ;// + 2
+  else
+    pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2); // + 5;// + 2*/
 
-  if (frame_parms->nb_antennas_rx > 1){
+  mch_channel_compensation_khz_1dot25(pdsch_vars[eNB_id]->rxdataF_ext,
+                                      pdsch_vars[eNB_id]->dl_ch_estimates_ext,
+                                      pdsch_vars[eNB_id]->dl_ch_mag0,
+                                      pdsch_vars[eNB_id]->dl_ch_magb0,
+                                      pdsch_vars[eNB_id]->rxdataF_comp0,
+                                      frame_parms,
+                                      /*symbol,*/
+                                      get_Qm(mcs/*dlsch[0]->harq_processes[0]->mcs*/),
+                                      pdsch_vars[eNB_id]->log2_maxh);
+
+  if (frame_parms->nb_antennas_rx > 1) {
     mch_detection_mrc_khz_1dot25(frame_parms,
-                      pdsch_vars[eNB_id]->rxdataF_comp0,
-                      pdsch_vars[eNB_id]->dl_ch_mag0,
-                      pdsch_vars[eNB_id]->dl_ch_magb0/*,
+                                 pdsch_vars[eNB_id]->rxdataF_comp0,
+                                 pdsch_vars[eNB_id]->dl_ch_mag0,
+                                 pdsch_vars[eNB_id]->dl_ch_magb0/*,
                       symbol*/);
   }
 
   switch (get_Qm(mcs/*dlsch[0]->harq_processes[0]->mcs*/)) {
-  case 2 :
-    mch_qpsk_llr_khz_1dot25(frame_parms,
-                 pdsch_vars[eNB_id]->rxdataF_comp0,
-                 pdsch_vars[eNB_id]->llr[0],
-                 /*symbol,*/
-                 pdsch_vars[eNB_id]->llr128);
-    break;
-
-  case 4:
-    mch_16qam_llr_khz_1dot25(frame_parms,
-                  pdsch_vars[eNB_id]->rxdataF_comp0,
-                  pdsch_vars[eNB_id]->llr[0],
-                  pdsch_vars[eNB_id]->dl_ch_mag0,
-                  /*symbol,*/
-                  pdsch_vars[eNB_id]->llr128);
-    break;
-
-  case 6:
-    mch_64qam_llr_khz_1dot25(frame_parms,
-                  pdsch_vars[eNB_id]->rxdataF_comp0,
-                  pdsch_vars[eNB_id]->llr[0],
-                  pdsch_vars[eNB_id]->dl_ch_mag0,
-                  pdsch_vars[eNB_id]->dl_ch_magb0,
-                  /*symbol,*/
-                  pdsch_vars[eNB_id]->llr128);
-    break;
+    case 2 :
+      mch_qpsk_llr_khz_1dot25(frame_parms,
+                              pdsch_vars[eNB_id]->rxdataF_comp0,
+                              pdsch_vars[eNB_id]->llr[0],
+                              /*symbol,*/
+                              pdsch_vars[eNB_id]->llr128);
+      break;
+
+    case 4:
+      mch_16qam_llr_khz_1dot25(frame_parms,
+                               pdsch_vars[eNB_id]->rxdataF_comp0,
+                               pdsch_vars[eNB_id]->llr[0],
+                               pdsch_vars[eNB_id]->dl_ch_mag0,
+                               /*symbol,*/
+                               pdsch_vars[eNB_id]->llr128);
+      break;
+
+    case 6:
+      mch_64qam_llr_khz_1dot25(frame_parms,
+                               pdsch_vars[eNB_id]->rxdataF_comp0,
+                               pdsch_vars[eNB_id]->llr[0],
+                               pdsch_vars[eNB_id]->dl_ch_mag0,
+                               pdsch_vars[eNB_id]->dl_ch_magb0,
+                               /*symbol,*/
+                               pdsch_vars[eNB_id]->llr128);
+      break;
   }
 
   return(0);
 }
-#endif
+
 
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
index 844f738d8829072948a2fcd9d552aad9539cd63e..3299401443c83799e0823fafdd1ad0f19709a03e 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
+++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
@@ -73,10 +73,10 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue,
             unsigned char symbol);
 
 int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
-            unsigned char eNB_id,
-            uint8_t subframe/*, 
+                       unsigned char eNB_id,
+                       uint8_t subframe/*,
             unsigned char symbol*/
-            ,int mcs);
+                       ,int mcs);
 
 /** \brief Dump OCTAVE/MATLAB files for PMCH debugging
     @param phy_vars_ue Pointer to UE variables
@@ -860,13 +860,13 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
                                    unsigned char output_shift);
 
 void dlsch_dual_stream_correlationTM34(LTE_DL_FRAME_PARMS *frame_parms,
-                                   unsigned char symbol,
-                                   unsigned short nb_rb,
-                                   int **dl_ch_estimates_ext,
-                                   int **dl_ch_estimates_ext_i,
-                                   int **dl_ch_rho_ext,
-                                   unsigned char output_shift0,
-                                   unsigned char output_shift1);
+                                       unsigned char symbol,
+                                       unsigned short nb_rb,
+                                       int **dl_ch_estimates_ext,
+                                       int **dl_ch_estimates_ext_i,
+                                       int **dl_ch_rho_ext,
+                                       unsigned char output_shift0,
+                                       unsigned char output_shift1);
 //This function is used to compute multiplications in Hhermitian * H matrix
 void conjch0_mult_ch1(int *ch0,
                       int *ch1,
@@ -875,18 +875,18 @@ void conjch0_mult_ch1(int *ch0,
                       unsigned char output_shift0);
 
 void construct_HhH_elements(int *ch0conj_ch0,
-                         int *ch1conj_ch1,
-                         int *ch2conj_ch2,
-                         int *ch3conj_ch3,
-                         int *ch0conj_ch1,
-                         int *ch1conj_ch0,
-                         int *ch2conj_ch3,
-                         int *ch3conj_ch2,
-                         int32_t *after_mf_00,
-                         int32_t *after_mf_01,
-                         int32_t *after_mf_10,
-                         int32_t *after_mf_11,
-                         unsigned short nb_rb);
+                            int *ch1conj_ch1,
+                            int *ch2conj_ch2,
+                            int *ch3conj_ch3,
+                            int *ch0conj_ch1,
+                            int *ch1conj_ch0,
+                            int *ch2conj_ch3,
+                            int *ch3conj_ch2,
+                            int32_t *after_mf_00,
+                            int32_t *after_mf_01,
+                            int32_t *after_mf_10,
+                            int32_t *after_mf_11,
+                            unsigned short nb_rb);
 
 void squared_matrix_element(int32_t *Hh_h_00,
                             int32_t *Hh_h_00_sq,
@@ -937,19 +937,19 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
 
 
 void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
-                                    LTE_UE_PDSCH *lte_ue_pdsch_vars,
-                                    PHY_MEASUREMENTS *phy_measurements,
-                                    int eNB_id,
-                                    unsigned char symbol,
-                                    unsigned char mod_order0,
-                                    unsigned char mod_order1,
-                                    int harq_pid,
-                                    int round,
-                                    MIMO_mode_t mimo_mode,
-                                    unsigned short nb_rb,
-                                    unsigned short mmse_flag,
-                                    unsigned char output_shift0,
-                                    unsigned char output_shift1);
+                                     LTE_UE_PDSCH *lte_ue_pdsch_vars,
+                                     PHY_MEASUREMENTS *phy_measurements,
+                                     int eNB_id,
+                                     unsigned char symbol,
+                                     unsigned char mod_order0,
+                                     unsigned char mod_order1,
+                                     int harq_pid,
+                                     int round,
+                                     MIMO_mode_t mimo_mode,
+                                     unsigned short nb_rb,
+                                     unsigned short mmse_flag,
+                                     unsigned char output_shift0,
+                                     unsigned char output_shift1);
 
 
 /** \brief This function computes the average channel level over all allocated RBs and antennas (TX/RX) in order to compute output shift for compensated signal
@@ -999,10 +999,10 @@ void dlsch_channel_level_TM56(int32_t **dl_ch_estimates_ext,
                               uint16_t nb_rb);
 
 void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext,
-                         LTE_DL_FRAME_PARMS *frame_parms,
-                         int32_t *avg,
-                         uint8_t pilots_flag,
-                         uint16_t nb_rb);
+                             LTE_DL_FRAME_PARMS *frame_parms,
+                             int32_t *avg,
+                             uint8_t pilots_flag,
+                             uint16_t nb_rb);
 
 void dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
                          LTE_DL_FRAME_PARMS *frame_parms,
@@ -1090,7 +1090,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
 int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
                     int32_t pss_ext[4][72],
                     int32_t sss_ext[4][72],
-                                        uint8_t subframe);
+                    uint8_t subframe);
 
 /*! \brief Extract only PSS resource elements
   @param phy_vars_ue Pointer to UE variables
@@ -1098,8 +1098,8 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
   @returns 0 on success
 */
 int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
-                    int32_t pss_ext[4][72],
-                    uint8_t subframe);
+                     int32_t pss_ext[4][72],
+                     uint8_t subframe);
 
 /*! \brief Extract only SSS resource elements
   @param phy_vars_ue Pointer to UE variables
@@ -1107,8 +1107,8 @@ int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
   @returns 0 on success
 */
 int sss_only_extract(PHY_VARS_UE *phy_vars_ue,
-                    int32_t sss_ext[4][72],
-                    uint8_t subframe);
+                     int32_t sss_ext[4][72],
+                     uint8_t subframe);
 
 /*! \brief Performs detection of SSS to find cell ID and other framing parameters (FDD/TDD, normal/extended prefix)
   @param phy_vars_ue Pointer to UE variables
@@ -1131,18 +1131,18 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
                  uint32_t high_speed_flag,
                  uint8_t frame_mod4);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 /*! \brief receiver for the PBCH FeMBMS
   \returns number of tx antennas or -1 if error
 */
 uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
-                 LTE_UE_PBCH *lte_ue_pbch_vars,
-                 LTE_DL_FRAME_PARMS *frame_parms,
-                 uint8_t eNB_id,
-                 MIMO_mode_t mimo_mode,
-                 uint32_t high_speed_flag,
-                 uint8_t frame_mod4);
-#endif
+                        LTE_UE_PBCH *lte_ue_pbch_vars,
+                        LTE_DL_FRAME_PARMS *frame_parms,
+                        uint8_t eNB_id,
+                        MIMO_mode_t mimo_mode,
+                        uint32_t high_speed_flag,
+                        uint8_t frame_mod4);
+
 
 
 uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
@@ -1157,7 +1157,7 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
   \param length Length of the sequence
   \param frame_mod4 Frame number modulo 4*/
 void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
-                       int8_t* llr,
+                       int8_t *llr,
                        uint32_t length,
                        uint8_t frame_mod4);
 
@@ -1231,11 +1231,11 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
                                 uint8_t subframe);
 
 uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
-                                DCI_ALLOC_t *dci_alloc,
-                                uint8_t DCIFormat,
-                                uint8_t agregationLevel,
-                                int16_t eNB_id,
-                                uint8_t subframe);
+                                      DCI_ALLOC_t *dci_alloc,
+                                      uint8_t DCIFormat,
+                                      uint8_t agregationLevel,
+                                      int16_t eNB_id,
+                                      uint8_t subframe);
 
 uint16_t dci_decoding_procedure_emul(LTE_UE_PDCCH **lte_ue_pdcch_vars,
                                      uint8_t num_ue_spec_dci,
@@ -1307,7 +1307,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
 
 
 #ifndef modOrder
-#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
+  #define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
 #endif
 
 /** \fn uint8_t I_TBS2I_MCS(uint8_t I_TBS);
@@ -1335,10 +1335,10 @@ uint8_t SE2I_TBS(float SE,
     @param txdataF pointer to the frequency domain TX signal
     @returns 0 on success*/
 int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
-		 SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
-		 int *txdataF,
-		 int16_t amp,
-		 uint32_t subframe);
+                 SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
+                 int *txdataF,
+                 int16_t amp,
+                 uint32_t subframe);
 
 
 /*!
@@ -1359,9 +1359,9 @@ int32_t generate_srs_tx(PHY_VARS_UE *phy_vars_ue,
   \brief This function generates the downlink reference signal for the PUSCH according to 36.211 v8.6.0. The DRS occuies the RS defined by rb_alloc and the symbols 2 and 8 for extended CP and 3 and 10 for normal CP.
 */
 int generate_drs_pusch(PHY_VARS_UE *ue,
-		       UE_rxtx_proc_t *proc,
-		       LTE_DL_FRAME_PARMS *frame_parms,
-		       int32_t **txdataF,
+                       UE_rxtx_proc_t *proc,
+                       LTE_DL_FRAME_PARMS *frame_parms,
+                       int32_t **txdataF,
                        uint8_t eNB_id,
                        short amp,
                        unsigned int subframe,
@@ -1383,11 +1383,11 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
   @param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/
 int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void init_mpdcch(PHY_VARS_eNB *eNB);
-#endif
 
-int32_t compareints (const void * a, const void * b);
+
+int32_t compareints (const void *a, const void *b);
 
 
 void ulsch_modulation(int32_t **txdataF,
@@ -1433,18 +1433,18 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
                                       uint8_t use_srs);
 
 int32_t generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
-                                          UE_rxtx_proc_t *proc,
-                                          uint8_t eNB_id);
+    UE_rxtx_proc_t *proc,
+    uint8_t eNB_id);
 double sinr_eff_cqi_calc(PHY_VARS_UE *phy_vars_ue,
                          uint8_t eNB_id,
-                                                 uint8_t subframe);
+                         uint8_t subframe);
 
 uint8_t sinr2cqi(double sinr,uint8_t trans_mode);
 
 
 int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci);
 
-int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, UE_rxtx_proc_t *proc, char* buffer, int length, runmode_t mode, int input_level_dBm);
+int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, UE_rxtx_proc_t *proc, char *buffer, int length, runmode_t mode, int input_level_dBm);
 
 
 
@@ -1581,7 +1581,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **w
 
 void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
                         uint8_t subframe,
-                        int8_t* llr,
+                        int8_t *llr,
                         uint32_t length);
 
 
@@ -1590,7 +1590,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
                         int mbsfn_flag,
                         LTE_UE_DLSCH_t *dlsch,
                         int G,
-                        int16_t* llr,
+                        int16_t *llr,
                         uint8_t q,
                         uint8_t Ns);
 
@@ -1621,16 +1621,16 @@ void generate_pucch2x(int32_t **txdataF,
                       uint16_t rnti);
 
 void generate_pucch3x(int32_t **txdataF,
-                    LTE_DL_FRAME_PARMS *frame_parms,
-                    uint8_t ncs_cell[20][7],
-                    PUCCH_FMT_t fmt,
-                    PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
-                    uint16_t n3_pucch,
-                    uint8_t shortened_format,
-                    uint8_t *payload,
-                    int16_t amp,
-                    uint8_t subframe,
-                    uint16_t rnti);
+                      LTE_DL_FRAME_PARMS *frame_parms,
+                      uint8_t ncs_cell[20][7],
+                      PUCCH_FMT_t fmt,
+                      PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
+                      uint16_t n3_pucch,
+                      uint8_t shortened_format,
+                      uint8_t *payload,
+                      int16_t amp,
+                      uint8_t subframe,
+                      uint16_t rnti);
 
 void init_ulsch_power_LUT(void);
 
@@ -1688,11 +1688,11 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
   @param Xu DFT output
 */
 void compute_prach_seq(uint16_t rootSequenceIndex,
-		       uint8_t prach_ConfigIndex,
-		       uint8_t zeroCorrelationZoneConfig,
-		       uint8_t highSpeedFlag,
-		       lte_frame_type_t frame_type,
-		       uint32_t X_u[64][839]);
+                       uint8_t prach_ConfigIndex,
+                       uint8_t zeroCorrelationZoneConfig,
+                       uint8_t highSpeedFlag,
+                       lte_frame_type_t frame_type,
+                       uint32_t X_u[64][839]);
 
 
 void init_prach_tables(int N_ZC);
@@ -1741,9 +1741,9 @@ double computeRhoB_UE(PDSCH_CONFIG_DEDICATED  *pdsch_config_dedicated,
 */
 
 uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
-			     uint8_t prach_ConfigIndex,
-			     uint8_t n_ra_prboffset,
-			     uint8_t tdd_mapindex, uint16_t Nf);
+                             uint8_t prach_ConfigIndex,
+                             uint8_t n_ra_prboffset,
+                             uint8_t tdd_mapindex, uint16_t Nf);
 
 /**@}*/
 #endif
diff --git a/openair1/PHY/MODULATION/slot_fep_mbsfn.c b/openair1/PHY/MODULATION/slot_fep_mbsfn.c
index d34570f41245e27f40a098588705c43220ef1640..38d78119e3fefe839bd34a3e270dc4a73247b163 100644
--- a/openair1/PHY/MODULATION/slot_fep_mbsfn.c
+++ b/openair1/PHY/MODULATION/slot_fep_mbsfn.c
@@ -31,63 +31,55 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
                    unsigned char l,
                    int subframe,
                    int sample_offset,
-                   int no_prefix)
-{
- 
+                   int no_prefix) {
   LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
   LTE_UE_COMMON *common_vars   = &ue->common_vars;
   uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
-
   unsigned char aa;
   unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
   unsigned int nb_prefix_samples = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples);
   unsigned int nb_prefix_samples0 = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples0);
   unsigned int subframe_offset;
-
   //   int i;
   unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
   void (*dft)(int16_t *,int16_t *, int);
 
   switch (frame_parms->ofdm_symbol_size) {
+    case 128:
+      dft = dft128;
+      break;
 
-  case 128:
-    dft = dft128;
-    break;
+    case 256:
+      dft = dft256;
+      break;
 
-  case 256:
-    dft = dft256;
-    break;
+    case 512:
+      dft = dft512;
+      break;
 
-  case 512:
-    dft = dft512;
-    break;
+    case 1024:
+      dft = dft1024;
+      break;
 
-  case 1024:
-    dft = dft1024;
-    break;
+    case 1536:
+      dft = dft1536;
+      break;
 
-  case 1536:
-    dft = dft1536;
-    break;
+    case 2048:
+      dft = dft2048;
+      break;
 
-  case 2048:
-    dft = dft2048;
-    break;
-
-  default:
-    dft = dft512;
-    break;
+    default:
+      dft = dft512;
+      break;
   }
 
   if (no_prefix) {
     subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * subframe;
-
   } else {
     subframe_offset = frame_parms->samples_per_tti * subframe;
-
   }
 
-
   if (l<0 || l>=12) {
     LOG_E(PHY,"slot_fep_mbsfn: l must be between 0 and 11\n");
     return(-1);
@@ -106,20 +98,22 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
   }
 
 #ifdef DEBUG_FEP
-  LOG_D(PHY,"slot_fep_mbsfn: subframe %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, subframe_offset %d, sample_offset %d\n", subframe, l, nb_prefix_samples,nb_prefix_samples0,subframe_offset,
-      sample_offset);
+  LOG_D(PHY,"slot_fep_mbsfn: subframe %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, subframe_offset %d, sample_offset %d\n", subframe, l, nb_prefix_samples,nb_prefix_samples0,
+        subframe_offset,
+        sample_offset);
 #endif
 
   for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
     memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],0,frame_parms->ofdm_symbol_size*sizeof(int));
+
     if (l==0) {
 #if UE_TIMING_TRACE
-        start_meas(&ue->rx_dft_stats);
+      start_meas(&ue->rx_dft_stats);
 #endif
       dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
-          nb_prefix_samples0 +
-          subframe_offset -
-          SOFFSET) % frame_length_samples],
+                                              nb_prefix_samples0 +
+                                              subframe_offset -
+                                              SOFFSET) % frame_length_samples],
           (int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
 #if UE_TIMING_TRACE
       stop_meas(&ue->rx_dft_stats);
@@ -138,10 +132,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
       start_meas(&ue->rx_dft_stats);
 #endif
       dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
-          (frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
-          (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
-          subframe_offset-
-          SOFFSET) % frame_length_samples],
+                                              (frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
+                                              (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
+                                              subframe_offset-
+                                              SOFFSET) % frame_length_samples],
           (int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
 #if UE_TIMING_TRACE
       stop_meas(&ue->rx_dft_stats);
@@ -149,8 +143,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
     }
   }
 
-
-
   //if ((l==0) || (l==(4-frame_parms->Ncp))) {
   // changed to invoke MBSFN channel estimation in symbols 2,6,10
   if ((l==2)||(l==6)||(l==10)) {
@@ -159,7 +151,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
 #ifdef DEBUG_FEP
         LOG_D(PHY,"Channel estimation eNB %d, aatx %d, subframe %d, symbol %d\n",eNB_id,aa,subframe,l);
 #endif
-
         lte_dl_mbsfn_channel_estimation(ue,
                                         eNB_id,
                                         0,
@@ -183,7 +174,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
              l,
              symbol); */
         //  }
-
         // do frequency offset estimation here!
         // use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
 #ifdef DEBUG_FEP
@@ -205,72 +195,66 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
   return(0);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
-                      int subframe,
-                      int sample_offset)
-{
 
+int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
+                              int subframe,
+                              int sample_offset) {
   LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
   LTE_UE_COMMON *common_vars   = &ue->common_vars;
   uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
-
   unsigned char aa;
   //unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
   unsigned int nb_prefix_samples;
   int ofdm_symbol_size;
   unsigned int subframe_offset;
   unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
-
-void (*dft)(int16_t *,int16_t *, int);
-
+  void (*dft)(int16_t *,int16_t *, int);
   AssertFatal(frame_parms->frame_type == FDD, "Frame is TDD!\n");
 
   switch (frame_parms->ofdm_symbol_size) {
-
-  case 128:
-    dft = dft1536;
-    ofdm_symbol_size=1536;
-    nb_prefix_samples=384;
-    break;
-  case 256:
-    AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
-    dft = dft3072;
-    ofdm_symbol_size=3072;
-    nb_prefix_samples=768;
-    break;
-
-  case 512:
-    dft = dft6144;
-    nb_prefix_samples=1536;
-    ofdm_symbol_size=6144;
-    break;
-
-  case 1024:
-    dft = dft12288;
-    nb_prefix_samples=3072;
-    ofdm_symbol_size=12288;
-    break;
-
-  case 1536:
-    dft = dft18432;
-    nb_prefix_samples=4608;
-    ofdm_symbol_size=18432;
-    break;
-
-  case 2048:
-    dft = dft24576;
-    nb_prefix_samples=6144;
-    ofdm_symbol_size=24576;
-    break;
-
-  default:
-    AssertFatal(1==0,"Illegal ofdm symbol size %d\n",frame_parms->ofdm_symbol_size);
-    break;
+    case 128:
+      dft = dft1536;
+      ofdm_symbol_size=1536;
+      nb_prefix_samples=384;
+      break;
+
+    case 256:
+      AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
+      dft = dft3072;
+      ofdm_symbol_size=3072;
+      nb_prefix_samples=768;
+      break;
+
+    case 512:
+      dft = dft6144;
+      nb_prefix_samples=1536;
+      ofdm_symbol_size=6144;
+      break;
+
+    case 1024:
+      dft = dft12288;
+      nb_prefix_samples=3072;
+      ofdm_symbol_size=12288;
+      break;
+
+    case 1536:
+      dft = dft18432;
+      nb_prefix_samples=4608;
+      ofdm_symbol_size=18432;
+      break;
+
+    case 2048:
+      dft = dft24576;
+      nb_prefix_samples=6144;
+      ofdm_symbol_size=24576;
+      break;
+
+    default:
+      AssertFatal(1==0,"Illegal ofdm symbol size %d\n",frame_parms->ofdm_symbol_size);
+      break;
   }
 
   subframe_offset = frame_parms->samples_per_tti * subframe;
-
 #ifdef DEBUG_FEP
   LOG_D(PHY,"slot_fep_mbsfn125: subframe %d, nb_prefix_samples %d, subframe_offset %d, sample_offset %d\n", subframe, nb_prefix_samples,subframe_offset,
         sample_offset);
@@ -282,34 +266,30 @@ void (*dft)(int16_t *,int16_t *, int);
     start_meas(&ue->rx_dft_stats);
 #endif
     dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
-                                             nb_prefix_samples +
-                                             subframe_offset -
-                                             SOFFSET) % frame_length_samples],
+                                            nb_prefix_samples +
+                                            subframe_offset -
+                                            SOFFSET) % frame_length_samples],
         (int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][0],1);
-
 #if UE_TIMING_TRACE
     stop_meas(&ue->rx_dft_stats);
 #endif
   }
 
-  
   for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
     if (ue->perfect_ce == 0) {
 #ifdef DEBUG_FEP
       LOG_D(PHY,"Channel estimation eNB %d, aatx %d, subframe %d\n",eNB_id,aa,subframe);
 #endif
-        lte_dl_mbsfn_khz_1dot25_channel_estimation(ue,
-        eNB_id,
-        0,
-        subframe);
+      lte_dl_mbsfn_khz_1dot25_channel_estimation(ue,
+          eNB_id,
+          0,
+          subframe);
     }
- }
+  }
 
 #ifdef DEBUG_FEP
   LOG_D(PHY,"slot_fep_mbsfn: done\n");
 #endif
-
   return(0);
 }
-#endif
 
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
index 621318d2bc0849e66b0452bbd9423d852f47f5ba..f4f4ac8926630ecf8d5e397c5fc08d00d35ce119 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
@@ -347,14 +347,12 @@ int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t sub
   uint8_t prach_ConfigIndex  = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
   int prach_mask             = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe);
 
-#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int i;
 
   for (i=0;i<4;i++) {
     if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1) 
       prach_mask|=(is_prach_subframe0(frame_parms,frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],frame,subframe)<<(i+1));
   }
-#endif
   return(prach_mask);
 }
 #endif //0
diff --git a/openair1/PHY/TOOLS/cdot_prod.c b/openair1/PHY/TOOLS/cdot_prod.c
index 249475449acb4330be0b4b3ce01c1614ab13dd8a..d48517805317b7a279957560d0de5c8da4386252 100644
--- a/openair1/PHY/TOOLS/cdot_prod.c
+++ b/openair1/PHY/TOOLS/cdot_prod.c
@@ -169,7 +169,7 @@ int64_t dot_product64(int16_t *x,
 #if defined(__x86_64__) || defined(__i386__)
   __m128i *x128,*y128,mmtmp1,mmtmp2,mmtmp3,mmcumul,mmcumul_re,mmcumul_im;
   __m128i minus_i = _mm_set_epi16(-1,1,-1,1,-1,1,-1,1);
-  int32_t result;
+  int64_t result;
 
   x128 = (__m128i*) x;
   y128 = (__m128i*) y;
diff --git a/openair1/PHY/defs_L1_NB_IoT.h b/openair1/PHY/defs_L1_NB_IoT.h
index 4241a98ec74aeab8c13bce9479bc3931dfc5dcb4..f0fd7661c718f15df967e4ddddd482b3a016cacf 100644
--- a/openair1/PHY/defs_L1_NB_IoT.h
+++ b/openair1/PHY/defs_L1_NB_IoT.h
@@ -32,7 +32,7 @@
 #ifndef __PHY_DEFS_NB_IOT__H__
 #define __PHY_DEFS_NB_IOT__H__
 
-#define _GNU_SOURCE 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <malloc.h>
@@ -44,29 +44,29 @@
 //#include <complex.h>
 #include "assertions.h"
 #ifdef MEX
-# define msg mexPrintf
+  #define msg mexPrintf
 #else
-# ifdef OPENAIR2
-#   if ENABLE_RAL
-#     include "collection/hashtable/hashtable.h"
-#     include "COMMON/ral_messages_types.h"
-#     include "UTIL/queue.h"
-#   endif
-#   include "common/utils/LOG/log.h"
-#   define msg(aRGS...) LOG_D(PHY, ##aRGS)
-# else
-#   define msg printf
-# endif
+  #ifdef OPENAIR2
+    #if ENABLE_RAL
+      #include "collection/hashtable/hashtable.h"
+      #include "COMMON/ral_messages_types.h"
+      #include "UTIL/queue.h"
+    #endif
+    #include "common/utils/LOG/log.h"
+    #define msg(aRGS...) LOG_D(PHY, ##aRGS)
+  #else
+    #define msg printf
+  #endif
 #endif
 //use msg in the real-time thread context
 #define msg_nrt printf
 //use msg_nrt in the non real-time context (for initialization, ...)
 #ifndef malloc16
-#  ifdef __AVX2__
-#    define malloc16(x) memalign(32,x)
-#  else
-#    define malloc16(x) memalign(16,x)
-#  endif
+  #ifdef __AVX2__
+    #define malloc16(x) memalign(32,x)
+  #else
+    #define malloc16(x) memalign(16,x)
+  #endif
 #endif
 #define free16(y,x) free(y)
 #define bigmalloc malloc
@@ -423,10 +423,8 @@ typedef struct eNB_proc_NB_IoT_t_s {
   int RU_mask;
   /// mask for RUs serving nbiot (PRACH)
   int RU_mask_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mask for RUs serving eNB (PRACH)
   int RU_mask_prach_br;
-#endif
   /// parameters for turbo-decoding worker thread
   td_params_NB_IoT        tdp;
   /// parameters for turbo-encoding worker thread
@@ -469,7 +467,7 @@ typedef struct {
   pthread_mutex_t       mutex_rxtx;
   /// scheduling parameters for RXn-TXnp4 thread
   struct                sched_param sched_param_rxtx;
-  /// 
+  ///
   int                   sub_frame_start;
   ///
   int                   sub_frame_step;
@@ -567,10 +565,8 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
   uint32_t                      lte_gold_uespec_table[2][20][2][21];
   /// mbsfn reference symbols
   uint32_t                      lte_gold_mbsfn_table[10][3][42];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mbsfn reference symbols
   uint32_t                      lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
-#endif
   ///
   uint32_t                      X_u[64][839];
   ///
@@ -597,7 +593,8 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
   unsigned char                 cooperation_flag;                   // for cooperative communication
 
   unsigned char                 is_secondary_eNB;                   // primary by default
-  unsigned char                 is_init_sync;                       /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
+  unsigned char
+  is_init_sync;                       /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
   unsigned char                 has_valid_precoder;                 /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created.
   unsigned char                 PeNB_id;                            /// id of Primary eNB
   int                           rx_offset;                          /// Timing offset (used if is_secondary_eNB)
@@ -704,10 +701,10 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
   time_stats_t                       ulsch_tc_intl1_stats;
   time_stats_t                       ulsch_tc_intl2_stats;
 
-  #ifdef LOCALIZATION
+#ifdef LOCALIZATION
   /// time state for localization
   time_stats_t                       localization_stats;
-  #endif
+#endif
 
   int32_t                                   pucch1_stats_cnt[NUMBER_OF_UE_MAX_NB_IoT][10];
   int32_t                                   pucch1_stats[NUMBER_OF_UE_MAX_NB_IoT][10*1024];
@@ -843,13 +840,11 @@ typedef struct {
   uint32_t                        lte_gold_uespec_table[2][20][2][21];
   //mbsfn reference symbols
   uint32_t                        lte_gold_mbsfn_table[10][3][42];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mbsfn reference symbols
   uint32_t         lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
-#endif
   ///
   uint32_t                        X_u[64][839];
-  /// 
+  ///
   uint32_t                        high_speed_flag;
   uint32_t                        perfect_ce;
   int16_t                         ch_est_alpha;
@@ -859,66 +854,66 @@ typedef struct {
   ///
   char                            ulsch_no_allocation_counter[NUMBER_OF_CONNECTED_eNB_MAX];
 
-/*
+  /*
 
-  unsigned char ulsch_Msg3_active[NUMBER_OF_CONNECTED_eNB_MAX];
-  uint32_t  ulsch_Msg3_frame[NUMBER_OF_CONNECTED_eNB_MAX];
-  unsigned char ulsch_Msg3_subframe[NUMBER_OF_CONNECTED_eNB_MAX];
-  PRACH_RESOURCES_t *prach_resources[NUMBER_OF_CONNECTED_eNB_MAX];
-  int turbo_iterations, turbo_cntl_iterations;
-  /// \brief ?.
-  /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
-  uint32_t total_TBS[NUMBER_OF_CONNECTED_eNB_MAX];
-  /// \brief ?.
-  /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
-  uint32_t total_TBS_last[NUMBER_OF_CONNECTED_eNB_MAX];
-  /// \brief ?.
-  /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
-  uint32_t bitrate[NUMBER_OF_CONNECTED_eNB_MAX];
-  /// \brief ?.
-  /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
-  uint32_t total_received_bits[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_errors[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_errors_last[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_received[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_received_last[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_fer[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_SI_received[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_p_received[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_p_errors[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
-  int current_dlsch_cqi[NUMBER_OF_CONNECTED_eNB_MAX];
-  unsigned char first_run_timing_advance[NUMBER_OF_CONNECTED_eNB_MAX];
-  uint8_t               generate_prach;
-  uint8_t               prach_cnt;
-  uint8_t               prach_PreambleIndex;
-  //  uint8_t               prach_timer;
-  uint8_t               decode_SIB;
-  uint8_t               decode_MIB;
-  int              rx_offset; /// Timing offset
-  int              rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
-  int              timing_advance; ///timing advance signalled from eNB
-  int              hw_timing_advance;
-  int              N_TA_offset; ///timing offset used in TDD
-  /// Flag to tell if UE is secondary user (cognitive mode)
-  unsigned char    is_secondary_ue;
-  /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from.
-  unsigned char    has_valid_precoder;
-  /// hold the precoder for NULL beam to the primary eNB
-  int              **ul_precoder_S_UE;
-  /// holds the maximum channel/precoder coefficient
-  char             log2_maxp;
-*/
+    unsigned char ulsch_Msg3_active[NUMBER_OF_CONNECTED_eNB_MAX];
+    uint32_t  ulsch_Msg3_frame[NUMBER_OF_CONNECTED_eNB_MAX];
+    unsigned char ulsch_Msg3_subframe[NUMBER_OF_CONNECTED_eNB_MAX];
+    PRACH_RESOURCES_t *prach_resources[NUMBER_OF_CONNECTED_eNB_MAX];
+    int turbo_iterations, turbo_cntl_iterations;
+    /// \brief ?.
+    /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
+    uint32_t total_TBS[NUMBER_OF_CONNECTED_eNB_MAX];
+    /// \brief ?.
+    /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
+    uint32_t total_TBS_last[NUMBER_OF_CONNECTED_eNB_MAX];
+    /// \brief ?.
+    /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
+    uint32_t bitrate[NUMBER_OF_CONNECTED_eNB_MAX];
+    /// \brief ?.
+    /// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
+    uint32_t total_received_bits[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_errors[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_errors_last[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_received[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_received_last[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_fer[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_SI_received[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_p_received[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_p_errors[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
+    int current_dlsch_cqi[NUMBER_OF_CONNECTED_eNB_MAX];
+    unsigned char first_run_timing_advance[NUMBER_OF_CONNECTED_eNB_MAX];
+    uint8_t               generate_prach;
+    uint8_t               prach_cnt;
+    uint8_t               prach_PreambleIndex;
+    //  uint8_t               prach_timer;
+    uint8_t               decode_SIB;
+    uint8_t               decode_MIB;
+    int              rx_offset; /// Timing offset
+    int              rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
+    int              timing_advance; ///timing advance signalled from eNB
+    int              hw_timing_advance;
+    int              N_TA_offset; ///timing offset used in TDD
+    /// Flag to tell if UE is secondary user (cognitive mode)
+    unsigned char    is_secondary_ue;
+    /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from.
+    unsigned char    has_valid_precoder;
+    /// hold the precoder for NULL beam to the primary eNB
+    int              **ul_precoder_S_UE;
+    /// holds the maximum channel/precoder coefficient
+    char             log2_maxp;
+  */
   /// if ==0 enables phy only test mode
   int              mac_enabled;
   /// Flag to initialize averaging of PHY measurements
@@ -933,98 +928,98 @@ typedef struct {
   double           sinr_eff;
   /// N0 (used for abstraction)
   double           N0;
-/*
-  /// PDSCH Varaibles
-  PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// PUSCH Varaibles
-  PUSCH_CONFIG_DEDICATED pusch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// PUSCH contention-based access vars
-  PUSCH_CA_CONFIG_DEDICATED  pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
-
-  /// PUCCH variables
-
-  PUCCH_CONFIG_DEDICATED pucch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  uint8_t ncs_cell[20][7];
-
-  /// UL-POWER-Control
-  UL_POWER_CONTROL_DEDICATED ul_power_control_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// TPC
-  TPC_PDCCH_CONFIG tpc_pdcch_config_pucch[NUMBER_OF_CONNECTED_eNB_MAX];
-  TPC_PDCCH_CONFIG tpc_pdcch_config_pusch[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// CQI reporting
-  CQI_REPORT_CONFIG cqi_report_config[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// SRS Variables
-  SOUNDINGRS_UL_CONFIG_DEDICATED soundingrs_ul_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// Scheduling Request Config
-  SCHEDULING_REQUEST_CONFIG scheduling_request_config[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  /// Transmission mode per eNB
-  uint8_t transmission_mode[NUMBER_OF_CONNECTED_eNB_MAX];
-
-  time_stats_t phy_proc;
-  time_stats_t phy_proc_tx;
-  time_stats_t phy_proc_rx[2];
-
-  uint32_t use_ia_receiver;
-
-  time_stats_t ofdm_mod_stats;
-  time_stats_t ulsch_encoding_stats;
-  time_stats_t ulsch_modulation_stats;
-  time_stats_t ulsch_segmentation_stats;
-  time_stats_t ulsch_rate_matching_stats;
-  time_stats_t ulsch_turbo_encoding_stats;
-  time_stats_t ulsch_interleaving_stats;
-  time_stats_t ulsch_multiplexing_stats;
-
-  time_stats_t generic_stat;
-  time_stats_t pdsch_procedures_stat;
-  time_stats_t dlsch_procedures_stat;
-
-  time_stats_t ofdm_demod_stats;
-  time_stats_t dlsch_rx_pdcch_stats;
-  time_stats_t rx_dft_stats;
-  time_stats_t dlsch_channel_estimation_stats;
-  time_stats_t dlsch_freq_offset_estimation_stats;
-  time_stats_t dlsch_decoding_stats[2];
-  time_stats_t dlsch_demodulation_stats;
-  time_stats_t dlsch_rate_unmatching_stats;
-  time_stats_t dlsch_turbo_decoding_stats;
-  time_stats_t dlsch_deinterleaving_stats;
-  time_stats_t dlsch_llr_stats;
-  time_stats_t dlsch_unscrambling_stats;
-  time_stats_t dlsch_rate_matching_stats;
-  time_stats_t dlsch_turbo_encoding_stats;
-  time_stats_t dlsch_interleaving_stats;
-  time_stats_t dlsch_tc_init_stats;
-  time_stats_t dlsch_tc_alpha_stats;
-  time_stats_t dlsch_tc_beta_stats;
-  time_stats_t dlsch_tc_gamma_stats;
-  time_stats_t dlsch_tc_ext_stats;
-  time_stats_t dlsch_tc_intl1_stats;
-  time_stats_t dlsch_tc_intl2_stats;
-  time_stats_t tx_prach;
-
-  /// RF and Interface devices per CC
-  openair0_device rfdevice;
-  time_stats_t dlsch_encoding_SIC_stats;
-  time_stats_t dlsch_scrambling_SIC_stats;
-  time_stats_t dlsch_modulation_SIC_stats;
-  time_stats_t dlsch_llr_stripping_unit_SIC_stats;
-  time_stats_t dlsch_unscrambling_SIC_stats;
-
-#if ENABLE_RAL
-  hash_table_t    *ral_thresholds_timed;
-  SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
-  SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
-#endif
-*/
+  /*
+    /// PDSCH Varaibles
+    PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// PUSCH Varaibles
+    PUSCH_CONFIG_DEDICATED pusch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// PUSCH contention-based access vars
+    PUSCH_CA_CONFIG_DEDICATED  pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
+
+    /// PUCCH variables
+
+    PUCCH_CONFIG_DEDICATED pucch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    uint8_t ncs_cell[20][7];
+
+    /// UL-POWER-Control
+    UL_POWER_CONTROL_DEDICATED ul_power_control_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// TPC
+    TPC_PDCCH_CONFIG tpc_pdcch_config_pucch[NUMBER_OF_CONNECTED_eNB_MAX];
+    TPC_PDCCH_CONFIG tpc_pdcch_config_pusch[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// CQI reporting
+    CQI_REPORT_CONFIG cqi_report_config[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// SRS Variables
+    SOUNDINGRS_UL_CONFIG_DEDICATED soundingrs_ul_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// Scheduling Request Config
+    SCHEDULING_REQUEST_CONFIG scheduling_request_config[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    /// Transmission mode per eNB
+    uint8_t transmission_mode[NUMBER_OF_CONNECTED_eNB_MAX];
+
+    time_stats_t phy_proc;
+    time_stats_t phy_proc_tx;
+    time_stats_t phy_proc_rx[2];
+
+    uint32_t use_ia_receiver;
+
+    time_stats_t ofdm_mod_stats;
+    time_stats_t ulsch_encoding_stats;
+    time_stats_t ulsch_modulation_stats;
+    time_stats_t ulsch_segmentation_stats;
+    time_stats_t ulsch_rate_matching_stats;
+    time_stats_t ulsch_turbo_encoding_stats;
+    time_stats_t ulsch_interleaving_stats;
+    time_stats_t ulsch_multiplexing_stats;
+
+    time_stats_t generic_stat;
+    time_stats_t pdsch_procedures_stat;
+    time_stats_t dlsch_procedures_stat;
+
+    time_stats_t ofdm_demod_stats;
+    time_stats_t dlsch_rx_pdcch_stats;
+    time_stats_t rx_dft_stats;
+    time_stats_t dlsch_channel_estimation_stats;
+    time_stats_t dlsch_freq_offset_estimation_stats;
+    time_stats_t dlsch_decoding_stats[2];
+    time_stats_t dlsch_demodulation_stats;
+    time_stats_t dlsch_rate_unmatching_stats;
+    time_stats_t dlsch_turbo_decoding_stats;
+    time_stats_t dlsch_deinterleaving_stats;
+    time_stats_t dlsch_llr_stats;
+    time_stats_t dlsch_unscrambling_stats;
+    time_stats_t dlsch_rate_matching_stats;
+    time_stats_t dlsch_turbo_encoding_stats;
+    time_stats_t dlsch_interleaving_stats;
+    time_stats_t dlsch_tc_init_stats;
+    time_stats_t dlsch_tc_alpha_stats;
+    time_stats_t dlsch_tc_beta_stats;
+    time_stats_t dlsch_tc_gamma_stats;
+    time_stats_t dlsch_tc_ext_stats;
+    time_stats_t dlsch_tc_intl1_stats;
+    time_stats_t dlsch_tc_intl2_stats;
+    time_stats_t tx_prach;
+
+    /// RF and Interface devices per CC
+    openair0_device rfdevice;
+    time_stats_t dlsch_encoding_SIC_stats;
+    time_stats_t dlsch_scrambling_SIC_stats;
+    time_stats_t dlsch_modulation_SIC_stats;
+    time_stats_t dlsch_llr_stripping_unit_SIC_stats;
+    time_stats_t dlsch_unscrambling_SIC_stats;
+
+  #if ENABLE_RAL
+    hash_table_t    *ral_thresholds_timed;
+    SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
+    SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
+  #endif
+  */
 } PHY_VARS_UE_NB_IoT;
 
 
diff --git a/openair1/PHY/defs_RU.h b/openair1/PHY/defs_RU.h
index 8b8a4e13de2b04d7dfad76465b16d359c112895b..80d63cbdd9e307d56d8108f8cfd519def8b9bc62 100644
--- a/openair1/PHY/defs_RU.h
+++ b/openair1/PHY/defs_RU.h
@@ -67,14 +67,15 @@ typedef enum {
   ZEROS,
   NONE
 } Extension_t;
-	
+
 enum transmission_access_mode {
   NO_ACCESS=0,
   POSTPONED_ACCESS,
   CANCELED_ACCESS,
   UNKNOWN_ACCESS,
   SCHEDULED_ACCESS,
-  CBA_ACCESS};
+  CBA_ACCESS
+};
 
 typedef enum {
   eNodeB_3GPP=0,   // classical eNodeB function
@@ -122,8 +123,8 @@ typedef struct {
   /// \brief Holds output of the sync correlator.
   /// - first index: sample [0..samples_per_tti*10[
   uint32_t *sync_corr;
-  /// \brief Holds the tdd reciprocity calibration coefficients 
-  /// - first index: eNB id [0..2] (hard coded) 
+  /// \brief Holds the tdd reciprocity calibration coefficients
+  /// - first index: eNB id [0..2] (hard coded)
   /// - second index: tx antenna [0..nb_antennas_tx[
   /// - third index: frequency [0..]
   int32_t **tdd_calib_coeffs;
@@ -161,28 +162,18 @@ typedef struct RU_proc_t_s {
   int slot_feptx;
   /// subframe to act upon for reception of prach
   int subframe_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// subframe to act upon for reception of prach BL/CE UEs
   int subframe_prach_br;
-#endif
   /// frame to act upon for reception
   int frame_rx;
   /// frame to act upon for transmission
   int frame_tx;
-/*#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    /// subframe to act upon for transmission
-    int subframe_tx;
-    /// subframe to act upon for reception
-    int subframe_rx;
-#endif*/
   /// unwrapped frame count
   int frame_tx_unwrap;
   /// frame to act upon for reception of prach
   int frame_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// frame to act upon for reception of prach
   int frame_prach_br;
-#endif
   /// frame offset for slave RUs (to correct for frame asynchronism at startup)
   int frame_offset;
   /// \brief Instance count for FH processing thread.
@@ -191,10 +182,8 @@ typedef struct RU_proc_t_s {
   int instance_cnt_FH1;
   /// \internal This variable is protected by \ref mutex_prach.
   int instance_cnt_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// \internal This variable is protected by \ref mutex_prach.
   int instance_cnt_prach_br;
-#endif
   /// \internal This variable is protected by \ref mutex_synch.
   int instance_cnt_synch;
   /// \internal This variable is protected by \ref mutex_eNBs.
@@ -218,10 +207,8 @@ typedef struct RU_proc_t_s {
   pthread_t pthread_ctrl;
   /// pthread structure for RU prach processing thread
   pthread_t pthread_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// pthread structure for RU prach processing thread BL/CE UEs
   pthread_t pthread_prach_br;
-#endif
   /// pthread struct for RU synch thread
   pthread_t pthread_synch;
   /// pthread struct for RU RX FEP worker thread
@@ -243,10 +230,8 @@ typedef struct RU_proc_t_s {
   pthread_attr_t attr_ctrl;
   /// pthread attributes for RU prach
   pthread_attr_t attr_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// pthread attributes for RU prach BL/CE UEs
   pthread_attr_t attr_prach_br;
-#endif
   /// pthread attributes for RU synch thread
   pthread_attr_t attr_synch;
   /// pthread attributes for asynchronous RX thread
@@ -262,10 +247,8 @@ typedef struct RU_proc_t_s {
   struct sched_param sched_param_FH1;
   /// scheduling parameters for RU prach thread
   struct sched_param sched_param_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// scheduling parameters for RU prach thread BL/CE UEs
   struct sched_param sched_param_prach_br;
-#endif
   /// scheduling parameters for RU synch thread
   struct sched_param sched_param_synch;
   /// scheduling parameters for asynch_rxtx thread
@@ -275,10 +258,8 @@ typedef struct RU_proc_t_s {
   pthread_cond_t cond_FH1;
   /// condition variable for RU prach thread
   pthread_cond_t cond_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// condition variable for RU prach thread BL/CE UEs
   pthread_cond_t cond_prach_br;
-#endif
   /// condition variable for RU synch thread
   pthread_cond_t cond_synch;
   /// condition variable for asynch RX/TX thread
@@ -300,10 +281,8 @@ typedef struct RU_proc_t_s {
   pthread_mutex_t mutex_FH1;
   /// mutex for RU prach
   pthread_mutex_t mutex_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mutex for RU prach BL/CE UEs
   pthread_mutex_t mutex_prach_br;
-#endif
   /// mutex for RU synch
   pthread_mutex_t mutex_synch;
   /// mutex for eNB signal
@@ -370,7 +349,7 @@ typedef enum {
   REMOTE_IF4p5    =3,
   REMOTE_IF1pp    =4,
   MAX_RU_IF_TYPES =5
-  //EMULATE_RF      =6
+                   //EMULATE_RF      =6
 } RU_if_south_t;
 
 
@@ -394,7 +373,7 @@ typedef enum {
 } rru_cmd_t;
 
 
-typedef struct RU_t_s{
+typedef struct RU_t_s {
   /// index of this ru
   uint32_t idx;
   /// Pointer to configuration file
@@ -410,7 +389,7 @@ typedef struct RU_t_s{
   /// flag to indicate the RU is in synch with a master reference
   int in_synch;
   /// timing offset
-  int rx_offset;        
+  int rx_offset;
   /// south in counter
   int south_in_cnt;
   /// south out counter
@@ -509,10 +488,8 @@ typedef struct RU_t_s{
   /// function pointer to wakeup routine in lte-enb/nr-gnb.
   void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
   void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru, int frame, int subframe);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// function pointer to wakeup routine in lte-enb.
   void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
-#endif
 
   /// function pointer to NB entry routine
   void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string, struct RU_t_s *ru);
@@ -533,7 +510,7 @@ typedef struct RU_t_s{
   /// Timing statistics (RX Fronthaul + Compression)
   time_stats_t rx_fhaul;
   /// Timing statistics (TX Fronthaul + Compression)
-  time_stats_t tx_fhaul; 
+  time_stats_t tx_fhaul;
   /// Timong statistics (Compression)
   time_stats_t compression;
   /// Timing statistics (Fronthaul transport)
@@ -545,9 +522,9 @@ typedef struct RU_t_s{
   int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15];
   /// beamforming weight vectors per gNB
   int32_t **nrbeam_weights[NUMBER_OF_gNB_MAX+1][16];
-  /// received frequency-domain signal for PRACH (IF4p5 RRU) 
+  /// received frequency-domain signal for PRACH (IF4p5 RRU)
   int16_t **prach_rxsigF;
-  /// received frequency-domain signal for PRACH BR (IF4p5 RRU) 
+  /// received frequency-domain signal for PRACH BR (IF4p5 RRU)
   int16_t **prach_rxsigF_br[4];
   /// sequence number for IF5
   uint8_t seqno;
@@ -620,7 +597,7 @@ typedef struct RRU_capabilities_s {
   /// Number of RX ports of each band
   uint8_t          nb_rx[MAX_BANDS_PER_RRU];
   /// Number of TX ports of each band
-  uint8_t          nb_tx[MAX_BANDS_PER_RRU]; 
+  uint8_t          nb_tx[MAX_BANDS_PER_RRU];
   /// max DL bandwidth (1,6,15,25,50,75,100)
   uint8_t          N_RB_DL[MAX_BANDS_PER_RRU];
   /// max UL bandwidth (1,6,15,25,50,75,100)
@@ -657,13 +634,11 @@ typedef struct RRU_config_s {
   int prach_FreqOffset[MAX_BANDS_PER_RRU];
   /// prach_ConfigIndex for IF4p5
   int prach_ConfigIndex[MAX_BANDS_PER_RRU];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int emtc_prach_CElevel_enable[MAX_BANDS_PER_RRU][4];
   /// emtc_prach_FreqOffset for IF4p5 per CE Level
   int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4];
   /// emtc_prach_ConfigIndex for IF4p5 per CE Level
   int emtc_prach_ConfigIndex[MAX_BANDS_PER_RRU][4];
-#endif
   /// mutex for asynch RX/TX thread
   pthread_mutex_t mutex_asynch_rxtx;
   /// mutex for RU access to eNB processing (PDSCH/PUSCH)
diff --git a/openair1/PHY/defs_UE.h b/openair1/PHY/defs_UE.h
index 7d3a730bc4ad16dae31c18c4cc969dfaa2f9886a..2dffd09131b671340f29f6303036e1e1fcea35de 100644
--- a/openair1/PHY/defs_UE.h
+++ b/openair1/PHY/defs_UE.h
@@ -70,34 +70,34 @@
 #include "assertions.h"
 
 #ifdef MEX
-#include "mex.h"
-# define msg mexPrintf
-# undef LOG_D
-# undef LOG_E
-# undef LOG_I
-# undef LOG_N
-# undef LOG_T
-# undef LOG_W
-# undef LOG_M
-# define LOG_D(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_E(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_I(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_N(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_T(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
-# define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
+  #include "mex.h"
+  #define msg mexPrintf
+  #undef LOG_D
+  #undef LOG_E
+  #undef LOG_I
+  #undef LOG_N
+  #undef LOG_T
+  #undef LOG_W
+  #undef LOG_M
+  #define LOG_D(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_E(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_I(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_N(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_T(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
+  #define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
 #else
-# ifdef OPENAIR2
-#   if ENABLE_RAL
-#     include "collection/hashtable/hashtable.h"
-#     include "COMMON/ral_messages_types.h"
-#     include "UTIL/queue.h"
-#   endif
-#   include "common/utils/LOG/log.h"
-#   define msg(aRGS...) LOG_D(PHY, ##aRGS)
-# else
-#   define msg printf
-# endif
+  #ifdef OPENAIR2
+    #if ENABLE_RAL
+      #include "collection/hashtable/hashtable.h"
+      #include "COMMON/ral_messages_types.h"
+      #include "UTIL/queue.h"
+    #endif
+    #include "common/utils/LOG/log.h"
+    #define msg(aRGS...) LOG_D(PHY, ##aRGS)
+  #else
+    #define msg printf
+  #endif
 #endif
 
 
@@ -139,7 +139,7 @@ typedef struct {
   //pthread_t pthread_slot0_dl_processing;
   pthread_t pthread_slot1_dl_processing;
   /// pthread attributes for fep_slot1 processing thread
- // pthread_attr_t attr_slot0_dl_processing;
+  // pthread_attr_t attr_slot0_dl_processing;
   pthread_attr_t attr_slot1_dl_processing;
   /// condition variable for UE fep_slot1 thread;
   //pthread_cond_t cond_slot0_dl_processing;
@@ -195,21 +195,21 @@ typedef struct {
 
 /// Structure holding timer_thread related elements (phy_stub_UE mode)
 typedef struct {
-	pthread_t pthread_timer;
-	/// mutex for waiting SF ticking
-	pthread_mutex_t mutex_ticking;
-	/// \brief ticking var for ticking thread.
-	/// \internal This variable is protected by \ref mutex_ticking.
-	int ticking_var;
-	/// condition variable for timer_thread;
-	pthread_cond_t cond_ticking;
-	//time_stats_t timer_stats;
-
-	// below 3 members is used for waiting each UE threads(multiple UEs test) in L2 FAPI simulator.
-	// This used in UE_phy_stub_single_thread_rxn_txnp4
-	pthread_mutex_t mutex_single_thread;
-	pthread_cond_t  cond_single_thread;
-	int             num_single_thread[NUMBER_OF_UE_MAX];
+  pthread_t pthread_timer;
+  /// mutex for waiting SF ticking
+  pthread_mutex_t mutex_ticking;
+  /// \brief ticking var for ticking thread.
+  /// \internal This variable is protected by \ref mutex_ticking.
+  int ticking_var;
+  /// condition variable for timer_thread;
+  pthread_cond_t cond_ticking;
+  //time_stats_t timer_stats;
+
+  // below 3 members is used for waiting each UE threads(multiple UEs test) in L2 FAPI simulator.
+  // This used in UE_phy_stub_single_thread_rxn_txnp4
+  pthread_mutex_t mutex_single_thread;
+  pthread_cond_t  cond_single_thread;
+  int             num_single_thread[NUMBER_OF_UE_MAX];
 } SF_ticking;
 
 typedef struct {
@@ -323,7 +323,7 @@ typedef struct {
   /// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
   /// - third index: samples? [0..2*ofdm_symbol_size[
   int32_t **dl_ch_estimates_time[7];
-}LTE_UE_COMMON_PER_THREAD;
+} LTE_UE_COMMON_PER_THREAD;
 
 typedef struct {
   /// \brief Holds the transmit data in time domain.
@@ -425,9 +425,9 @@ typedef struct {
   int16_t *llr[2];
   /// \f$\log_2(\max|H_i|^2)\f$
   int16_t log2_maxh;
-    /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer1 channel compensation
+  /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer1 channel compensation
   int16_t log2_maxh0;
-    /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer2 channel commpensation
+  /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer2 channel commpensation
   int16_t log2_maxh1;
   /// \brief LLR shifts for subband scaling.
   /// - first index: ? [0..168*N_RB_DL[
@@ -601,7 +601,8 @@ typedef enum {
   /// detect only uplink DCIs in the current subframe
   DL_DCI = 0x2,
   /// detect both uplink and downlink DCIs in the current subframe
-  UL_DL_DCI = 0x3} dci_detect_mode_t;
+  UL_DL_DCI = 0x3
+} dci_detect_mode_t;
 
 typedef struct UE_SCAN_INFO_s {
   /// 10 best amplitudes (linear) for each pss signals
@@ -621,11 +622,8 @@ typedef struct {
   //uint8_t local_flag;
   /// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
   runmode_t mode;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// \brief Indicator that UE is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO)
   int FeMBMS_active;
-#endif
   /// \brief Indicator that UE should perform band scanning
   int UE_scan;
   /// \brief Indicator that UE should perform coarse scanning around carrier
@@ -708,10 +706,8 @@ typedef struct {
 
   /// mbsfn reference symbols
   uint32_t lte_gold_mbsfn_table[10][3][42];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mbsfn reference symbols
   uint32_t         lte_gold_mbsfn_khz_1dot25_table[10][150];
-#endif
 
   uint32_t X_u[64][839];
 
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index ed98232572aa0f65ab62c8aad737efd24297a8b6..792c78675d821b38c2458116163fbd9ed80529ff 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -35,7 +35,7 @@
 
 
 #ifndef _GNU_SOURCE
-#define _GNU_SOURCE
+  #define _GNU_SOURCE
 #endif
 #include <sched.h>
 #include <stdio.h>
@@ -61,7 +61,7 @@
 //#include <complex.h>
 #include "PHY/TOOLS/time_meas.h"
 #include "platform_types.h"
-#define MAX_NUM_RU_PER_eNB 64 
+#define MAX_NUM_RU_PER_eNB 64
 
 #include <pthread.h>
 
@@ -156,7 +156,6 @@ typedef struct {
   PRACH_CONFIG_INFO prach_ConfigInfo;
 } PRACH_CONFIG_COMMON;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 /// PRACH-eMTC-Config from 36.331 RRC spec
 typedef struct {
   /// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
@@ -173,7 +172,7 @@ typedef struct {
   uint8_t prach_ConfigIndex[4];
   /// indicator for CE level activation
   uint8_t prach_CElevel_enable[4];
-  /// prach frequency offset for each CE level 
+  /// prach frequency offset for each CE level
   uint8_t prach_FreqOffset[4];
   /// indicator for CE level hopping activation
   uint8_t prach_hopping_enable[4];
@@ -188,12 +187,9 @@ typedef struct {
   /// prach_Config_enabled=1 means enabled. \vr{[0..1]}
   uint8_t prach_Config_enabled;
   /// PRACH Configuration Information
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
-#endif  
 } PRACH_eMTC_CONFIG_COMMON;
 
-#endif
 
 /// Enumeration for parameter \f$N_\text{ANRep}\f$ \ref PUCCH_CONFIG_DEDICATED::repetitionFactor.
 typedef enum {
@@ -575,14 +571,11 @@ typedef struct {
   int mbsfn_SubframeConfig;
 } MBSFN_config_t;
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 typedef struct {
   int radioframeAllocationPeriod;
   int radioframeAllocationOffset;
   int non_mbsfn_SubframeConfig;
 } NonMBSFN_config_t;
-#endif
 
 
 typedef struct LTE_DL_FRAME_PARMS {
@@ -628,29 +621,21 @@ typedef struct LTE_DL_FRAME_PARMS {
   uint8_t threequarter_fs;
   /// Size of FFT
   uint16_t ofdm_symbol_size;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t FeMBMS_active;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// Size of FFT
   uint16_t ofdm_symbol_size_khz_1dot25;
-#endif
   /// Number of prefix samples in all but first symbol of slot
   uint16_t nb_prefix_samples;
   /// Number of prefix samples in first symbol of slot
   uint16_t nb_prefix_samples0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
- /// Number of prefix samples in all but first symbol of slot
+  /// Number of prefix samples in all but first symbol of slot
   uint16_t nb_prefix_samples_khz_1dot25;
   /// Number of prefix samples in first symbol of slot
   uint16_t nb_prefix_samples0_khz_1dot25;
-#endif
   /// Carrier offset in FFT buffer for first RE in PRB0
   uint16_t first_carrier_offset;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// Carrier offset in FFT buffer for first RE in PRB0 (FeMBMS
   uint16_t first_carrier_offset_khz_1dot25;
-#endif
   /// Number of samples in a subframe
   uint32_t samples_per_tti;
   /// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
@@ -667,10 +652,8 @@ typedef struct LTE_DL_FRAME_PARMS {
   uint8_t nb_antenna_ports_eNB;
   /// PRACH_CONFIG
   PRACH_CONFIG_COMMON prach_config_common;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// PRACH_eMTC_CONFIG
   PRACH_eMTC_CONFIG_COMMON prach_emtc_config_common;
-#endif
   /// PUCCH Config Common (from 36-331 RRC spec)
   PUCCH_CONFIG_COMMON pucch_config_common;
   /// PDSCH Config Common (from 36-331 RRC spec)
@@ -687,10 +670,8 @@ typedef struct LTE_DL_FRAME_PARMS {
   int num_MBSFN_config;
   /// Array of MBSFN Configurations (max 8 (maxMBSFN-Allocations) elements as per 36.331)
   MBSFN_config_t MBSFN_config[8];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t NonMBSFN_config_flag;
   NonMBSFN_config_t NonMBSFN_config;
-#endif
   /// Maximum Number of Retransmissions of RRCConnectionRequest (from 36-331 RRC Spec)
   uint8_t maxHARQ_Msg3Tx;
   /// Size of SI windows used for repetition of one SI message (in frames)
@@ -705,9 +686,7 @@ typedef struct LTE_DL_FRAME_PARMS {
   uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
 
   struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   struct NonMBSFN_SubframeConfig *non_mbsfn_SubframeConfig;
-#endif
   /// for fair RR scheduler
   uint32_t ue_multiple_max;
 } LTE_DL_FRAME_PARMS;
@@ -808,7 +787,7 @@ typedef struct {
   rnti_t rnti;
   /// Format
   DCI_format_t format;
-  /// epdcch resource assignment (0=localized,1=distributed) 
+  /// epdcch resource assignment (0=localized,1=distributed)
   uint8_t epdcch_resource_assignment_flag;
   /// epdcch index
   uint16_t epdcch_id;
@@ -817,7 +796,7 @@ typedef struct {
   /// epdcch number of PRBs in set
   uint8_t epdcch_num_prb;
   /// vector of prb ids for set
-  uint8_t epdcch_prb_index[MAX_EPDCCH_PRB];  
+  uint8_t epdcch_prb_index[MAX_EPDCCH_PRB];
   /// LBT parameter for frame configuration
   uint8_t dwpts_symbols;
   /// LBT parameter for frame configuration
@@ -825,7 +804,7 @@ typedef struct {
   /// DCI pdu
   uint8_t dci_pdu[8];
 } eDCI_ALLOC_t;
- 
+
 typedef struct {
   /// Length of DCI in bits
   uint8_t dci_length;
@@ -849,7 +828,7 @@ typedef struct {
   uint8_t number_of_prb_pairs;
   /// mpdcch resource assignment (combinatorial index r)
   uint8_t resource_block_assignment;
-  /// transmission type (0=localized,1=distributed) 
+  /// transmission type (0=localized,1=distributed)
   uint8_t transmission_type;
   /// mpdcch start symbol
   uint8_t start_symbol;
@@ -898,9 +877,9 @@ typedef enum {
   RESYNCH=4
 } UE_MODE_t;
 
-#define FOREACH_PARALLEL(GEN)		\
-  GEN(PARALLEL_SINGLE_THREAD)		\
-  GEN(PARALLEL_RU_L1_SPLIT)			\
+#define FOREACH_PARALLEL(GEN)   \
+  GEN(PARALLEL_SINGLE_THREAD)   \
+  GEN(PARALLEL_RU_L1_SPLIT)     \
   GEN(PARALLEL_RU_L1_TRX_SPLIT)
 
 #define GENERATE_ENUM(N) N,
@@ -913,7 +892,7 @@ typedef enum {
 #define FOREACH_WORKER(GEN) GEN(WORKER_DISABLE) GEN(WORKER_ENABLE)
 typedef enum {
   FOREACH_WORKER(GENERATE_ENUM)
-}WORKER_CONF_t;
+} WORKER_CONF_t;
 
 typedef struct THREAD_STRUCT_s {
   PARALLEL_CONF_t  parallel_conf;
@@ -1005,19 +984,19 @@ extern int sync_var;
 
 typedef uint8_t(decoder_if_t)(int16_t *y,
                               int16_t *y2,
-							  uint8_t *decoded_bytes,
-							  uint8_t *decoded_bytes2,
-							  uint16_t n,
-							  uint8_t max_iterations,
-							  uint8_t crc_type,
-							  uint8_t F,
-							  time_stats_t *init_stats,
-							  time_stats_t *alpha_stats,
-							  time_stats_t *beta_stats,
-							  time_stats_t *gamma_stats,
-							  time_stats_t *ext_stats,
-							  time_stats_t *intl1_stats,
-							  time_stats_t *intl2_stats);
+                              uint8_t *decoded_bytes,
+                              uint8_t *decoded_bytes2,
+                              uint16_t n,
+                              uint8_t max_iterations,
+                              uint8_t crc_type,
+                              uint8_t F,
+                              time_stats_t *init_stats,
+                              time_stats_t *alpha_stats,
+                              time_stats_t *beta_stats,
+                              time_stats_t *gamma_stats,
+                              time_stats_t *ext_stats,
+                              time_stats_t *intl1_stats,
+                              time_stats_t *intl2_stats);
 
 typedef uint8_t(encoder_if_t)(uint8_t *input,
                               uint16_t input_length_bytes,
@@ -1025,18 +1004,15 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
                               uint8_t F);
 
 
-static inline void wait_sync(char *thread_name)
-{
+static inline void wait_sync(char *thread_name) {
   int rc;
-
   printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex);
   AssertFatal((rc = pthread_mutex_lock( &sync_mutex ))==0,"sync mutex lock error");
-  
+
   while (sync_var<0)
     pthread_cond_wait( &sync_cond, &sync_mutex );
-  
+
   AssertFatal((rc = pthread_mutex_unlock( &sync_mutex ))==0,"sync mutex unlock error");
-  
   printf( "got sync (%s)\n", thread_name);
   /*
    * Raphael Defosseux: added for CI to get faster the got sync message.
@@ -1051,24 +1027,22 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,
                                 int *instance_cnt,
                                 char *name,
                                 int sleeptime,
-                                int sleep_cnt_max)
-{
+                                int sleep_cnt_max) {
   int rc;
   int sleep_cnt=0;
-
   AssertFatal((rc = pthread_mutex_lock(mutex))==0,"wakeup_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
 
   while (*instance_cnt == 0) {
-
     AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"wakeup_thread(): error unlocking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
-
     sleep_cnt++;
+
     if (sleep_cnt>sleep_cnt_max) return(-1);
+
     usleep(sleeptime);
     AssertFatal((rc = pthread_mutex_lock(mutex))==0,"wakeup_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
   }
-  *instance_cnt = *instance_cnt + 1;
 
+  *instance_cnt = *instance_cnt + 1;
   AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"wakeup_thread(): error unlocking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
 
   // the thread can now be woken up
@@ -1084,33 +1058,31 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,
 
 
 static inline int timedwait_on_condition(pthread_mutex_t *mutex,
-                                         pthread_cond_t *cond,
-                                         int *instance_cnt,
-                                         char *name,
-                                         uint32_t time_ns)
-{
+    pthread_cond_t *cond,
+    int *instance_cnt,
+    char *name,
+    uint32_t time_ns) {
   int rc;
   int waitret=0;
   struct timespec now, abstime;
-
   AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] timedwait_on_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
 
   while (*instance_cnt < 0) {
-	clock_gettime(CLOCK_REALTIME, &now);
+    clock_gettime(CLOCK_REALTIME, &now);
     // most of the time the thread is waiting here
     // proc->instance_cnt_rxtx is -1
     abstime.tv_sec = now.tv_sec;
     abstime.tv_nsec = now.tv_nsec + time_ns;
-    if (abstime.tv_nsec >= 1000*1000*1000)
-    {
+
+    if (abstime.tv_nsec >= 1000*1000*1000) {
       abstime.tv_nsec -= 1000*1000*1000;
       abstime.tv_sec  += 1;
     }
+
     if ((waitret = pthread_cond_timedwait(cond,mutex,&abstime)) == 0) break; // this unlocks mutex_rxtx while waiting and then locks it again
   }
 
   AssertFatal((rc = pthread_mutex_unlock(mutex)) == 0,"[SCHED][eNB] timedwait_on_condition(): error unlocking mutex return %d for %s\n", rc, name);
-
   return(waitret);
 }
 
@@ -1118,10 +1090,8 @@ static inline int timedwait_on_condition(pthread_mutex_t *mutex,
 static inline int wait_on_condition(pthread_mutex_t *mutex,
                                     pthread_cond_t *cond,
                                     int *instance_cnt,
-                                    char *name)
-{
+                                    char *name) {
   int rc;
-
   AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] wait_on_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
 
   while (*instance_cnt < 0) {
@@ -1131,16 +1101,14 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,
   }
 
   AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] wait_on_condition(): error unlocking mutex return %d for %s\n", rc, name);
-
   return(0);
 }
 
 
 static inline int wait_on_busy_condition(pthread_mutex_t *mutex,
-                                         pthread_cond_t *cond,
-                                         int *instance_cnt,
-                                         char *name)
-{
+    pthread_cond_t *cond,
+    int *instance_cnt,
+    char *name) {
   int rc;
   AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
 
@@ -1151,23 +1119,17 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,
   }
 
   AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] wait_on_busy_condition(): error unlocking mutex return %d for %s\n", rc, name);
-
   return(0);
 }
 
 
 static inline int release_thread(pthread_mutex_t *mutex,
                                  int *instance_cnt,
-                                 char *name)
-{
+                                 char *name) {
   int rc;
-
   AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] release_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
-
   *instance_cnt=-1;
-
   AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] release_thread(): error unlocking mutex return %d for %s\n", rc, name);
-
   return(0);
 }
 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 314d6cc31bd6755ccc1fd5a666c7ef3c05f732f7..943dd672e288127ad38ef434e5945733159f0502 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -34,7 +34,7 @@
 
 
 #ifndef _GNU_SOURCE
-#define _GNU_SOURCE
+  #define _GNU_SOURCE
 #endif
 
 #include <execinfo.h>
@@ -90,7 +90,7 @@ typedef struct {
 
 typedef struct {
   uint8_t     num_dci;
-  uint8_t     num_pdcch_symbols; 
+  uint8_t     num_pdcch_symbols;
   DCI_ALLOC_t dci_alloc[32];
 } LTE_eNB_PDCCH;
 
@@ -115,7 +115,7 @@ typedef struct {
   uint8_t     num_dci;
   /// MPDCCH DCI allocations from MAC
   mDCI_ALLOC_t mdci_alloc[32];
-  // MAX SIZE of an EPDCCH set is 16EREGs * 9REs/EREG * 8 PRB pairs = 2304 bits 
+  // MAX SIZE of an EPDCCH set is 16EREGs * 9REs/EREG * 8 PRB pairs = 2304 bits
   uint8_t e[2304];
 } LTE_eNB_MPDCCH;
 
@@ -195,12 +195,10 @@ typedef struct {
   int32_t **prach_ifft[4];
 
   /// repetition number
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// indicator of first frame in a group of PRACH repetitions
   int first_frame[4];
   /// current repetition for each CE level
   int repetition_number[4];
-#endif
 } LTE_eNB_PRACH;
 
 /// Context data structure for RX/TX portion of subframe processing
@@ -282,30 +280,24 @@ typedef struct L1_proc_t_s {
   int subframe_rx;
   /// subframe to act upon for PRACH
   int subframe_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// subframe to act upon for reception of prach BL/CE UEs
   int subframe_prach_br;
-#endif
   /// frame to act upon for reception
   int frame_rx;
   /// frame to act upon for transmission
   int frame_tx;
   /// frame to act upon for PRACH
   int frame_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// frame to act upon for PRACH BL/CE UEs
   int frame_prach_br;
-#endif
   /// \internal This variable is protected by \ref mutex_td.
   int instance_cnt_td;
   /// \internal This variable is protected by \ref mutex_te.
   int instance_cnt_te;
   /// \internal This variable is protected by \ref mutex_prach.
   int instance_cnt_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// \internal This variable is protected by \ref mutex_prach for BL/CE UEs.
   int instance_cnt_prach_br;
-#endif
   // instance count for over-the-air eNB synchronization
   int instance_cnt_synch;
 
@@ -326,10 +318,8 @@ typedef struct L1_proc_t_s {
   pthread_attr_t attr_single;
   /// pthread attributes for prach processing thread
   pthread_attr_t attr_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// pthread attributes for prach processing thread BL/CE UEs
   pthread_attr_t attr_prach_br;
-#endif
   /// pthread attributes for asynchronous RX thread
   pthread_attr_t attr_asynch_rxtx;
   /// scheduling parameters for parallel turbo-decoder thread
@@ -340,10 +330,8 @@ typedef struct L1_proc_t_s {
   struct sched_param sched_param_single;
   /// scheduling parameters for prach thread
   struct sched_param sched_param_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// scheduling parameters for prach thread
   struct sched_param sched_param_prach_br;
-#endif
   /// scheduling parameters for asynch_rxtx thread
   struct sched_param sched_param_asynch_rxtx;
   /// pthread structure for parallel turbo-decoder thread
@@ -352,21 +340,16 @@ typedef struct L1_proc_t_s {
   pthread_t pthread_te;
   /// pthread structure for PRACH thread
   pthread_t pthread_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// pthread structure for PRACH thread BL/CE UEs
   pthread_t pthread_prach_br;
-#endif
   /// condition variable for parallel turbo-decoder thread
   pthread_cond_t cond_td;
   /// condition variable for parallel turbo-encoder thread
   pthread_cond_t cond_te;
   /// condition variable for PRACH processing thread;
   pthread_cond_t cond_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// condition variable for PRACH processing thread BL/CE UEs;
   pthread_cond_t cond_prach_br;
-#endif
-
   /// condition variable for asynch RX/TX thread
   pthread_cond_t cond_asynch_rxtx;
   /// mutex for parallel turbo-decoder thread
@@ -375,10 +358,8 @@ typedef struct L1_proc_t_s {
   pthread_mutex_t mutex_te;
   /// mutex for PRACH thread
   pthread_mutex_t mutex_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mutex for PRACH thread for BL/CE UEs
   pthread_mutex_t mutex_prach_br;
-#endif
   /// mutex for asynch RX/TX thread
   pthread_mutex_t mutex_asynch_rxtx;
   /// mutex for RU access to eNB processing (PDSCH/PUSCH)
@@ -399,10 +380,8 @@ typedef struct L1_proc_t_s {
   time_stats_t ru_arrival_time;
   /// mask for RUs serving eNB (PRACH)
   int RU_mask_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mask for RUs serving eNB (PRACH)
   int RU_mask_prach_br;
-#endif
   /// parameters for turbo-decoding worker thread
   td_params tdp;
   /// parameters for turbo-encoding worker thread
@@ -508,18 +487,14 @@ typedef struct PHY_VARS_eNB_s {
   nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU];
   /// NFAPI PRACH information
   nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// NFAPI PRACH information BL/CE UEs
   nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES];
-#endif
   Sched_Rsp_t          Sched_INFO;
   LTE_eNB_PDCCH        pdcch_vars[2];
   LTE_eNB_PHICH        phich_vars[2];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_eNB_EPDCCH       epdcch_vars[2];
   LTE_eNB_MPDCCH       mpdcch_vars[2];
   LTE_eNB_PRACH        prach_vars_br;
-#endif
   LTE_eNB_COMMON       common_vars;
   LTE_eNB_UCI          uci_vars[NUMBER_OF_UCI_VARS_MAX];
   LTE_eNB_SRS          srs_vars[NUMBER_OF_UE_MAX];
@@ -545,10 +520,8 @@ typedef struct PHY_VARS_eNB_s {
 
   /// mbsfn reference symbols
   uint32_t         lte_gold_mbsfn_table[10][3][42];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// mbsfn reference symbols
   uint32_t         lte_gold_mbsfn_khz_1dot25_table[10][150];
-#endif
 
   // PRACH energy detection parameters
   /// Detection threshold for LTE PRACH
@@ -567,9 +540,7 @@ typedef struct PHY_VARS_eNB_s {
   int              pucch1ab_DTX_threshold_emtc[4];
 
   uint32_t X_u[64][839];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t X_u_br[4][64][839];
-#endif
   uint8_t pbch_configured;
   uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE
   char eNB_generate_rar;
diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c
index e5f2420b0309c4bca3f893692b89c191b5f2f5aa..e8b422a157536397048c7488cbb9ea1d701de6fe 100644
--- a/openair1/SCHED/fapi_l1.c
+++ b/openair1/SCHED/fapi_l1.c
@@ -61,7 +61,6 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
         proc->subframe_tx, idx, pdcch_vars->num_dci);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
 void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
                              L1_rxtx_proc_t *proc,
@@ -77,7 +76,6 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
   fill_mdci_and_dlsch(eNB,proc,&mpdcch_vars->mdci_alloc[mpdcch_vars->num_dci],pdu);
 }
 
-#endif
 
 void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
                                   nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu) {
@@ -122,7 +120,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt
   phich->config[phich->num_hi].n_DMRS   = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
   phich->num_hi++;
   AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
-
 }
 
 void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
@@ -140,28 +137,24 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
   // adjust transmit amplitude here based on NFAPI info
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  extern uint32_t localRIV2alloc_LUT6[32];
-  extern uint32_t localRIV2alloc_LUT25[512];
-  extern uint32_t localRIV2alloc_LUT50_0[1600];
-  extern uint32_t localRIV2alloc_LUT50_1[1600];
-  extern uint32_t localRIV2alloc_LUT100_0[6000];
-  extern uint32_t localRIV2alloc_LUT100_1[6000];
-  extern uint32_t localRIV2alloc_LUT100_2[6000];
-  extern uint32_t localRIV2alloc_LUT100_3[6000];
-#endif
+
+extern uint32_t localRIV2alloc_LUT6[32];
+extern uint32_t localRIV2alloc_LUT25[512];
+extern uint32_t localRIV2alloc_LUT50_0[1600];
+extern uint32_t localRIV2alloc_LUT50_1[1600];
+extern uint32_t localRIV2alloc_LUT100_0[6000];
+extern uint32_t localRIV2alloc_LUT100_1[6000];
+extern uint32_t localRIV2alloc_LUT100_2[6000];
+extern uint32_t localRIV2alloc_LUT100_3[6000];
+
 
 void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
                             nfapi_dl_config_request_pdu_t *dl_config_pdu,
                             uint8_t codeword_index,
                             uint8_t *sdu) {
   nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
-#endif
   LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
   LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
   int UE_id;
@@ -180,12 +173,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
   //AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
   dlsch0 = eNB->dlsch[UE_id][0];
   dlsch1 = eNB->dlsch[UE_id][1];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 
   if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx] = 0;
 
-#endif
   harq_pid        = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
+
   if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
     LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
     return;
@@ -245,7 +237,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
                                       rel8->rnti,UE_id,harq_pid);
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 #ifdef PHY_TX_THREAD
   dlsch0_harq->sib1_br_flag=0;
 #else
@@ -260,9 +251,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
     dlsch0->harq_mask = 1;
     dlsch0_harq     = dlsch0->harq_processes[0];
     dlsch0_harq->pdu                    = sdu;
-
     LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
-
     dlsch0->rnti             = 0xFFFF;
     dlsch0->Kmimo            = 1;
     dlsch0->Mdlharq          = 4;
@@ -329,19 +318,14 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
     dlsch0_harq->Qm                 = rel8->modulation;
     dlsch0_harq->codeword           = 0;
     dlsch0_harq->pdsch_start        = rel10->pdsch_start;
-  } else
-#endif
-  {
+  } else {
     UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
     AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
     AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
     dlsch0 = eNB->dlsch[UE_id][0];
     dlsch1 = eNB->dlsch[UE_id][1];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     dlsch0->sib1_br_flag=0;
     dlsch0->i0               = 0xFFFF;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
 #ifdef PHY_TX_THREAD
           dlsch0_harq->i0,
@@ -352,13 +336,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
           dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
           rel8->length
          );
-#else
-    LOG_D(PHY,"dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
-          dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status,
-          dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
-          rel8->length
-         );
-#endif
     dlsch0->active = 1;
     harq_pid        = dlsch0->harq_ids[frame%2][proc->subframe_tx];
     dlsch0->harq_mask |= (1<<harq_pid);
@@ -379,12 +356,9 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
       computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
     if (rel13->ue_type>0)
       dlsch0_harq->pdsch_start = rel10->pdsch_start;
     else
-#endif
       dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
 
     if (dlsch0_harq->round==0) {  //get pointer to SDU if this a new SDU
@@ -569,8 +543,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
                        nfapi_ul_config_request_pdu_t *ul_config_pdu,
                        uint16_t frame,
                        uint8_t subframe,
-                       uint8_t srs_active)
-{
+                       uint8_t srs_active) {
   LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
 
   if (NFAPI_MODE==NFAPI_MODE_VNF) return;
@@ -586,11 +559,9 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
   uci->n_pucch_1_0_sr[0]   = ul_config_pdu->uci_sr_pdu.sr_information.sr_information_rel8.pucch_index;
   uci->srs_active          = srs_active;
   uci->active              = 1;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uci->ue_type                     = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.ue_type;
   uci->empty_symbols               = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.empty_symbols;
   uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
-#endif
   LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
         uci->rnti,
         uci->n_pucch_1_0_sr[0],
@@ -613,11 +584,9 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
   uci->n_pucch_1_0_sr[0]   = ul_config_pdu->uci_sr_harq_pdu.sr_information.sr_information_rel8.pucch_index;
   uci->srs_active          = srs_active;
   uci->active              = 1;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uci->ue_type                     = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.ue_type;
   uci->empty_symbols               = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
   uci->total_repetitions = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
-#endif
   handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_sr_harq_pdu.harq_information);
 }
 
@@ -634,11 +603,9 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
   uci->type              = HARQ;
   uci->srs_active        = srs_active;
   uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uci->ue_type                     = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type;
   uci->empty_symbols               = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
   uci->total_repetitions           = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
-#endif
   handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_harq_pdu.harq_information);
   uci->active=1;
 }
@@ -774,9 +741,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
   eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
   eNB->pdcch_vars[subframe&1].num_dci           = 0;
   eNB->phich_vars[subframe&1].num_hi            = 0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   eNB->mpdcch_vars[subframe&1].num_dci           = 0;
-#endif
   LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d\n",
         frame,subframe,
         NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),number_dl_pdu,
@@ -803,13 +768,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
 
     // clear DCI allocation maps for new subframe
     if (NFAPI_MODE!=NFAPI_MODE_VNF)
-    for (i=0; i<NUMBER_OF_UE_MAX; i++) {
-      if (eNB->ulsch[i]) {
-        ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
-        ulsch_harq->dci_alloc=0;
-        ulsch_harq->rar_alloc=0;
+      for (i=0; i<NUMBER_OF_UE_MAX; i++) {
+        if (eNB->ulsch[i]) {
+          ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
+          ulsch_harq->dci_alloc=0;
+          ulsch_harq->rar_alloc=0;
+        }
       }
-    }
   }
 
   for (i=0; i<number_dl_pdu; i++) {
@@ -820,6 +785,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
       case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
         if (NFAPI_MODE!=NFAPI_MODE_VNF)
           handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
+
         eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++;
         //LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
         do_oai=1;
@@ -832,11 +798,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
                     TX_req->tx_request_body.number_of_pdus);
         eNB->pbch_configured=1;
         do_oai=1;
+
         //LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
         //__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
         if (NFAPI_MODE!=NFAPI_MODE_VNF)
           handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
-                             TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
+                               TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
+
         break;
 
       case NFAPI_DL_CONFIG_MCH_PDU_TYPE:
@@ -867,8 +835,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
                     dlsch_pdu_rel8->transport_blocks);
 
         if (1) { //sdu != NULL)
-            if (NFAPI_MODE!=NFAPI_MODE_VNF)
-              handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
+          if (NFAPI_MODE!=NFAPI_MODE_VNF)
+            handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
         } else {
           dont_send=1;
           LOG_E(MAC,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index,
@@ -906,22 +874,22 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
       case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE:
         //      handle_nfapi_epdcch_pdu(eNB,dl_config_pdu);
         break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
       case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
         if (NFAPI_MODE!=NFAPI_MODE_VNF)
           handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
+
         eNB->mpdcch_vars[subframe&1].num_dci++;
         break;
-#endif
     }
   }
 
   if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
-    if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0){
+    if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) {
       Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
       oai_nfapi_tx_req(Sched_INFO->TX_req);
     }
+
     Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe;
     oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
     Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe;
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 2d493f807289238eec1bba6cc180cf92270a4087..12f7c856b4477f636a8d48cb18abb6e271ce76b5 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -119,15 +119,12 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
 }
 
 void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   MCH_PDU *mch_pduP=NULL;
   //  uint8_t sync_area=255;
-#endif
   int             subframe = proc->subframe_tx;
   AssertFatal (1 == 0, "pmch not tested for the moment, exiting\n");
   // This is DL-Cell spec pilots in Control region
   generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   // if mcch is active, send regardless of the node type: eNB or RN
   // when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
@@ -155,8 +152,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
   } else {
     LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe);
   }
-
-#endif
 }
 
 void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
@@ -241,8 +236,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
   LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
 
   if (dlsch->rnti != 0xffff) {//frame < 200) {
-   LOG_D(PHY,
-         "[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
+    LOG_D(PHY,
+          "[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
           eNB->Mod_id, dlsch->rnti,harq_pid,
           frame, subframe, dlsch->ue_type,dlsch_harq->TBS/8, dlsch_harq->pdsch_start,
           get_G(fp,
@@ -279,8 +274,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
 
   if (dlsch->rnti!=0xffff)
     LOG_D(PHY,"Generating DLSCH/PDSCH pdu:%p pdsch_start:%d frame:%d subframe:%d nb_rb:%d rb_alloc:%d Qm:%d Nl:%d round:%d\n",
-	  dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
-	  dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
+          dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
+          dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
 
   // 36-212
   if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { // monolthic OR PNF - do not need turbo encoding on VNF
@@ -309,6 +304,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
     if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) {
       print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
     }
+
 #ifdef PHY_TX_THREAD
     dlsch->active[subframe] = 0;
 #else
@@ -318,6 +314,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
     LOG_D(PHY,"Generated DLSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
     return true;
   }
+
   return false;
 }
 
@@ -333,32 +330,31 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
   // 36-211
   start_meas(&eNB->dlsch_scrambling_stats);
   dlsch_scrambling(fp,
-		   0,
-		   dlsch,
-		   harq_pid,
-		   get_G(fp,
-			 dlsch_harq->nb_rb,
-			 dlsch_harq->rb_alloc,
-			 dlsch_harq->Qm,
-			 dlsch_harq->Nl,
-			 dlsch_harq->pdsch_start,
-			 frame,subframe,
-			 0),
-		   0,
-		   frame,
-		   subframe<<1);
+                   0,
+                   dlsch,
+                   harq_pid,
+                   get_G(fp,
+                         dlsch_harq->nb_rb,
+                         dlsch_harq->rb_alloc,
+                         dlsch_harq->Qm,
+                         dlsch_harq->Nl,
+                         dlsch_harq->pdsch_start,
+                         frame,subframe,
+                         0),
+                   0,
+                   frame,
+                   subframe<<1);
   stop_meas(&eNB->dlsch_scrambling_stats);
   start_meas(&eNB->dlsch_modulation_stats);
   dlsch_modulation(eNB,
-		   eNB->common_vars.txdataF,
-		   AMP,
-		   frame,
-		   subframe,
-		   dlsch_harq->pdsch_start,
-		   dlsch,
-		   dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
+                   eNB->common_vars.txdataF,
+                   AMP,
+                   frame,
+                   subframe,
+                   dlsch_harq->pdsch_start,
+                   dlsch,
+                   dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
   stop_meas(&eNB->dlsch_modulation_stats);
-
   LOG_D(PHY,"Generated PDSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
 }
 
@@ -374,9 +370,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
   int16_t UE_id=0;
   uint8_t num_pdcch_symbols=0;
   uint8_t num_dci=0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t         num_mdci = 0;
-#endif
   uint8_t ul_subframe;
   uint32_t ul_frame;
   LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
@@ -420,11 +414,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
   //    (subframe_select(fp,ul_subframe)==SF_UL)) { // This means that there is a potential UL subframe that will be scheduled here
   if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
     for (i=0; i<NUMBER_OF_UE_MAX; i++) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
       if (eNB->ulsch[i] && eNB->ulsch[i]->ue_type >0) harq_pid = 0;
       else
-#endif
         harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
 
       if (eNB->ulsch[i]) {
@@ -459,7 +450,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,num_pdcch_symbols);
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME (VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO, (frame * 10) + subframe);
 
-  if (num_pdcch_symbols == 0){
+  if (num_pdcch_symbols == 0) {
     LOG_E(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
     return;
   }
@@ -478,15 +469,12 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
                      fp,
                      eNB->common_vars.txdataF,
                      subframe);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     num_mdci = eNB->mpdcch_vars[subframe &1].num_dci;
 
     if (num_mdci > 0) {
       LOG_D (PHY, "[eNB %" PRIu8 "] Frame %d, subframe %d: Calling generate_mdci_top (mpdcch) (num_dci %" PRIu8 ")\n", eNB->Mod_id, frame, subframe, num_mdci);
       generate_mdci_top (eNB, frame, subframe, AMP, eNB->common_vars.txdataF);
     }
-
-#endif
   }
 
   if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
@@ -511,13 +499,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
        ) {
       // get harq_pid
       harq_pid = dlsch0->harq_ids[frame%2][subframe];
-	//AssertFatal(harq_pid>=0,"harq_pid is negative\n");
-
-        if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+      //AssertFatal(harq_pid>=0,"harq_pid is negative\n");
 
+      if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
         if (dlsch0->ue_type==0)
-#endif
           LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,UE_id,frame,subframe,dlsch0->rnti,
                 dlsch0->harq_ids[frame%2][0],
                 dlsch0->harq_ids[frame%2][1],
@@ -528,18 +513,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
                 dlsch0->harq_ids[frame%2][6],
                 dlsch0->harq_ids[frame%2][7]);
       } else {
-	if (dlsch_procedures(eNB,
-                         proc,
-                         harq_pid,
-                         dlsch0,
-                         &eNB->UE_stats[(uint32_t)UE_id])) {
-	  // if we generate dlsch, we must generate pdsch
-	  pdsch_procedures(eNB,
-			   proc,
-			   harq_pid,
-			   dlsch0,
-			   dlsch1);
-	}
+        if (dlsch_procedures(eNB,
+                             proc,
+                             harq_pid,
+                             dlsch0,
+                             &eNB->UE_stats[(uint32_t)UE_id])) {
+          // if we generate dlsch, we must generate pdsch
+          pdsch_procedures(eNB,
+                           proc,
+                           harq_pid,
+                           dlsch0,
+                           dlsch1);
+        }
       }
     } else if ((dlsch0)&&(dlsch0->rnti>0)&&
 #ifdef PHY_TX_THREAD
@@ -644,7 +629,6 @@ uci_procedures(PHY_VARS_eNB *eNB,
             subframe,
             uci->type,
             i);
-      
       uci->active = 0;
 
       // Null out PUCCH PRBs for noise measurement
@@ -652,24 +636,30 @@ uci_procedures(PHY_VARS_eNB *eNB,
         case 6:
           eNB->rb_mask_ul[0] |= (0x1 | (1 << 5)); // position 5
           break;
+
         case 15:
           eNB->rb_mask_ul[0] |= (0x1 | (1 << 14)); // position 14
           break;
+
         case 25:
           eNB->rb_mask_ul[0] |= (0x1 | (1 << 24)); // position 24
           break;
+
         case 50:
           eNB->rb_mask_ul[0] |= 0x1;
           eNB->rb_mask_ul[1] |= (1 << 17); // position 49 (49-32)
           break;
+
         case 75:
           eNB->rb_mask_ul[0] |= 0x1;
           eNB->rb_mask_ul[2] |= (1 << 10); // position 74 (74-64)
           break;
+
         case 100:
           eNB->rb_mask_ul[0] |= 0x1;
           eNB->rb_mask_ul[3] |= (1 << 3); // position 99 (99-96)
           break;
+
         default:
           LOG_E(PHY,"Unknown number for N_RB_UL %d\n", fp->N_RB_UL);
           break;
@@ -690,10 +680,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                &SR_payload,
                                frame,
                                subframe,
-                               pucch1_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,uci->ue_type
-#endif
+                               pucch1_thres,
+                               uci->ue_type
                               );
           LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR is %d (uci.type %d SR n1pucch is %d)\n",
                 eNB->Mod_id,
@@ -732,10 +720,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                  pucch_b0b1[0],
                                  frame,
                                  subframe,
-                                 pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,uci->ue_type
-#endif
+                                 pucch1ab_thres,
+                                 uci->ue_type
                                 );
 
             //dump_ulsch(eNB,frame,subframe,0,0); exit(-1);
@@ -756,10 +742,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                  pucch_b0b1[0],
                                  frame,
                                  subframe,
-                                 pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,uci->ue_type
-#endif
+                                 pucch1ab_thres,
+                                 uci->ue_type
                                 );
             }
 
@@ -786,10 +770,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                  pucch_b0b1[0],
                                  frame,
                                  subframe,
-                                 pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,uci->ue_type
-#endif
+                                 pucch1ab_thres,
+                                 uci->ue_type
                                 );
 
             if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0;
@@ -806,10 +788,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                    pucch_b0b1[0],
                                    frame,
                                    subframe,
-                                   pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                   ,uci->ue_type
-#endif
+                                   pucch1ab_thres,
+                                   uci->ue_type
                                   );
             }
 
@@ -824,10 +804,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
               metric[0] = rx_pucch (eNB, pucch_format1b, i, uci->n_pucch_1_0_sr[0], 0,    //n2_pucch
                                     uci->srs_active,      // shortened format
                                     pucch_b0b1[0], frame, subframe,
-                                    pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                    ,uci->ue_type
-#endif
+                                    pucch1ab_thres,
+                                    uci->ue_type
                                    );
             } else {              //using assigned pucch resources
 #ifdef DEBUG_PHY_PROC
@@ -840,10 +818,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                 metric[res] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[res][0], 0,        // n2_pucch
                                         uci->srs_active,  // shortened format
                                         pucch_b0b1[res], frame, subframe,
-                                        pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                        ,uci->ue_type
-#endif
+                                        pucch1ab_thres,
+                                        uci->ue_type
                                        );
 
               for (res=0; res<uci->num_pucch_resources; res++)
@@ -856,10 +832,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
                                        pucch_b0b1[res],
                                        frame,
                                        subframe,
-                                       pucch1ab_thres
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                       ,uci->ue_type
-#endif
+                                       pucch1ab_thres,
+                                       uci->ue_type
                                       );
             }
 
@@ -868,6 +842,7 @@ uci_procedures(PHY_VARS_eNB *eNB,
                   uci->rnti,uci->type,SR_payload,frame,subframe,pucch_b0b1[0][0],pucch_b0b1[0][1],pucch_b0b1[1][0],pucch_b0b1[1][1]);
 #endif
 #endif
+
             if (SR_payload == 1) { // this implements Table 7.3.1 from 36.213
               if (pucch_b0b1[0][0] == 4) { // there isn't a likely transmission
                 harq_ack[0] = 4; // DTX
@@ -1352,8 +1327,7 @@ void init_td_thread(PHY_VARS_eNB *eNB) {
   L1_proc_t *proc = &eNB->proc;
   proc->tdp.eNB = eNB;
   proc->instance_cnt_td = -1;
-  
-  threadCreate(&proc->pthread_td, td_thread, (void*)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
+  threadCreate(&proc->pthread_td, td_thread, (void *)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
 }
 
 void kill_td_thread(PHY_VARS_eNB *eNB) {
@@ -1367,23 +1341,20 @@ void kill_td_thread(PHY_VARS_eNB *eNB) {
 
 extern void    *te_thread (void *);
 
-void init_te_thread(PHY_VARS_eNB *eNB)
-{
+void init_te_thread(PHY_VARS_eNB *eNB) {
   L1_proc_t *proc = &eNB->proc;
 
   for(int i=0; i<3 ; i++) {
     proc->tep[i].eNB = eNB;
     proc->tep[i].instance_cnt_te = -1;
-      
     LOG_I(PHY,"Creating te_thread %d\n",i);
     char txt[128];
-    sprintf(txt,"TE_%d", i); 
-    threadCreate(&proc->tep[i].pthread_te, te_thread, (void*)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
+    sprintf(txt,"TE_%d", i);
+    threadCreate(&proc->tep[i].pthread_te, te_thread, (void *)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
   }
 }
 
-void kill_te_thread(PHY_VARS_eNB *eNB)
-{
+void kill_te_thread(PHY_VARS_eNB *eNB) {
   L1_proc_t *proc = &eNB->proc;
 
   for(int i=0; i<3 ; i++) {
@@ -1396,20 +1367,16 @@ void kill_te_thread(PHY_VARS_eNB *eNB)
 }
 
 void fill_rx_indication(PHY_VARS_eNB *eNB,
-		                int UE_id,
-						int frame,
-						int subframe)
-{
+                        int UE_id,
+                        int frame,
+                        int subframe) {
   nfapi_rx_indication_pdu_t *pdu;
   int             timing_advance_update;
   int             sync_pos;
   uint32_t        harq_pid;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
   if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
-  else
-#endif
-  {
+  else {
     harq_pid = subframe2harq_pid (&eNB->frame_parms,
                                   frame, subframe);
   }
@@ -1507,31 +1474,27 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
   int harq_pid;
   int subframe_tx;
   int frame_tx;
-
   AssertFatal(UE_id != -1, "No existing dlsch context\n");
   AssertFatal(UE_id < NUMBER_OF_UE_MAX, "Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX);
-
   dlsch0 = eNB->dlsch[UE_id][0];
   dlsch1 = eNB->dlsch[UE_id][1];
 
   if (eNB->frame_parms.frame_type == FDD) {
     subframe_tx = (subframe + 6) % 10;
     frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
-                                        frame,
-                                        subframe,
-                                        subframe_tx);
-
+                                         frame,
+                                         subframe,
+                                         subframe_tx);
     harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
 
     if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
       LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
       return;
     }
+
     dlsch0_harq = dlsch0->harq_processes[harq_pid];
     dlsch1_harq = dlsch1->harq_processes[harq_pid];
-    
     AssertFatal(dlsch0_harq != NULL, "dlsch0_harq is null\n");
-
 #if T_TRACER
 
     if (after_rounds != -1) {
@@ -1556,7 +1519,6 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
       dlsch0_harq->status = SCH_IDLE;
       dlsch0->harq_mask &= ~(1 << harq_pid);
     }
-
   } else {
     /* Release all processes in the bundle that was acked, based on mask */
     /* This is at most 4 for multiplexing and 9 for bundling/special bundling */
@@ -1564,13 +1526,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
 
     for (int m=0; m < M; m++) {
       subframe_tx = ul_ACK_subframe2_dl_subframe(&eNB->frame_parms,
-                                                subframe,
-                                                m);
-
+                    subframe,
+                    m);
       frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
-                                          frame,
-                                          subframe,
-                                          subframe_tx);
+                                           frame,
+                                           subframe,
+                                           subframe_tx);
 
       if (((1 << m) & mask) > 0) {
         harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
@@ -1579,12 +1540,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
           LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
           return;
         }
+
         dlsch0_harq = dlsch0->harq_processes[harq_pid];
         dlsch1_harq = dlsch1->harq_processes[harq_pid];
-
         AssertFatal(dlsch0_harq != NULL, "Dlsch0_harq is null\n");
-
 #if T_TRACER
+
         if (after_rounds != -1) {
           T(T_ENB_PHY_DLSCH_UE_NACK,
             T_INT(0),
@@ -1600,7 +1561,9 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
             T_INT(dlsch0->rnti),
             T_INT(harq_pid));
         }
+
 #endif
+
         if (dlsch0_harq->round >= after_rounds) {
           dlsch0_harq->status = SCH_IDLE;
 
@@ -1614,7 +1577,7 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
 }
 
 static void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subframe,uint16_t mask, int is_ack) {
-  /* 
+  /*
    * Maximum number of DL transmissions = 4.
    * TODO: get the value from configuration.
    * If is_ack is true then we release immediately. The value -1 can be used for that.
@@ -2012,43 +1975,50 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 );
 }
 
-void release_rnti_of_phy(module_id_t mod_id){
-    int i,j;
-    int CC_id;
-    rnti_t rnti;
-    PHY_VARS_eNB *eNB_PHY = NULL;
-    LTE_eNB_ULSCH_t *ulsch = NULL;
-    LTE_eNB_DLSCH_t *dlsch = NULL;
-    for(i = 0; i< release_rntis.number_of_TLVs;i++){
-        for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-          eNB_PHY = RC.eNB[mod_id][CC_id];
-          rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
-          for (j=0; j<NUMBER_OF_UE_MAX; j++) {
-              ulsch = eNB_PHY->ulsch[j];
-              if((ulsch != NULL) && (ulsch->rnti == rnti)){
-                LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
-                clean_eNb_ulsch(ulsch);
-              }
+void release_rnti_of_phy(module_id_t mod_id) {
+  int i,j;
+  int CC_id;
+  rnti_t rnti;
+  PHY_VARS_eNB *eNB_PHY = NULL;
+  LTE_eNB_ULSCH_t *ulsch = NULL;
+  LTE_eNB_DLSCH_t *dlsch = NULL;
+
+  for(i = 0; i< release_rntis.number_of_TLVs; i++) {
+    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+      eNB_PHY = RC.eNB[mod_id][CC_id];
+      rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
+
+      for (j=0; j<NUMBER_OF_UE_MAX; j++) {
+        ulsch = eNB_PHY->ulsch[j];
+
+        if((ulsch != NULL) && (ulsch->rnti == rnti)) {
+          LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
+          clean_eNb_ulsch(ulsch);
+        }
 
-              dlsch = eNB_PHY->dlsch[j][0];
-              if((dlsch != NULL) && (dlsch->rnti == rnti)){
-                LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
-                clean_eNb_dlsch(dlsch);
-              }
-          }
-          ulsch = eNB_PHY->ulsch[j];
-          if((ulsch != NULL) && (ulsch->rnti == rnti)){
-            LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
-            clean_eNb_ulsch(ulsch);
-          }
-          for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
-              if(eNB_PHY->uci_vars[j].rnti == rnti){
-                LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
-                memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
-              }
+        dlsch = eNB_PHY->dlsch[j][0];
 
-          }
+        if((dlsch != NULL) && (dlsch->rnti == rnti)) {
+          LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
+          clean_eNb_dlsch(dlsch);
+        }
+      }
+
+      ulsch = eNB_PHY->ulsch[j];
+
+      if((ulsch != NULL) && (ulsch->rnti == rnti)) {
+        LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
+        clean_eNb_ulsch(ulsch);
+      }
+
+      for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
+        if(eNB_PHY->uci_vars[j].rnti == rnti) {
+          LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
+          memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
         }
+      }
     }
-    memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
+  }
+
+  memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
 }
diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c
index 15d2c4fafccd3954ea58caf980c93328b900a055..3583e222d56af0918577a3d62a8c53c5165bdebe 100644
--- a/openair1/SCHED/prach_procedures.c
+++ b/openair1/SCHED/prach_procedures.c
@@ -53,16 +53,11 @@
 
 extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
 
-void prach_procedures(PHY_VARS_eNB *eNB
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,
-  int br_flag
-#endif
-                     ) {
+void prach_procedures(PHY_VARS_eNB *eNB,
+                      int br_flag ) {
   uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4],avg_preamble_energy[4];
   uint16_t i;
   int frame,subframe;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
   if (br_flag==1) {
     subframe = eNB->proc.subframe_prach_br;
@@ -70,9 +65,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
     pthread_mutex_lock(&eNB->UL_INFO_mutex);
     eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0;
     pthread_mutex_unlock(&eNB->UL_INFO_mutex);
-  } else
-#endif
-  {
+  } else {
     pthread_mutex_lock(&eNB->UL_INFO_mutex);
     eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles=0;
     pthread_mutex_unlock(&eNB->UL_INFO_mutex);
@@ -90,13 +83,10 @@ void prach_procedures(PHY_VARS_eNB *eNB
 
     for (ru_aa=0,aa=0; ru_aa<ru->nb_rx; ru_aa++,aa++) {
       eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       int ce_level;
 
       if (br_flag==1)
         for (ce_level=0; ce_level<4; ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[i]->prach_rxsigF_br[ce_level][ru_aa];
-
-#endif
     }
   }
 
@@ -106,12 +96,9 @@ void prach_procedures(PHY_VARS_eNB *eNB
            &max_preamble[0],
            &max_preamble_energy[0],
            &max_preamble_delay[0],
-	   &avg_preamble_energy[0],
+           &avg_preamble_energy[0],
            frame,
-           0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-           ,br_flag
-#endif
+           0,br_flag
           );
   LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d  Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d), threshold %d, I0 %d\n",
         frame,subframe,br_flag,
@@ -119,9 +106,8 @@ void prach_procedures(PHY_VARS_eNB *eNB
         max_preamble_energy[0]/10,
         max_preamble_delay[0],
         eNB->prach_energy_counter,
-	eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
-	eNB->measurements.prach_I0);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+        eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
+        eNB->measurements.prach_I0);
 
   if (br_flag==1) {
     int             prach_mask;
@@ -161,9 +147,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
     ind++;
     }
     } */// ce_level
-  } else
-#endif
-  {
+  } else {
     if ((eNB->prach_energy_counter == 100) &&
         (max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
       LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
diff --git a/openair1/SCHED/sched_eNB.h b/openair1/SCHED/sched_eNB.h
index 7fcabdc5ddf8163b063edc655cdca442a0f0617c..150b0c194fddaac0326b1b83a5379605c69623a5 100644
--- a/openair1/SCHED/sched_eNB.h
+++ b/openair1/SCHED/sched_eNB.h
@@ -127,12 +127,10 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
   @param phy_vars_eNB Pointer to eNB variables on which to act
   @param br_flag indicator for eMTC PRACH
 */
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void prach_procedures(PHY_VARS_eNB *eNB,
-		      int br_flag);
-#else
-void prach_procedures(PHY_VARS_eNB *eNB);
-#endif
+                      int br_flag);
+
 
 /*! \brief Function to compute timing of Msg3 transmission on UL-SCH (first UE transmission in RA procedure). This implements the timing in paragraph a) from Section 6.1.1 in 36.213 (p. 17 in version 8.6).  Used by eNB upon transmission of random-access response (RA_RNTI) to program corresponding ULSCH reception procedure.  Used by UE upon reception of random-access response (RA_RNTI) to program corresponding ULSCH transmission procedure.  This does not support the UL_delay field in RAR (always assumed to be 0).
   @param frame_parms Pointer to DL frame parameter descriptor
@@ -197,7 +195,7 @@ int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
 
 void schedule_response(Sched_Rsp_t *Sched_INFO);
 
-LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
+LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
 
 /*! \brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index.  Same as subframe_select, except that it uses the Mod_id and is provided as a service to the MAC scheduler.
   @param Mod_id Index of eNB
diff --git a/openair1/SCHED_NR/phy_procedures_nr_common.c b/openair1/SCHED_NR/phy_procedures_nr_common.c
index c19866fc920a7e42976a8b630eb7c61102bb9b64..7edd0fb9b874dad9454eed1702f4e89b8e52b220 100755
--- a/openair1/SCHED_NR/phy_procedures_nr_common.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_common.c
@@ -31,6 +31,7 @@
 */
 
 #include "sched_nr.h"
+#include "PHY/INIT/phy_init.h"
 
 nr_subframe_t nr_slot_select(nfapi_nr_config_request_t *cfg,
 		                     unsigned char slot)
diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h
index e7035cce7da22c148384166bf0b9eb8f06481eb0..4635f6fb49d8722e28c28764558db1bcb14b0799 100644
--- a/openair1/SCHED_NR_UE/defs.h
+++ b/openair1/SCHED_NR_UE/defs.h
@@ -95,14 +95,12 @@
   @param *phy_vars_rn pointer to RN variables
 */
 void phy_procedures_UE_lte(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type);
-#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 /*! \brief Top-level entry routine for relay node procedures actinf as UE. This proc will make us of the existing UE procs.
   @param last_slot Index of last slot (0-19)
   @param next_slot Index of next_slot (0-19)
   @param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
 */
 int phy_procedures_RN_UE_RX(unsigned char last_slot, unsigned char next_slot, relaying_type_t r_type);
-#endif
 
 /*! \brief Scheduling for UE TX procedures in normal subframes.
   @param phy_vars_ue Pointer to UE variables on which to act
@@ -128,7 +126,7 @@ int phy_procedures_slot_parallelization_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_pr
 
 
 #ifdef UE_SLOT_PARALLELISATION
-void *UE_thread_slot1_dl_processing(void *arg);
+  void *UE_thread_slot1_dl_processing(void *arg);
 #endif
 
 /*! \brief Scheduling for UE TX procedures in TDD S-subframes.
@@ -174,10 +172,10 @@ nr_subframe_t nr_get_subframe_direction(uint8_t Mod_id, uint8_t CC_id,uint8_t su
   @param subframe subframe index where Msg3 is to be transmitted (n, n+1 or n+2)
 */
 void nr_get_Msg3_alloc(NR_DL_FRAME_PARMS *frame_parms,
-                    uint8_t current_subframe,
-                    uint32_t current_frame,
-                    uint32_t *frame,
-                    uint8_t *subframe);
+                       uint8_t current_subframe,
+                       uint32_t current_frame,
+                       uint32_t *frame,
+                       uint8_t *subframe);
 
 /*! \brief Function to compute timing of Msg3 retransmission on UL-SCH (first UE transmission in RA procedure).
   @param frame_parms Pointer to DL frame parameter descriptor
@@ -187,10 +185,10 @@ void nr_get_Msg3_alloc(NR_DL_FRAME_PARMS *frame_parms,
   @param subframe subframe index where Msg3 is to be transmitted (n, n+1 or n+2)
 */
 void nr_get_Msg3_alloc_ret(NR_DL_FRAME_PARMS *frame_parms,
-                        uint8_t current_subframe,
-                        uint32_t current_frame,
-                        uint32_t *frame,
-                        uint8_t *subframe);
+                           uint8_t current_subframe,
+                           uint32_t current_frame,
+                           uint32_t *frame,
+                           uint8_t *subframe);
 
 /*! \brief Get ULSCH harq_pid for Msg3 from RAR subframe.  This returns n+k mod 10 (k>6) and corresponds to the rule in Section 6.1.1 from 36.213
    @param frame_parms Pointer to DL Frame Parameters
@@ -238,12 +236,12 @@ uint8_t nr_get_ack(NR_DL_FRAME_PARMS *frame_parms,nr_harq_status_t *harq_ack,uin
   @returns status indicator for PUCCH/PUSCH transmission
 */
 uint8_t nr_reset_ack(NR_DL_FRAME_PARMS *frame_parms,
-                nr_harq_status_t *harq_ack,
-                unsigned char subframe_tx,
-                unsigned char subframe_rx,
-                unsigned char *o_ACK,
-                uint8_t *pN_bundled,
-                uint8_t cw_idx);
+                     nr_harq_status_t *harq_ack,
+                     unsigned char subframe_tx,
+                     unsigned char subframe_rx,
+                     unsigned char *o_ACK,
+                     uint8_t *pN_bundled,
+                     uint8_t cw_idx);
 
 /*! \brief Compute UL ACK subframe from DL subframe. This is used to retrieve corresponding DLSCH HARQ pid at eNB upon reception of ACK/NAK information on PUCCH/PUSCH.  Derived from Table 10.1-1 in 36.213 (p. 69 in version 8.6)
   @param frame_parms Pointer to DL frame parameter descriptor
@@ -311,11 +309,11 @@ TDD, this routine computes the complex procedure described in Section 10.1 of 36
 @returns n1_pucch
 */
 uint16_t nr_get_n1_pucch(PHY_VARS_NR_UE *phy_vars_ue,
-		      UE_nr_rxtx_proc_t *proc,
-                      nr_harq_status_t *harq_ack,
-                      uint8_t eNB_id,
-                      uint8_t *b,
-                      uint8_t SR);
+                         UE_nr_rxtx_proc_t *proc,
+                         nr_harq_status_t *harq_ack,
+                         uint8_t eNB_id,
+                         uint8_t *b,
+                         uint8_t SR);
 
 #endif
 /*! \brief This function retrieves the PHY UE mode. It is used as a helper function for the UE MAC.
diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c
index dd3e69236094e0294e7bd8cd0545b1ab227292f9..e67735de711b2c64a7b786ec06882dac5e837e19 100644
--- a/openair1/SCHED_UE/phy_procedures_lte_ue.c
+++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c
@@ -19,17 +19,17 @@
  *      contact@openairinterface.org
  */
 
- /*! \file phy_procedures_lte_ue.c
-  * \brief Implementation of UE procedures from 36.213 LTE specifications / This includes FeMBMS UE procedures from 36.213 v14.2.0 specification
-  * \author R. Knopp, F. Kaltenberger, N. Nikaein, J. Morgade
-  * \date 2011
-  * \version 0.1
-  * \company Eurecom
-  * \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr, javier.morgad
+/*! \file phy_procedures_lte_ue.c
+ * \brief Implementation of UE procedures from 36.213 LTE specifications / This includes FeMBMS UE procedures from 36.213 v14.2.0 specification
+ * \author R. Knopp, F. Kaltenberger, N. Nikaein, J. Morgade
+ * \date 2011
+ * \version 0.1
+ * \company Eurecom
+ * \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr, javier.morgad
 e@ieee.org
-  * \note
-  * \warning
-  */
+ * \note
+ * \warning
+ */
 
 #define _GNU_SOURCE
 
@@ -82,17 +82,16 @@ void Msg3_transmitted(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uin
 extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
 
 void get_dumpparam(PHY_VARS_UE *ue,
-		           UE_rxtx_proc_t *proc,
-				   uint8_t eNB_id,
-				   uint8_t nb_rb,
+                   UE_rxtx_proc_t *proc,
+                   uint8_t eNB_id,
+                   uint8_t nb_rb,
                    uint32_t *alloc_even,
-				   uint8_t subframe,
-				   uint32_t Qm,
-				   uint32_t Nl,
-				   uint32_t tm,
+                   uint8_t subframe,
+                   uint32_t Qm,
+                   uint32_t Nl,
+                   uint32_t tm,
                    uint8_t *nsymb,
-				   uint32_t *coded_bits_per_codeword)
-{
+                   uint32_t *coded_bits_per_codeword) {
   *nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
   *coded_bits_per_codeword = get_G(&ue->frame_parms,
                                    nb_rb,
@@ -106,11 +105,10 @@ void get_dumpparam(PHY_VARS_UE *ue,
 }
 
 void dump_dlsch(PHY_VARS_UE *ue,
-		        UE_rxtx_proc_t *proc,
-				uint8_t eNB_id,
-				uint8_t subframe,
-				uint8_t harq_pid)
-{
+                UE_rxtx_proc_t *proc,
+                uint8_t eNB_id,
+                uint8_t subframe,
+                uint8_t harq_pid) {
   if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
     unsigned int coded_bits_per_codeword;
     uint8_t nsymb ;
@@ -139,10 +137,9 @@ void dump_dlsch(PHY_VARS_UE *ue,
 }
 
 void dump_dlsch_SI(PHY_VARS_UE *ue,
-		           UE_rxtx_proc_t *proc,
-				   uint8_t eNB_id,
-				   uint8_t subframe)
-{
+                   UE_rxtx_proc_t *proc,
+                   uint8_t eNB_id,
+                   uint8_t subframe) {
   if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
     unsigned int coded_bits_per_codeword;
     uint8_t nsymb;
@@ -181,10 +178,9 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,
 
 
 unsigned int get_tx_amp(int power_dBm,
-		                int power_max_dBm,
-						int N_RB_UL,
-						int nb_rb)
-{
+                        int power_max_dBm,
+                        int N_RB_UL,
+                        int nb_rb) {
   int gain_dB;
   double gain_lin;
 
@@ -200,10 +196,9 @@ unsigned int get_tx_amp(int power_dBm,
 
 
 void dump_dlsch_ra(PHY_VARS_UE *ue,
-		           UE_rxtx_proc_t *proc,
-				   uint8_t eNB_id,
-				   uint8_t subframe)
-{
+                   UE_rxtx_proc_t *proc,
+                   uint8_t eNB_id,
+                   uint8_t subframe) {
   if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
     unsigned int coded_bits_per_codeword;
     uint8_t nsymb ;
@@ -236,9 +231,8 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,
 }
 
 void phy_reset_ue(module_id_t Mod_id,
-		          uint8_t CC_id,
-				  uint8_t eNB_index)
-{
+                  uint8_t CC_id,
+                  uint8_t eNB_index) {
   // This flushes ALL DLSCH and ULSCH harq buffers of ALL connected eNBs...add the eNB_index later
   // for more flexibility
   uint8_t i,j,k,s;
@@ -280,27 +274,27 @@ void phy_reset_ue(module_id_t Mod_id,
 }
 
 void ra_failed(uint8_t Mod_id,
-		       uint8_t CC_id,
-			   uint8_t eNB_index)
-{
+               uint8_t CC_id,
+               uint8_t eNB_index) {
   // if contention resolution fails, go back to PRACH
   PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PRACH;
+
   for (int i=0; i <RX_NB_TH_MAX; i++ ) {
     PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[i][eNB_index]->crnti_is_temporary = 0;
     PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[i][eNB_index]->crnti = 0;
   }
+
   LOG_E(PHY,"[UE %d] Random-access procedure fails, going back to PRACH, setting SIStatus = 0, discard temporary C-RNTI and State RRC_IDLE\n",Mod_id);
 }
 
 void ra_succeeded(uint8_t Mod_id,
-		          uint8_t CC_id,
-				  uint8_t eNB_index)
-{
+                  uint8_t CC_id,
+                  uint8_t eNB_index) {
   int i;
   LOG_I(PHY,"[UE %d][RAPROC] Random-access procedure succeeded. Set C-RNTI = Temporary C-RNTI\n",Mod_id);
 
   for (int i=0; i <RX_NB_TH_MAX; i++ )
-	  PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[i][eNB_index]->crnti_is_temporary = 0;
+    PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[i][eNB_index]->crnti_is_temporary = 0;
 
   PHY_vars_UE_g[Mod_id][CC_id]->ulsch_Msg3_active[eNB_index] = 0;
   PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PUSCH;
@@ -308,25 +302,25 @@ void ra_succeeded(uint8_t Mod_id,
   for (i=0; i<8; i++) {
     if (PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]) {
       PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]->status=SCH_IDLE;
+
       for (int i=0; i <RX_NB_TH_MAX; i++ ) {
         PHY_vars_UE_g[Mod_id][CC_id]->dlsch[i][eNB_index][0]->harq_processes[i]->round=0;
       }
+
       PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]->subframe_scheduling_flag=0;
     }
   }
 }
 
 UE_MODE_t get_ue_mode(uint8_t Mod_id,
-		              uint8_t CC_id,
-					  uint8_t eNB_index)
-{
+                      uint8_t CC_id,
+                      uint8_t eNB_index) {
   return(PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index]);
 }
 
 void process_timing_advance_rar(PHY_VARS_UE *ue,
-		                        UE_rxtx_proc_t *proc,
-								uint16_t timing_advance)
-{
+                                UE_rxtx_proc_t *proc,
+                                uint16_t timing_advance) {
   ue->timing_advance = timing_advance*4;
 
   if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
@@ -337,9 +331,8 @@ void process_timing_advance_rar(PHY_VARS_UE *ue,
 }
 
 void process_timing_advance(module_id_t Mod_id,
-		                    uint8_t CC_id,
-							int16_t timing_advance)
-{
+                            uint8_t CC_id,
+                            int16_t timing_advance) {
   //  uint32_t frame = PHY_vars_UE_g[Mod_id]->frame;
   // timing advance has Q1.5 format
   timing_advance = timing_advance - 31;
@@ -348,9 +341,8 @@ void process_timing_advance(module_id_t Mod_id,
 }
 
 uint8_t is_SR_TXOp(PHY_VARS_UE *ue,
-		           UE_rxtx_proc_t *proc,
-				   uint8_t eNB_id)
-{
+                   UE_rxtx_proc_t *proc,
+                   uint8_t eNB_id) {
   int subframe=proc->subframe_tx;
   LOG_D(PHY,"[UE %d][SR %x] Frame %d subframe %d Checking for SR TXOp (sr_ConfigIndex %d)\n",
         ue->Mod_id,ue->pdcch_vars[ue->current_thread_id[proc->subframe_rx]][eNB_id]->crnti,proc->frame_tx,subframe,
@@ -377,9 +369,8 @@ uint8_t is_SR_TXOp(PHY_VARS_UE *ue,
 }
 
 uint8_t is_cqi_TXOp(PHY_VARS_UE *ue,
-		            UE_rxtx_proc_t *proc,
-					uint8_t eNB_id)
-{
+                    UE_rxtx_proc_t *proc,
+                    uint8_t eNB_id) {
   int subframe = proc->subframe_tx;
   int frame    = proc->frame_tx;
   CQI_REPORTPERIODIC *cqirep = &ue->cqi_report_config[eNB_id].CQI_ReportPeriodic;
@@ -397,9 +388,8 @@ uint8_t is_cqi_TXOp(PHY_VARS_UE *ue,
     return(0);
 }
 uint8_t is_ri_TXOp(PHY_VARS_UE *ue,
-		           UE_rxtx_proc_t *proc,
-				   uint8_t eNB_id)
-{
+                   UE_rxtx_proc_t *proc,
+                   uint8_t eNB_id) {
   int subframe = proc->subframe_tx;
   int frame    = proc->frame_tx;
   CQI_REPORTPERIODIC *cqirep = &ue->cqi_report_config[eNB_id].CQI_ReportPeriodic;
@@ -436,10 +426,9 @@ void compute_cqi_ri_resources(PHY_VARS_UE *ue,
 }
 
 void ue_compute_srs_occasion(PHY_VARS_UE *ue,
-		                     UE_rxtx_proc_t *proc,
-							 uint8_t eNB_id,
-							 uint8_t isSubframeSRS)
-{
+                             UE_rxtx_proc_t *proc,
+                             uint8_t eNB_id,
+                             uint8_t isSubframeSRS) {
   LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
   int frame_tx    = proc->frame_tx;
   int subframe_tx = proc->subframe_tx;
@@ -523,8 +512,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,
 
 
 void get_cqipmiri_params(PHY_VARS_UE *ue,
-		                 uint8_t eNB_id)
-{
+                         uint8_t eNB_id) {
   CQI_REPORTPERIODIC *cqirep = &ue->cqi_report_config[eNB_id].CQI_ReportPeriodic;
   int cqi_PMI_ConfigIndex = cqirep->cqi_PMI_ConfigIndex;
 
@@ -653,8 +641,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue,
                       harq_status_t *harq_ack,
                       uint8_t eNB_id,
                       uint8_t *b,
-                      uint8_t SR)
-{
+                      uint8_t SR) {
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
   uint8_t nCCE0,nCCE1,nCCE2,nCCE3,harq_ack1,harq_ack0,harq_ack3,harq_ack2;
   ANFBmode_t bundling_flag;
@@ -1147,9 +1134,8 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue,
 
 
 void ulsch_common_procedures(PHY_VARS_UE *ue,
-		                     UE_rxtx_proc_t *proc,
-							 uint8_t empty_subframe)
-{
+                             UE_rxtx_proc_t *proc,
+                             uint8_t empty_subframe) {
   int aa;
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
   int nsymb;
@@ -1273,11 +1259,10 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
 }
 
 void ue_prach_procedures(PHY_VARS_UE *ue,
-		                 UE_rxtx_proc_t *proc,
-						 uint8_t eNB_id,
-						 uint8_t abstraction_flag,
-						 runmode_t mode)
-{
+                         UE_rxtx_proc_t *proc,
+                         uint8_t eNB_id,
+                         uint8_t abstraction_flag,
+                         runmode_t mode) {
   int frame_tx = proc->frame_tx;
   int subframe_tx = proc->subframe_tx;
   LOG_USEDINLOG_VAR(int, prach_power);
@@ -1390,10 +1375,9 @@ void ue_prach_procedures(PHY_VARS_UE *ue,
 }
 
 void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,
-		                        UE_rxtx_proc_t *proc,
-								uint8_t eNB_id,
-								uint8_t abstraction_flag)
-{
+                                UE_rxtx_proc_t *proc,
+                                uint8_t eNB_id,
+                                uint8_t abstraction_flag) {
   int harq_pid;
   int frame_tx=proc->frame_tx;
   int subframe_tx=proc->subframe_tx;
@@ -1737,8 +1721,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,
       for (aa=0; aa<1/*frame_parms->nb_antennas_tx*/; aa++)
         generate_drs_pusch(ue,
                            proc,
-			   (LTE_DL_FRAME_PARMS *)NULL,
-			   (int32_t**)NULL,
+                           (LTE_DL_FRAME_PARMS *)NULL,
+                           (int32_t **)NULL,
                            eNB_id,
                            tx_amp,
                            subframe_tx,
@@ -1761,10 +1745,9 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,
 }
 
 void ue_srs_procedures(PHY_VARS_UE *ue,
-		               UE_rxtx_proc_t *proc,
-					   uint8_t eNB_id,
-					   uint8_t abstraction_flag)
-{
+                       UE_rxtx_proc_t *proc,
+                       uint8_t eNB_id,
+                       uint8_t abstraction_flag) {
   //LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
   //int8_t  frame_tx    = proc->frame_tx;
   int8_t  subframe_tx = proc->subframe_tx;
@@ -1813,9 +1796,8 @@ void ue_srs_procedures(PHY_VARS_UE *ue,
 }
 
 int16_t get_pucch2_cqi(PHY_VARS_UE *ue,
-		               int eNB_id,
-					   int *len)
-{
+                       int eNB_id,
+                       int *len) {
   if ((ue->transmission_mode[eNB_id]<4)||
       (ue->transmission_mode[eNB_id]==7)) { // Mode 1-0 feedback
     // 4-bit CQI message
@@ -1850,8 +1832,7 @@ void get_pucch_param(PHY_VARS_UE    *ue,
                      uint8_t        cqi_report,
                      uint16_t       *pucch_resource,
                      uint8_t        *pucch_payload,
-                     uint16_t       *plength)
-{
+                     uint16_t       *plength) {
   switch (format) {
     case pucch_format1: {
       pucch_resource[0] = ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex;
@@ -1901,10 +1882,9 @@ void get_pucch_param(PHY_VARS_UE    *ue,
 }
 
 void ue_pucch_procedures(PHY_VARS_UE *ue,
-		                 UE_rxtx_proc_t *proc,
-						 uint8_t eNB_id,
-						 uint8_t abstraction_flag)
-{
+                         UE_rxtx_proc_t *proc,
+                         uint8_t eNB_id,
+                         uint8_t abstraction_flag) {
   uint8_t  pucch_ack_payload[2];
   uint16_t pucch_resource;
   ANFBmode_t bundling_flag;
@@ -2018,13 +1998,12 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
   ue->generate_ul_signal[eNB_id] = 1;
 
   switch (format) {
-  case pucch_format1:
-  case pucch_format1a:
-  case pucch_format1b:
-  {
-    if (ue->mac_enabled == 1) {
+    case pucch_format1:
+    case pucch_format1a:
+    case pucch_format1b: {
+      if (ue->mac_enabled == 1) {
         Po_PUCCH = pucch_power_cntl(ue,proc,subframe_tx,eNB_id,format);
-    } else {
+      } else {
         Po_PUCCH = ue->tx_power_max_dBm;
       }
 
@@ -2171,8 +2150,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
 }
 
 void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,
-		                     UE_rxtx_proc_t *proc)
-{
+                             UE_rxtx_proc_t *proc) {
   int subframe_tx = proc->subframe_tx;
   int frame_tx = proc->frame_tx;
   SLSS_t *slss;
@@ -2191,11 +2169,10 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,
 }
 
 void phy_procedures_UE_TX(PHY_VARS_UE *ue,
-		                  UE_rxtx_proc_t *proc,
-						  uint8_t eNB_id,
-						  uint8_t abstraction_flag,
-						  runmode_t mode)
-{
+                          UE_rxtx_proc_t *proc,
+                          uint8_t eNB_id,
+                          uint8_t abstraction_flag,
+                          runmode_t mode) {
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
   //int32_t ulsch_start=0;
   int subframe_tx = proc->subframe_tx;
@@ -2300,9 +2277,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,
 }
 
 void phy_procedures_UE_S_TX(PHY_VARS_UE *ue,
-		                    uint8_t eNB_id,
-							uint8_t abstraction_flag)
-{
+                            uint8_t eNB_id,
+                            uint8_t abstraction_flag) {
   int aa;//i,aa;
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
 
@@ -2323,12 +2299,11 @@ void phy_procedures_UE_S_TX(PHY_VARS_UE *ue,
 
 void ue_measurement_procedures(uint16_t l,    // symbol index of each slot [0..6]
                                PHY_VARS_UE *ue,
-							   UE_rxtx_proc_t *proc,
-							   uint8_t eNB_id,
+                               UE_rxtx_proc_t *proc,
+                               uint8_t eNB_id,
                                uint16_t slot, // slot index of each radio frame [0..19]
                                uint8_t abstraction_flag,
-							   runmode_t mode)
-{
+                               runmode_t mode) {
   //LOG_I(PHY,"ue_measurement_procedures l %d Ncp %d\n",l,ue->frame_parms.Ncp);
   LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
   int subframe_rx = proc->subframe_rx;
@@ -2392,10 +2367,9 @@ void ue_measurement_procedures(uint16_t l,    // symbol index of each slot [0..6
 
 
 void ue_pbch_procedures(uint8_t eNB_id,
-		                PHY_VARS_UE *ue,
-						UE_rxtx_proc_t *proc,
-						uint8_t abstraction_flag)
-{
+                        PHY_VARS_UE *ue,
+                        UE_rxtx_proc_t *proc,
+                        uint8_t abstraction_flag) {
   //  int i;
   int pbch_tx_ant=0;
   uint8_t pbch_phase;
@@ -2414,25 +2388,22 @@ void ue_pbch_procedures(uint8_t eNB_id,
   for (pbch_trials=0; pbch_trials<4; pbch_trials++) {
     //for (pbch_phase=0;pbch_phase<4;pbch_phase++) {
     //LOG_I(PHY,"[UE  %d] Frame %d, Trying PBCH %d (NidCell %d, eNB_id %d)\n",ue->Mod_id,frame_rx,pbch_phase,ue->frame_parms.Nid_cell,eNB_id);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)){
-    	 	pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
-                          ue->pbch_vars[eNB_id],
-                          &ue->frame_parms,
-                          eNB_id,
-                          ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI,
-                          ue->high_speed_flag,
-                          pbch_phase);
-
-	}else
-#endif
-    		pbch_tx_ant = rx_pbch(&ue->common_vars,
-                          ue->pbch_vars[eNB_id],
-                          &ue->frame_parms,
-                          eNB_id,
-                          ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI,
-                          ue->high_speed_flag,
-                          pbch_phase);
+    if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
+      pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
+                                   ue->pbch_vars[eNB_id],
+                                   &ue->frame_parms,
+                                   eNB_id,
+                                   ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI,
+                                   ue->high_speed_flag,
+                                   pbch_phase);
+    } else
+      pbch_tx_ant = rx_pbch(&ue->common_vars,
+                            ue->pbch_vars[eNB_id],
+                            &ue->frame_parms,
+                            eNB_id,
+                            ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI,
+                            ue->high_speed_flag,
+                            pbch_phase);
 
     if ((pbch_tx_ant>0) && (pbch_tx_ant<=4)) {
       break;
@@ -2462,22 +2433,17 @@ void ue_pbch_procedures(uint8_t eNB_id,
       return;
     }
 
-
     ue->pbch_vars[eNB_id]->pdu_errors_conseq = 0;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-        if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)){
-		frame_tx  = (int)((ue->pbch_vars[eNB_id]->decoded_output[2]&31)<<1);
-		frame_tx += ue->pbch_vars[eNB_id]->decoded_output[1]>>7;
-		frame_tx +=4*pbch_phase;	
-	}else{
-#endif
-    		frame_tx = (((int)(ue->pbch_vars[eNB_id]->decoded_output[2]&0x03))<<8);
-    		frame_tx += ((int)(ue->pbch_vars[eNB_id]->decoded_output[1]&0xfc));
-    		frame_tx += pbch_phase;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	}
-#endif
+    if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
+      frame_tx  = (int)((ue->pbch_vars[eNB_id]->decoded_output[2]&31)<<1);
+      frame_tx += ue->pbch_vars[eNB_id]->decoded_output[1]>>7;
+      frame_tx +=4*pbch_phase;
+    } else {
+      frame_tx = (((int)(ue->pbch_vars[eNB_id]->decoded_output[2]&0x03))<<8);
+      frame_tx += ((int)(ue->pbch_vars[eNB_id]->decoded_output[1]&0xfc));
+      frame_tx += pbch_phase;
+    }
 
     if (ue->mac_enabled==1) {
       dl_phy_sync_success(ue->Mod_id,frame_rx,eNB_id,
@@ -2577,10 +2543,9 @@ void ue_pbch_procedures(uint8_t eNB_id,
 
 
 int ue_pdcch_procedures(uint8_t eNB_id,
-		                PHY_VARS_UE *ue,
-						UE_rxtx_proc_t *proc,
-						uint8_t abstraction_flag)
-{
+                        PHY_VARS_UE *ue,
+                        UE_rxtx_proc_t *proc,
+                        uint8_t abstraction_flag) {
   unsigned int dci_cnt=0, i;
   int frame_rx = proc->frame_rx;
   int subframe_rx = proc->subframe_rx;
@@ -2903,19 +2868,15 @@ int ue_pdcch_procedures(uint8_t eNB_id,
 
 
 void ue_pmch_procedures(PHY_VARS_UE *ue,
-		                UE_rxtx_proc_t *proc,
-						int eNB_id,
-						int abstraction_flag
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-, uint8_t fembms_flag
-#endif
-) {
+                        UE_rxtx_proc_t *proc,
+                        int eNB_id,
+                        int abstraction_flag,
+                        uint8_t fembms_flag
+                       ) {
   int subframe_rx = proc->subframe_rx;
   int frame_rx = proc->frame_rx;
   int pmch_mcs=-1;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   int CC_id = ue->CC_id;
-#endif
   uint8_t sync_area=255;
   uint8_t mcch_active;
   int l;
@@ -2925,7 +2886,6 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
     // LOG_D(PHY,"ue calling pmch subframe ..\n ");
     LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n",
           ue->Mod_id,frame_rx,subframe_rx);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     pmch_mcs = ue_query_mch(ue->Mod_id,
                             CC_id,
                             frame_rx,
@@ -2933,79 +2893,68 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
                             eNB_id,
                             &sync_area,
                             &mcch_active);
-#else
-    pmch_mcs=-1;
-#endif
 
     if (pmch_mcs>=0) {
       LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Programming PMCH demodulation for mcs %d\n",ue->Mod_id,frame_rx,subframe_rx,pmch_mcs);
       fill_UE_dlsch_MCH(ue,pmch_mcs,1,0,0);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      if(fembms_flag /*subframe_rx == 3 || subframe_rx == 2*/){
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25, VCD_FUNCTION_IN);
-	slot_fep_mbsfn_khz_1dot25(ue,subframe_rx,0);	
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25, VCD_FUNCTION_OUT);
-      }
-      else{
-#endif
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN, VCD_FUNCTION_IN);
-      for (l=2; l<12; l++) {
-        slot_fep_mbsfn(ue,
-                       l,
-                       subframe_rx,
-                       0,0);//ue->rx_offset,0);
-      }
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN, VCD_FUNCTION_OUT);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      }
-#endif
+      if(fembms_flag /*subframe_rx == 3 || subframe_rx == 2*/) {
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25, VCD_FUNCTION_IN);
+        slot_fep_mbsfn_khz_1dot25(ue,subframe_rx,0);
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25, VCD_FUNCTION_OUT);
+      } else {
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN, VCD_FUNCTION_IN);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-      if(fembms_flag /*subframe_rx == 3 || subframe_rx == 2*/){
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25, VCD_FUNCTION_IN);
-	rx_pmch_khz_1dot25(ue,0,subframe_rx,pmch_mcs);
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25, VCD_FUNCTION_OUT);
+        for (l=2; l<12; l++) {
+          slot_fep_mbsfn(ue,
+                         l,
+                         subframe_rx,
+                         0,0);//ue->rx_offset,0);
+        }
 
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN, VCD_FUNCTION_OUT);
       }
-      else{
-#endif
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH, VCD_FUNCTION_IN);
-      for (l=2; l<12; l++) {
-        rx_pmch(ue,
-                0,
-                subframe_rx,
-                l);
-      }
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH, VCD_FUNCTION_OUT);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
+      if(fembms_flag /*subframe_rx == 3 || subframe_rx == 2*/) {
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25, VCD_FUNCTION_IN);
+        rx_pmch_khz_1dot25(ue,0,subframe_rx,pmch_mcs);
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25, VCD_FUNCTION_OUT);
+      } else {
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH, VCD_FUNCTION_IN);
+
+        for (l=2; l<12; l++) {
+          rx_pmch(ue,
+                  0,
+                  subframe_rx,
+                  l);
+        }
+
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH, VCD_FUNCTION_OUT);
       }
-#endif
 
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING, VCD_FUNCTION_IN);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING, VCD_FUNCTION_IN);
       ue->dlsch_MCH[0]->harq_processes[0]->Qm = get_Qm(pmch_mcs);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
       if(fembms_flag /*subframe_rx == 3 || subframe_rx == 2*/)
-      	ue->dlsch_MCH[0]->harq_processes[0]->G = get_G_khz_1dot25(&ue->frame_parms,
-	   	ue->dlsch_MCH[0]->harq_processes[0]->nb_rb,
-          	ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even,
-          	ue->dlsch_MCH[0]->harq_processes[0]->Qm,
-          	1,
-          	2,
-          	frame_rx,
-          	subframe_rx,
-          	0);
+        ue->dlsch_MCH[0]->harq_processes[0]->G = get_G_khz_1dot25(&ue->frame_parms,
+            ue->dlsch_MCH[0]->harq_processes[0]->nb_rb,
+            ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even,
+            ue->dlsch_MCH[0]->harq_processes[0]->Qm,
+            1,
+            2,
+            frame_rx,
+            subframe_rx,
+            0);
       else
-#endif
-      	ue->dlsch_MCH[0]->harq_processes[0]->G = get_G(&ue->frame_parms,
-          	ue->dlsch_MCH[0]->harq_processes[0]->nb_rb,
-          	ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even,
-          	ue->dlsch_MCH[0]->harq_processes[0]->Qm,
-          	1,
-          	2,
-          	frame_rx,
-          	subframe_rx,
-          	0);
+        ue->dlsch_MCH[0]->harq_processes[0]->G = get_G(&ue->frame_parms,
+            ue->dlsch_MCH[0]->harq_processes[0]->nb_rb,
+            ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even,
+            ue->dlsch_MCH[0]->harq_processes[0]->Qm,
+            1,
+            2,
+            frame_rx,
+            subframe_rx,
+            0);
 
       dlsch_unscrambling(&ue->frame_parms,1,ue->dlsch_MCH[0],
                          ue->dlsch_MCH[0]->harq_processes[0]->G,
@@ -3025,7 +2974,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_D
                            subframe_rx,
                            0,
                            0,1);
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING, VCD_FUNCTION_OUT);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING, VCD_FUNCTION_OUT);
 
       if (mcch_active == 1)
         ue->dlsch_mcch_trials[sync_area][0]++;
@@ -3047,7 +2996,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_D
               ue->dlsch_MCH[0]->max_turbo_iterations,
               ue->dlsch_MCH[0]->harq_processes[0]->G);
         // dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx);
-	//if(subframe_rx == 3){
+        //if(subframe_rx == 3){
         //dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx);
         //exit_fun("nothing to add");
         //}
@@ -3063,7 +3012,6 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_D
         //  if (subframe_rx==9)
         //  mac_xface->macphy_exit("Why are we exiting here?");
       } else { // decoding successful
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
         LOG_D(PHY,"[UE %d] Frame %d, subframe %d: PMCH OK (%d,%d), passing to L2 (TBS %d, iter %d,G %d)\n",
               ue->Mod_id,
               frame_rx,subframe_rx,
@@ -3072,7 +3020,6 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_D
               ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3,
               ue->dlsch_MCH[0]->max_turbo_iterations,
               ue->dlsch_MCH[0]->harq_processes[0]->G);
-
         ue_send_mch_sdu(ue->Mod_id,
                         CC_id,
                         frame_rx,
@@ -3092,16 +3039,13 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_D
           ue->dlsch_mch_received[0]+=1;
           ue->dlsch_mch_received_sf[subframe_rx][0]=1;
         }
-
-#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
       } // decoding sucessful
     } // pmch_mcs>=0
   } // is_pmch_subframe=true
 }
 
 void copy_harq_proc_struct(LTE_DL_UE_HARQ_t *harq_processes_dest,
-		                   LTE_DL_UE_HARQ_t *current_harq_processes)
-{
+                           LTE_DL_UE_HARQ_t *current_harq_processes) {
   harq_processes_dest->B              = current_harq_processes->B              ;
   harq_processes_dest->C              = current_harq_processes->C              ;
   harq_processes_dest->Cminus         = current_harq_processes->Cminus         ;
@@ -3142,15 +3086,14 @@ void copy_ack_struct(harq_status_t *harq_ack_dest, harq_status_t *current_harq_a
 }
 
 void ue_pdsch_procedures(PHY_VARS_UE *ue,
-		                 UE_rxtx_proc_t *proc,
-						 int eNB_id,
-						 PDSCH_t pdsch,
-						 LTE_UE_DLSCH_t *dlsch0,
-						 LTE_UE_DLSCH_t *dlsch1,
-						 int s0,
-						 int s1,
-						 int abstraction_flag)
-{
+                         UE_rxtx_proc_t *proc,
+                         int eNB_id,
+                         PDSCH_t pdsch,
+                         LTE_UE_DLSCH_t *dlsch0,
+                         LTE_UE_DLSCH_t *dlsch1,
+                         int s0,
+                         int s1,
+                         int abstraction_flag) {
   int subframe_rx = proc->subframe_rx;
   int m;
   int harq_pid;
@@ -3238,11 +3181,10 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue,
 }
 
 void process_rar(PHY_VARS_UE *ue,
-		         UE_rxtx_proc_t *proc,
-				 int eNB_id,
-				 runmode_t mode,
-				 int abstraction_flag)
-{
+                 UE_rxtx_proc_t *proc,
+                 int eNB_id,
+                 runmode_t mode,
+                 int abstraction_flag) {
   int frame_rx = proc->frame_rx;
   int subframe_rx = proc->subframe_rx;
   int timing_advance;
@@ -3329,8 +3271,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
                          LTE_UE_DLSCH_t *dlsch1,
                          int *dlsch_errors,
                          runmode_t mode,
-                         int abstraction_flag)
-{
+                         int abstraction_flag) {
   int harq_pid;
   int frame_rx = proc->frame_rx;
   int subframe_rx = proc->subframe_rx;
@@ -3576,31 +3517,22 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
             break;
 
           case SI_PDSCH:
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-            if(subframe_rx == 0) { 
-               ue_decode_si_mbms(ue->Mod_id,
-                         CC_id,
-                         frame_rx,
-                         eNB_id,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
+            if(subframe_rx == 0) {
+              ue_decode_si_mbms(ue->Mod_id,
+                                CC_id,
+                                frame_rx,
+                                eNB_id,
+                                ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
+                                ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
+            } else {
+              ue_decode_si(ue->Mod_id,
+                           CC_id,
+                           frame_rx,
+                           eNB_id,
+                           ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
+                           ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
+            }
 
-	    } else {
-            	ue_decode_si(ue->Mod_id,
-                         CC_id,
-                         frame_rx,
-                         eNB_id,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
-	    }
-#else
-       	ue_decode_si(ue->Mod_id,
-                         CC_id,
-                         frame_rx,
-                         eNB_id,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
-                         ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
-#endif
             break;
 
           case P_PDSCH:
@@ -3989,12 +3921,11 @@ void *UE_thread_slot1_dl_processing(void *arg) {
 
 #ifdef UE_SLOT_PARALLELISATION
 int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,
-		                                      UE_rxtx_proc_t *proc,
-											  uint8_t eNB_id,
-                                              uint8_t abstraction_flag,
-											  uint8_t do_pdcch_flag,
-											  runmode_t mode)
-{
+    UE_rxtx_proc_t *proc,
+    uint8_t eNB_id,
+    uint8_t abstraction_flag,
+    uint8_t do_pdcch_flag,
+    runmode_t mode) {
   int l,l2;
   int pmch_flag=0;
   int frame_rx = proc->frame_rx;
@@ -4471,12 +4402,11 @@ void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
 }
 
 int phy_procedures_UE_RX(PHY_VARS_UE *ue,
-		                 UE_rxtx_proc_t *proc,
-						 uint8_t eNB_id,
+                         UE_rxtx_proc_t *proc,
+                         uint8_t eNB_id,
                          uint8_t abstraction_flag,
-						 uint8_t do_pdcch_flag,
-						 runmode_t mode)
-{
+                         uint8_t do_pdcch_flag,
+                         runmode_t mode) {
   int l,l2;
   int pilot1;
   int pmch_flag=0;
@@ -4500,414 +4430,403 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,
     start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
   }
 
+  if(is_fembms_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
+    ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag,1);
+    return 0;
+  } else { // this gets closed at end
+    pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  if(is_fembms_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms)){
-	ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag,1);
-	return 0;
-  }else{ // this gets closed at end
-#endif
-
+    if (do_pdcch_flag) {
+      // deactivate reception until we scan pdcch
+      if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0])
+        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active = 0;
 
-  pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
+      if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1])
+        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1]->active = 0;
 
-  if (do_pdcch_flag) {
-    // deactivate reception until we scan pdcch
-    if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0])
-      ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active = 0;
+      if (ue->dlsch_SI[eNB_id])
+        ue->dlsch_SI[eNB_id]->active = 0;
 
-    if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1])
-      ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1]->active = 0;
+      if (ue->dlsch_p[eNB_id])
+        ue->dlsch_p[eNB_id]->active = 0;
 
-    if (ue->dlsch_SI[eNB_id])
-      ue->dlsch_SI[eNB_id]->active = 0;
+      if (ue->dlsch_ra[eNB_id])
+        ue->dlsch_ra[eNB_id]->active = 0;
+    }
 
-    if (ue->dlsch_p[eNB_id])
-      ue->dlsch_p[eNB_id]->active = 0;
+    if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
+      LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n",
+            ue->Mod_id,frame_rx, subframe_rx);
+    }
 
-    if (ue->dlsch_ra[eNB_id])
-      ue->dlsch_ra[eNB_id]->active = 0;
-  }
+    if (ue->frame_parms.Ncp == 0) {  // normal prefix
+      pilot1 = 4;
+    } else { // extended prefix
+      pilot1 = 3;
+    }
 
-  if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
-    LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n",
-          ue->Mod_id,frame_rx, subframe_rx);
-  }
+    if (subframe_select(&ue->frame_parms,subframe_rx) == SF_S) { // S-subframe, do first 5 symbols only
+      l2 = 4;
+    } else if (pmch_flag == 1) { // do first 2 symbols only
+      l2 = 1;
+    } else { // normal subframe, last symbol to be processed is the first of the second slot
+      l2 = (ue->frame_parms.symbols_per_tti/2)-1;
+    }
 
-  if (ue->frame_parms.Ncp == 0) {  // normal prefix
-    pilot1 = 4;
-  } else { // extended prefix
-    pilot1 = 3;
-  }
+    int prev_subframe_rx = (subframe_rx - 1)<0? 9: (subframe_rx - 1);
 
-  if (subframe_select(&ue->frame_parms,subframe_rx) == SF_S) { // S-subframe, do first 5 symbols only
-    l2 = 4;
-  } else if (pmch_flag == 1) { // do first 2 symbols only
-    l2 = 1;
-  } else { // normal subframe, last symbol to be processed is the first of the second slot
-    l2 = (ue->frame_parms.symbols_per_tti/2)-1;
-  }
+    if (subframe_select(&ue->frame_parms,prev_subframe_rx) != SF_DL) {
+      //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      // RX processing of symbols l=0...l2
+      //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      l=0;
+    } else {
+      //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      // RX processing of symbols l=1...l2 (l=0 is done in last scheduling epoch)
+      //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      l=1;
+    }
 
-  int prev_subframe_rx = (subframe_rx - 1)<0? 9: (subframe_rx - 1);
+    LOG_D(PHY," ------ slot 0 Processing: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+    LOG_D(PHY," ------  --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  if (subframe_select(&ue->frame_parms,prev_subframe_rx) != SF_DL) {
-    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    // RX processing of symbols l=0...l2
-    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    l=0;
-  } else {
-    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    // RX processing of symbols l=1...l2 (l=0 is done in last scheduling epoch)
-    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-    l=1;
-  }
+    for (; l<=l2; l++) {
+      if (abstraction_flag == 0) {
+        if (LOG_DEBUGFLAG(UE_TIMING)) {
+          start_meas(&ue->ofdm_demod_stats);
+        }
 
-  LOG_D(PHY," ------ slot 0 Processing: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
-  LOG_D(PHY," ------  --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
+        slot_fep(ue,
+                 l,
+                 (subframe_rx<<1),
+                 0,
+                 0,
+                 0);
+        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
 
-  for (; l<=l2; l++) {
-    if (abstraction_flag == 0) {
-      if (LOG_DEBUGFLAG(UE_TIMING)) {
-        start_meas(&ue->ofdm_demod_stats);
+        if (LOG_DEBUGFLAG(UE_TIMING)) {
+          stop_meas(&ue->ofdm_demod_stats);
+        }
       }
 
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
-      slot_fep(ue,
-               l,
-               (subframe_rx<<1),
-               0,
-               0,
-               0);
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
+      ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode);
 
-      if (LOG_DEBUGFLAG(UE_TIMING)) {
-        stop_meas(&ue->ofdm_demod_stats);
+      if (do_pdcch_flag) {
+        if ((l==pilot1) ||
+            ((pmch_flag==1)&&(l==l2)))  {
+          LOG_D(PHY,"[UE  %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id);
+
+          //start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
+          if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
+            LOG_E(PHY,"[UE  %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
+            return(-1);
+          }
+
+          //stop_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
+          //printf("subframe %d n_pdcch_sym %d pdcch procedures  %5.3f \n",
+          //        subframe_rx, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
+          //     (ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
+          LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols);
+        }
       }
-    }
+    } // for l=1..l2
 
     ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode);
+    LOG_D(PHY," ------  end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-    if (do_pdcch_flag) {
-      if ((l==pilot1) ||
-          ((pmch_flag==1)&&(l==l2)))  {
-        LOG_D(PHY,"[UE  %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id);
-
-        //start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
-        if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
-          LOG_E(PHY,"[UE  %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
-          return(-1);
-        }
+    // If this is PMCH, call procedures, do channel estimation for first symbol of next DL subframe and return
+    if (pmch_flag == 1) {
+      ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag,
+                         0 );
+      int next_subframe_rx = (1+subframe_rx)%10;
 
-        //stop_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
-        //printf("subframe %d n_pdcch_sym %d pdcch procedures  %5.3f \n",
-        //        subframe_rx, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
-        //     (ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
-        LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols);
+      if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL) {
+        slot_fep(ue,
+                 0,
+                 (next_subframe_rx<<1),
+                 0,
+                 0,
+                 0);
       }
-    }
-  } // for l=1..l2
 
-  ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode);
-  LOG_D(PHY," ------  end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+      return 0;
+    }
 
-  // If this is PMCH, call procedures, do channel estimation for first symbol of next DL subframe and return
-  if (pmch_flag == 1) {
-    ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-,0
-#endif
-);
-    int next_subframe_rx = (1+subframe_rx)%10;
+    slot_fep(ue,
+             0,
+             1+(subframe_rx<<1),
+             0,
+             0,
+             0);
 
-    if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL) {
-      slot_fep(ue,
-               0,
-               (next_subframe_rx<<1),
-               0,
-               0,
-               0);
+    // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
+    if (LOG_DEBUGFLAG(UE_TIMING)) {
+      stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
+      LOG_I(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
     }
 
-    return 0;
-  }
-
-  slot_fep(ue,
-           0,
-           1+(subframe_rx<<1),
-           0,
-           0,
-           0);
+    LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
-  if (LOG_DEBUGFLAG(UE_TIMING)) {
-    stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
-    LOG_I(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
-  }
+    if (LOG_DEBUGFLAG(UE_TIMING)) {
+      start_meas(&ue->generic_stat);
+      start_meas(&ue->crnti_procedures_stats);
+    }
 
-  LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+    // do procedures for C-RNTI
+    if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          PDSCH,
+                          ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
+                          NULL,
+                          ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
+                          ue->frame_parms.symbols_per_tti>>1,
+                          abstraction_flag);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
+    }
 
-  if (LOG_DEBUGFLAG(UE_TIMING)) {
-    start_meas(&ue->generic_stat);
-    start_meas(&ue->crnti_procedures_stats);
-  }
+    if (LOG_DEBUGFLAG(UE_TIMING)) {
+      stop_meas(&ue->crnti_procedures_stats);
+    }
 
-  // do procedures for C-RNTI
-  if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        PDSCH,
-                        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
-                        NULL,
-                        ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
-                        ue->frame_parms.symbols_per_tti>>1,
-                        abstraction_flag);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
-  }
+    LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  if (LOG_DEBUGFLAG(UE_TIMING)) {
-    stop_meas(&ue->crnti_procedures_stats);
-  }
+    // do procedures for SI-RNTI
+    if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          SI_PDSCH,
+                          ue->dlsch_SI[eNB_id],
+                          NULL,
+                          ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
+                          ue->frame_parms.symbols_per_tti>>1,
+                          abstraction_flag);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
+    }
 
-  LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+    // do procedures for SI-RNTI
+    if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          P_PDSCH,
+                          ue->dlsch_p[eNB_id],
+                          NULL,
+                          ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
+                          ue->frame_parms.symbols_per_tti>>1,
+                          abstraction_flag);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
+    }
 
-  // do procedures for SI-RNTI
-  if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        SI_PDSCH,
-                        ue->dlsch_SI[eNB_id],
-                        NULL,
-                        ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
-                        ue->frame_parms.symbols_per_tti>>1,
-                        abstraction_flag);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
-  }
+    // do procedures for RA-RNTI
+    if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          RA_PDSCH,
+                          ue->dlsch_ra[eNB_id],
+                          NULL,
+                          ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
+                          ue->frame_parms.symbols_per_tti>>1,
+                          abstraction_flag);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
+    }
 
-  // do procedures for SI-RNTI
-  if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        P_PDSCH,
-                        ue->dlsch_p[eNB_id],
-                        NULL,
-                        ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
-                        ue->frame_parms.symbols_per_tti>>1,
-                        abstraction_flag);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
-  }
+    LOG_D(PHY," ------ slot 1 Processing: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+    LOG_D(PHY," ------  --> FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  // do procedures for RA-RNTI
-  if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        RA_PDSCH,
-                        ue->dlsch_ra[eNB_id],
-                        NULL,
-                        ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
-                        ue->frame_parms.symbols_per_tti>>1,
-                        abstraction_flag);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
-  }
+    if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) {  // do front-end processing for second slot, and first symbol of next subframe
+      for (l=1; l<ue->frame_parms.symbols_per_tti>>1; l++) {
+        if (abstraction_flag == 0) {
+          if (LOG_DEBUGFLAG(UE_TIMING)) {
+            start_meas(&ue->ofdm_demod_stats);
+          }
 
-  LOG_D(PHY," ------ slot 1 Processing: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
-  LOG_D(PHY," ------  --> FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+          VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
+          slot_fep(ue,
+                   l,
+                   1+(subframe_rx<<1),
+                   0,
+                   0,
+                   0);
+          VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
 
-  if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) {  // do front-end processing for second slot, and first symbol of next subframe
-    for (l=1; l<ue->frame_parms.symbols_per_tti>>1; l++) {
-      if (abstraction_flag == 0) {
-        if (LOG_DEBUGFLAG(UE_TIMING)) {
-          start_meas(&ue->ofdm_demod_stats);
+          if (LOG_DEBUGFLAG(UE_TIMING)) {
+            stop_meas(&ue->ofdm_demod_stats);
+          }
         }
 
-        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
+        ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode);
+      } // for l=1..l2
+
+      ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode);
+      // do first symbol of next downlink subframe for channel estimation
+      int next_subframe_rx = (1+subframe_rx)%10;
+
+      if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL) {
         slot_fep(ue,
-                 l,
-                 1+(subframe_rx<<1),
+                 0,
+                 (next_subframe_rx<<1),
                  0,
                  0,
                  0);
-        VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
-
-        if (LOG_DEBUGFLAG(UE_TIMING)) {
-          stop_meas(&ue->ofdm_demod_stats);
-        }
       }
+    } // not an S-subframe
 
-      ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode);
-    } // for l=1..l2
+    if(LOG_DEBUGFLAG(UE_TIMING)) {
+      stop_meas(&ue->generic_stat);
+      LOG_I(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
+    }
 
-    ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode);
-    // do first symbol of next downlink subframe for channel estimation
-    int next_subframe_rx = (1+subframe_rx)%10;
+    LOG_D(PHY," ------  end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-    if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL) {
-      slot_fep(ue,
-               0,
-               (next_subframe_rx<<1),
-               0,
-               0,
-               0);
+    if ( (subframe_rx == 0) && (ue->decode_MIB == 1)) {
+      ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag);
     }
-  } // not an S-subframe
 
-  if(LOG_DEBUGFLAG(UE_TIMING)) {
-    stop_meas(&ue->generic_stat);
-    LOG_I(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
-  }
+    // do procedures for C-RNTI
+    LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  LOG_D(PHY," ------  end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+    if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
 
-  if ( (subframe_rx == 0) && (ue->decode_MIB == 1)) {
-    ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag);
-  }
+      if (LOG_DEBUGFLAG(UE_TIMING)) {
+        start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
+      }
 
-  // do procedures for C-RNTI
-  LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          PDSCH,
+                          ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
+                          NULL,
+                          1+(ue->frame_parms.symbols_per_tti>>1),
+                          ue->frame_parms.symbols_per_tti-1,
+                          abstraction_flag);
+      LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+      LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
 
-  if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+      if (LOG_DEBUGFLAG(UE_TIMING)) {
+        stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
+        start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
+      }
 
-    if (LOG_DEBUGFLAG(UE_TIMING)) {
-      start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
-    }
+      ue_dlsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          PDSCH,
+                          ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
+                          ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1],
+                          &ue->dlsch_errors[eNB_id],
+                          mode,
+                          abstraction_flag);
 
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        PDSCH,
-                        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
-                        NULL,
-                        1+(ue->frame_parms.symbols_per_tti>>1),
-                        ue->frame_parms.symbols_per_tti-1,
-                        abstraction_flag);
-    LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
-    LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------  \n", frame_rx%1024, subframe_rx);
+      if (LOG_DEBUGFLAG(UE_TIMING)) {
+        stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
+        LOG_I(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
+        LOG_I(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
+      }
 
-    if (LOG_DEBUGFLAG(UE_TIMING)) {
-      stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
-      start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
     }
 
-    ue_dlsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        PDSCH,
-                        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
-                        ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1],
-                        &ue->dlsch_errors[eNB_id],
-                        mode,
-                        abstraction_flag);
-
     if (LOG_DEBUGFLAG(UE_TIMING)) {
-      stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
-      LOG_I(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
-      LOG_I(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
+      start_meas(&ue->generic_stat);
     }
 
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
-  }
-
-  if (LOG_DEBUGFLAG(UE_TIMING)) {
-    start_meas(&ue->generic_stat);
-  }
-
-  if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
-    if(subframe_rx==5 &&  ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20) {
-      //LOG_M("decoder_llr.m","decllr",dlsch_llr,G,1,0);
-      //LOG_M("llr.m","llr",  &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
-      LOG_M("rxdataF0_current.m", "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
-      //LOG_M("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
-      //LOG_M("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
-      LOG_M("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[0][0][0],14*ue->frame_parms.ofdm_symbol_size,1,
-            1);
-      LOG_M("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_estimates_ext[0][0],14*ue->frame_parms.N_RB_DL*12,1,1);
-      LOG_M("rxdataF_comp00.m","rxdataF_comp00",     &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->rxdataF_comp0[0][0],14*ue->frame_parms.N_RB_DL*12,1,1);
-      //LOG_M("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_mag0[0][0],14*frame_parms->N_RB_DL*12,1,1);
-      //LOG_M("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_magb0[0][0],14*frame_parms->N_RB_DL*12,1,1);
-      AssertFatal (0,"");
+    if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
+      if(subframe_rx==5 &&  ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20) {
+        //LOG_M("decoder_llr.m","decllr",dlsch_llr,G,1,0);
+        //LOG_M("llr.m","llr",  &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
+        LOG_M("rxdataF0_current.m", "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
+        //LOG_M("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
+        //LOG_M("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
+        LOG_M("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[0][0][0],14*ue->frame_parms.ofdm_symbol_size,1,
+              1);
+        LOG_M("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_estimates_ext[0][0],14*ue->frame_parms.N_RB_DL*12,1,1);
+        LOG_M("rxdataF_comp00.m","rxdataF_comp00",     &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->rxdataF_comp0[0][0],14*ue->frame_parms.N_RB_DL*12,1,1);
+        //LOG_M("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_mag0[0][0],14*frame_parms->N_RB_DL*12,1,1);
+        //LOG_M("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_magb0[0][0],14*frame_parms->N_RB_DL*12,1,1);
+        AssertFatal (0,"");
+      }
     }
-  }
-
-  // do procedures for SI-RNTI
-  if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        SI_PDSCH,
-                        ue->dlsch_SI[eNB_id],
-                        NULL,
-                        1+(ue->frame_parms.symbols_per_tti>>1),
-                        ue->frame_parms.symbols_per_tti-1,
-                        abstraction_flag);
-    ue_dlsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        SI_PDSCH,
-                        ue->dlsch_SI[eNB_id],
-                        NULL,
-                        &ue->dlsch_SI_errors[eNB_id],
-                        mode,
-                        abstraction_flag);
-    ue->dlsch_SI[eNB_id]->active = 0;
-  }
 
-  // do procedures for P-RNTI
-  if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        P_PDSCH,
-                        ue->dlsch_p[eNB_id],
-                        NULL,
-                        1+(ue->frame_parms.symbols_per_tti>>1),
-                        ue->frame_parms.symbols_per_tti-1,
-                        abstraction_flag);
-    ue_dlsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        P_PDSCH,
-                        ue->dlsch_p[eNB_id],
-                        NULL,
-                        &ue->dlsch_p_errors[eNB_id],
-                        mode,
-                        abstraction_flag);
-    ue->dlsch_p[eNB_id]->active = 0;
-  }
+    // do procedures for SI-RNTI
+    if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          SI_PDSCH,
+                          ue->dlsch_SI[eNB_id],
+                          NULL,
+                          1+(ue->frame_parms.symbols_per_tti>>1),
+                          ue->frame_parms.symbols_per_tti-1,
+                          abstraction_flag);
+      ue_dlsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          SI_PDSCH,
+                          ue->dlsch_SI[eNB_id],
+                          NULL,
+                          &ue->dlsch_SI_errors[eNB_id],
+                          mode,
+                          abstraction_flag);
+      ue->dlsch_SI[eNB_id]->active = 0;
+    }
 
-  // do procedures for RA-RNTI
-  if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
-    ue_pdsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        RA_PDSCH,
-                        ue->dlsch_ra[eNB_id],
-                        NULL,
-                        1+(ue->frame_parms.symbols_per_tti>>1),
-                        ue->frame_parms.symbols_per_tti-1,
-                        abstraction_flag);
-    ue_dlsch_procedures(ue,
-                        proc,
-                        eNB_id,
-                        RA_PDSCH,
-                        ue->dlsch_ra[eNB_id],
-                        NULL,
-                        &ue->dlsch_ra_errors[eNB_id],
-                        mode,
-                        abstraction_flag);
-    ue->dlsch_ra[eNB_id]->active = 0;
-  }
+    // do procedures for P-RNTI
+    if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          P_PDSCH,
+                          ue->dlsch_p[eNB_id],
+                          NULL,
+                          1+(ue->frame_parms.symbols_per_tti>>1),
+                          ue->frame_parms.symbols_per_tti-1,
+                          abstraction_flag);
+      ue_dlsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          P_PDSCH,
+                          ue->dlsch_p[eNB_id],
+                          NULL,
+                          &ue->dlsch_p_errors[eNB_id],
+                          mode,
+                          abstraction_flag);
+      ue->dlsch_p[eNB_id]->active = 0;
+    }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+    // do procedures for RA-RNTI
+    if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
+      ue_pdsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          RA_PDSCH,
+                          ue->dlsch_ra[eNB_id],
+                          NULL,
+                          1+(ue->frame_parms.symbols_per_tti>>1),
+                          ue->frame_parms.symbols_per_tti-1,
+                          abstraction_flag);
+      ue_dlsch_procedures(ue,
+                          proc,
+                          eNB_id,
+                          RA_PDSCH,
+                          ue->dlsch_ra[eNB_id],
+                          NULL,
+                          &ue->dlsch_ra_errors[eNB_id],
+                          mode,
+                          abstraction_flag);
+      ue->dlsch_ra[eNB_id]->active = 0;
+    }
   } // This commes from feMBMS subframe filtering !
-#endif
 
   // duplicate harq structure
   uint8_t          current_harq_pid        = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid;
@@ -4963,12 +4882,11 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,
 
 
 void phy_procedures_UE_lte(PHY_VARS_UE *ue,
-		                   UE_rxtx_proc_t *proc,
-						   uint8_t eNB_id,
-						   uint8_t abstraction_flag,
-						   uint8_t do_pdcch_flag,
-						   runmode_t mode)
-{
+                           UE_rxtx_proc_t *proc,
+                           uint8_t eNB_id,
+                           uint8_t abstraction_flag,
+                           uint8_t do_pdcch_flag,
+                           runmode_t mode) {
 #if defined(ENABLE_ITTI)
   MessageDef   *msg_p;
   int           result;
@@ -4998,14 +4916,14 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,
 
     if (msg_p != NULL) {
       switch (ITTI_MSG_ID(msg_p)) {
-      case PHY_FIND_CELL_REQ:
-    	  LOG_I(PHY, "[UE ] Received %s\n", ITTI_MSG_NAME (msg_p));
-    	  /* TODO process the message */
-    	  break;
-
-      default:
-    	  LOG_E(PHY, "[UE %d] Received unexpected message %s\n", ITTI_MSG_INSTANCE (msg_p) , ITTI_MSG_NAME (msg_p));
-    	  break;
+        case PHY_FIND_CELL_REQ:
+          LOG_I(PHY, "[UE ] Received %s\n", ITTI_MSG_NAME (msg_p));
+          /* TODO process the message */
+          break;
+
+        default:
+          LOG_E(PHY, "[UE %d] Received unexpected message %s\n", ITTI_MSG_INSTANCE (msg_p), ITTI_MSG_NAME (msg_p));
+          break;
       }
 
       result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
diff --git a/openair2/COMMON/mac_rrc_primitives.h b/openair2/COMMON/mac_rrc_primitives.h
index ab05f394a1c9d04d2490ba5a9527f448dd834034..8a58d07d65a4d731ac161fdf90d52d242a29aec9 100644
--- a/openair2/COMMON/mac_rrc_primitives.h
+++ b/openair2/COMMON/mac_rrc_primitives.h
@@ -25,7 +25,7 @@
 
 
 #ifndef OPENAIR2_IN
-#include "LAYER2/RLC/rlc.h"
+  #include "LAYER2/RLC/rlc.h"
 #endif
 #include "COMMON/platform_types.h"
 #include "COMMON/platform_constants.h"
@@ -34,12 +34,9 @@
 #include "LTE_RadioResourceConfigDedicated.h"
 #include "LTE_MeasGapConfig.h"
 #include "LTE_TDD-Config.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 #include "LTE_MBSFN-AreaInfoList-r9.h"
 #include "LTE_MBSFN-SubframeConfigList.h"
-#endif
-//#include "rrm_config_structs.h"
-//#include "platform_types.h"
+
 /** @defgroup _mac_rrc_primitives_ MAC Layer Primitives for Communications with RRC
  * @ingroup _openair_mac_layer_specs_
  * @{
@@ -324,9 +321,9 @@ typedef struct {  //RRC_INTERFACE_FUNCTIONS
   RRC_status_t (*rrc_rx_tx)(uint8_t,uint32_t,uint8_t,uint8_t);
   uint8_t (*mac_rrc_data_ind)(uint8_t,uint32_t,uint16_t,uint8_t *,uint16_t,eNB_flag_t eNB_flag, uint8_t eNB_index);
   uint8_t (*mac_rrc_data_req)(uint8_t,uint32_t,uint16_t,uint8_t,uint8_t *,eNB_flag_t eNB_flag, uint8_t eNB_index);
-  void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY*);
+  void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY *);
   void  (*def_meas_ind)(uint8_t, uint8_t);
-  void (*rrc_data_indP)  (module_id_t , rb_id_t , sdu_size_t , char*);
+  void (*rrc_data_indP)  (module_id_t, rb_id_t, sdu_size_t, char *);
   void (*fn_rrc)  (void);
   uint8_t (*get_rrc_status)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t eNB_index);
   double (*rrc_get_estimated_ue_distance) (module_id_t Mod_id, uint8_t UE_id, uint8_t CC_id, uint8_t loc_type);
@@ -339,12 +336,12 @@ typedef struct {
   unsigned short Node_id[NB_MODULES_MAX];
   char Is_cluster_head[NB_MODULES_MAX];
   void (*macphy_exit)(const char *);          /*  Pointer function that stops the low-level scheduler due an exit condition */
-  unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ*);
-  MAC_MEAS_REQ_ENTRY* (*mac_meas_req)(uint8_t ,  MAC_MEAS_REQ*);
+  unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ *);
+  MAC_MEAS_REQ_ENTRY *(*mac_meas_req)(uint8_t,  MAC_MEAS_REQ *);
   void (*mac_out_of_sync_ind)(uint8_t,uint32_t,unsigned short);
   //RLC_INTERFACE_FUNCTIONS
   void (*pdcp_run)(void);
-  void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
+  void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char *);
   signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
   int (*rrc_mac_config_req)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t UE_id,uint8_t eNB_index,
                             LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
@@ -355,32 +352,25 @@ typedef struct {
                             LTE_MeasGapConfig_t *measGapConfig,
                             LTE_TDD_Config_t *tdd_Config,
                             uint8_t *SIwindowsize,
-                            uint16_t *SIperiod
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                            ,
+                            uint16_t *SIperiod,
                             MBMS_flag_t MBMS_Flag,
                             struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
                             LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
                             struct LTE_PMCH_InfoList_r9 *pmch_InfoList
-#endif
                            );
-  unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                  ,uint32_t
-                                  ,uint32_t
-#endif
-                                   );
-  void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
+  unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char *
+                                   ,uint32_t
+                                   ,uint32_t
+                                  );
+  void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char *, tb_size_t, num_tb_t, crc_t * );
   mac_rlc_status_resp_t (*mac_rlc_status_ind)     (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
       logical_chan_id_t channel_idP, tb_size_t tb_sizeP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       ,uint32_t sourceL2Id
       ,uint32_t destinationL2Id
-#endif
-      );
+                                                  );
   signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
-  void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
-                                void  (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
+  void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t, rb_id_t, sdu_size_t, char * ),
+                                void  (*rrc_data_confP) (module_id_t, rb_id_t, mui_t ) ) ;
   void (*mrbch_phy_sync_failure) (uint8_t Mod_id, frame_t frame, uint8_t Free_ch_index);
   void (*dl_phy_sync_success) (uint8_t Mod_id, frame_t frame, uint8_t eNB_index);
 } MAC_RLC_XFACE;
diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h
index 0078f32c88a97803ab371110415b0888a0badb24..ec257f5cebf0a8ed4536c0548e15b4252799cf58 100644
--- a/openair2/COMMON/platform_constants.h
+++ b/openair2/COMMON/platform_constants.h
@@ -34,66 +34,66 @@
 #    define __PLATFORM_CONSTANTS_H__
 
 #ifdef JUMBO_FRAME
-#define NL_MAX_PAYLOAD 18000  /* this should cover the max mtu size*/
+  #define NL_MAX_PAYLOAD 18000  /* this should cover the max mtu size*/
 #else
-#define NL_MAX_PAYLOAD 9000  /* this should cover the max mtu size*/
+  #define NL_MAX_PAYLOAD 9000  /* this should cover the max mtu size*/
 #endif
 
 #ifdef LARGE_SCALE
-#    define NB_MODULES_MAX 128
-#    define NB_NODE_MAX    128
+  #define NB_MODULES_MAX 128
+  #define NB_NODE_MAX    128
 #else
-#    define NB_MODULES_MAX 32
-#    define NB_NODE_MAX    32
+  #define NB_MODULES_MAX 32
+  #define NB_NODE_MAX    32
 #endif
 
 #ifdef JUMBO_FRAME
-#    define MAX_IP_PACKET_SIZE         10000 // 9000
+  #define MAX_IP_PACKET_SIZE         10000 // 9000
 #else
-# if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
-/* SR: When using ethernet network driver the packet size is 1512 :
- * 1500 bytes IP packet + 14 bytes ethernet header
- */
-#   define MAX_IP_PACKET_SIZE          1514
-# else
-#   define MAX_IP_PACKET_SIZE          1500 // 3000
-# endif
+  #if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
+    /* SR: When using ethernet network driver the packet size is 1512 :
+    * 1500 bytes IP packet + 14 bytes ethernet header
+    */
+    #define MAX_IP_PACKET_SIZE          1514
+  #else
+    #define MAX_IP_PACKET_SIZE          1500 // 3000
+  #endif
 #endif
 // overwrite the previous deinitions
 
 #    define MAX_MODULES                NB_MODULES_MAX
 
 #ifndef UE_EXPANSION
-// TODO:L2 FAPI simulator.
-// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
-// in eNB and UE.
-// now , if we use --mu option in UE, compiling error will occur.
-// This problem will be fixed in the future.
-# ifdef UESIM_EXPANSION
-#    define MAX_MOBILES_PER_ENB         256
-#    define MAX_MOBILES_PER_ENB_NB_IoT  256
-#    define MAX_eNB                      2
-# else
-# ifdef LARGE_SCALE
-#    define MAX_MOBILES_PER_ENB         128
-#    define MAX_MOBILES_PER_ENB_NB_IoT  128
-#    define MAX_MOBILES_PER_GNB         128
-#    define MAX_eNB                      2
-#    define MAX_gNB                      2
-# else
-#    define MAX_MOBILES_PER_ENB         4
-#    define MAX_MOBILES_PER_ENB_NB_IoT  4
-#    define MAX_MOBILES_PER_GNB         4
-#    define MAX_eNB                      1
-#    define MAX_gNB                      1
-# endif
-#endif
+  // TODO:L2 FAPI simulator.
+  // UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
+  // in eNB and UE.
+  // now , if we use --mu option in UE, compiling error will occur.
+  // This problem will be fixed in the future.
+  #ifdef UESIM_EXPANSION
+    #define MAX_MOBILES_PER_ENB         256
+    #define MAX_MOBILES_PER_ENB_NB_IoT  256
+    #define MAX_eNB                      2
+  #else
+    #ifdef LARGE_SCALE
+      #define MAX_MOBILES_PER_ENB         128
+      #define MAX_MOBILES_PER_ENB_NB_IoT  128
+      #define MAX_MOBILES_PER_GNB         128
+      #define MAX_eNB                      2
+      #define MAX_gNB                      2
+    #else
+      #define MAX_MOBILES_PER_ENB         16
+      #define MAX_MOBILES_PER_ENB_NB_IoT  16
+      #define MAX_MOBILES_PER_GNB         16
+      #define MAX_eNB                      2
+      #define MAX_gNB                      2
+    #endif
+  #endif
 #else
-#    define MAX_MOBILES_PER_ENB         256
-#    define MAX_MOBILES_PER_ENB_NB_IoT  256
-#    define MAX_MOBILES_PER_GNB         256
-#    define MAX_eNB                      2
-#    define MAX_gNB                      2
+  #define MAX_MOBILES_PER_ENB         256
+  #define MAX_MOBILES_PER_ENB_NB_IoT  256
+  #define MAX_MOBILES_PER_GNB         256
+  #define MAX_eNB                      2
+  #define MAX_gNB                      2
 #endif
 
 #define NUMBER_OF_NR_DLSCH_MAX 4
@@ -109,12 +109,9 @@
 #define DEFAULT_RAB_ID 1
 
 #define NB_RB_MAX      (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 #define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH*LTE_maxServiceCount)
-#else
-// Do not allocate unused memory
-#define NB_RB_MBMS_MAX 1
-#endif
+
 #define NB_RAB_MAX     LTE_maxDRB       /* was 8, now 11 */
 #define RAB_SHIFT1     9
 #define RAB_SHIFT2     3
@@ -143,14 +140,14 @@
 // CBA constant
 #define NUM_MAX_CBA_GROUP 4
 
-#    ifndef __cplusplus
-#        ifndef NULL
-#            define NULL 0
-#        endif
-#        ifndef null
-#            define null 0
-#        endif
-#    endif
+#ifndef __cplusplus
+  #ifndef NULL
+    #define NULL 0
+  #endif
+  #ifndef null
+    #define null 0
+  #endif
+#endif
 
 #define  UNUSED_PARAM_MBMS_SESSION_ID  0
 #define  UNUSED_PARAM_MBMS_SERVICE_ID  0
diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h
index f7e5c3e68bb5c925c0e436a90fce2565b1247148..6eaae52f67e4bf848a9fcdf637a4b2ab481d3999 100644
--- a/openair2/COMMON/rrc_messages_types.h
+++ b/openair2/COMMON/rrc_messages_types.h
@@ -160,15 +160,13 @@ typedef struct RadioResourceConfig_s {
   long                    ue_TimersAndConstants_n311;
   long                    ue_TransmissionMode;
   long                    ue_multiple_max;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   //SIB2 BR Options
-  long*			  preambleTransMax_CE_r13;
-  BOOLEAN_t		  prach_ConfigCommon_v1310;
-  BOOLEAN_t*	          mpdcch_startSF_CSS_RA_r13;
-  long			  mpdcch_startSF_CSS_RA_r13_val;
-  long*			  prach_HoppingOffset_r13;
-#endif
-  BOOLEAN_t		  mbms_dedicated_serving_cell;
+  long       *preambleTransMax_CE_r13;
+  BOOLEAN_t     prach_ConfigCommon_v1310;
+  BOOLEAN_t            *mpdcch_startSF_CSS_RA_r13;
+  long        mpdcch_startSF_CSS_RA_r13_val;
+  long       *prach_HoppingOffset_r13;
+  BOOLEAN_t     mbms_dedicated_serving_cell;
 } RadioResourceConfig;
 
 // eNB: ENB_APP -> RRC messages
@@ -202,43 +200,43 @@ typedef struct RrcConfigurationReq_s {
   RadioResourceConfig     radioresourceconfig[MAX_NUM_CCs];
   RadioResourceConfig     radioresourceconfig_BR[MAX_NUM_CCs];
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
+
   //MIB
-  long	 		  schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
+  long        schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
   //SIB1 BR options
-  uint16_t*		  hyperSFN_r13                           [MAX_NUM_CCs];
-  long*			  eDRX_Allowed_r13                       [MAX_NUM_CCs];
-  BOOLEAN_t		  cellSelectionInfoCE_r13                [MAX_NUM_CCs];
-  long			  q_RxLevMinCE_r13                       [MAX_NUM_CCs];
-  long*			  q_QualMinRSRQ_CE_r13                   [MAX_NUM_CCs];
-  BOOLEAN_t		  bandwidthReducedAccessRelatedInfo_r13  [MAX_NUM_CCs];
+  uint16_t     *hyperSFN_r13                           [MAX_NUM_CCs];
+  long       *eDRX_Allowed_r13                       [MAX_NUM_CCs];
+  BOOLEAN_t     cellSelectionInfoCE_r13                [MAX_NUM_CCs];
+  long        q_RxLevMinCE_r13                       [MAX_NUM_CCs];
+  long       *q_QualMinRSRQ_CE_r13                   [MAX_NUM_CCs];
+  BOOLEAN_t     bandwidthReducedAccessRelatedInfo_r13  [MAX_NUM_CCs];
   long            si_Narrowband_r13         [MAX_NUM_CCs][32];
   long            si_TBS_r13                [MAX_NUM_CCs][32];
   int             scheduling_info_br_size   [MAX_NUM_CCs];
-  long			  si_WindowLength_BR_r13                       [MAX_NUM_CCs];
-  long			  si_RepetitionPattern_r13                     [MAX_NUM_CCs];
-  BOOLEAN_t		 * fdd_DownlinkOrTddSubframeBitmapBR_r13       [MAX_NUM_CCs];
-  uint64_t		  fdd_DownlinkOrTddSubframeBitmapBR_val_r13    [MAX_NUM_CCs];
-  uint16_t		  *fdd_UplinkSubframeBitmapBR_r13              [MAX_NUM_CCs];
-  long			  startSymbolBR_r13                            [MAX_NUM_CCs];
-  long			  si_HoppingConfigCommon_r13                   [MAX_NUM_CCs];
-  long*			  si_ValidityTime_r13                          [MAX_NUM_CCs];
+  long        si_WindowLength_BR_r13                       [MAX_NUM_CCs];
+  long        si_RepetitionPattern_r13                     [MAX_NUM_CCs];
+  BOOLEAN_t     *fdd_DownlinkOrTddSubframeBitmapBR_r13       [MAX_NUM_CCs];
+  uint64_t      fdd_DownlinkOrTddSubframeBitmapBR_val_r13    [MAX_NUM_CCs];
+  uint16_t      *fdd_UplinkSubframeBitmapBR_r13              [MAX_NUM_CCs];
+  long        startSymbolBR_r13                            [MAX_NUM_CCs];
+  long        si_HoppingConfigCommon_r13                   [MAX_NUM_CCs];
+  long       *si_ValidityTime_r13                          [MAX_NUM_CCs];
   long            systemInfoValueTagSi_r13      [MAX_NUM_CCs][10];
   int             system_info_value_tag_SI_size [MAX_NUM_CCs];
-  BOOLEAN_t		  freqHoppingParametersDL_r13                   [MAX_NUM_CCs];
-  long*			  mpdcch_pdsch_HoppingNB_r13                    [MAX_NUM_CCs];
-  BOOLEAN_t		  interval_DLHoppingConfigCommonModeA_r13       [MAX_NUM_CCs];
-  long			  interval_DLHoppingConfigCommonModeA_r13_val   [MAX_NUM_CCs];
-  BOOLEAN_t		  interval_DLHoppingConfigCommonModeB_r13       [MAX_NUM_CCs];
-  long			  interval_DLHoppingConfigCommonModeB_r13_val   [MAX_NUM_CCs];
-  long*			  mpdcch_pdsch_HoppingOffset_r13                [MAX_NUM_CCs];
+  BOOLEAN_t     freqHoppingParametersDL_r13                   [MAX_NUM_CCs];
+  long       *mpdcch_pdsch_HoppingNB_r13                    [MAX_NUM_CCs];
+  BOOLEAN_t     interval_DLHoppingConfigCommonModeA_r13       [MAX_NUM_CCs];
+  long        interval_DLHoppingConfigCommonModeA_r13_val   [MAX_NUM_CCs];
+  BOOLEAN_t     interval_DLHoppingConfigCommonModeB_r13       [MAX_NUM_CCs];
+  long        interval_DLHoppingConfigCommonModeB_r13_val   [MAX_NUM_CCs];
+  long       *mpdcch_pdsch_HoppingOffset_r13                [MAX_NUM_CCs];
   long firstPreamble_r13                 [MAX_NUM_CCs][4];
   long lastPreamble_r13                  [MAX_NUM_CCs][4];
   long ra_ResponseWindowSize_r13         [MAX_NUM_CCs][4];
   long mac_ContentionResolutionTimer_r13 [MAX_NUM_CCs][4];
   long rar_HoppingConfig_r13             [MAX_NUM_CCs][4];
   int  rach_CE_LevelInfoList_r13_size    [MAX_NUM_CCs];
-//  long pcch_defaultPagingCycle_br;
+  //  long pcch_defaultPagingCycle_br;
   long rsrp_range           [MAX_NUM_CCs][3];
   int rsrp_range_list_size  [MAX_NUM_CCs];
   long prach_config_index                        [MAX_NUM_CCs][4];
@@ -277,7 +275,7 @@ typedef struct RrcConfigurationReq_s {
   long  *pusch_maxNumRepetitionCEmodeA_r13                 [MAX_NUM_CCs];
   long  *pusch_maxNumRepetitionCEmodeB_r13                 [MAX_NUM_CCs];
   long  *pusch_HoppingOffset_v1310                         [MAX_NUM_CCs];
-#endif
+
   //SIB18
   e_LTE_SL_CP_Len_r12            rxPool_sc_CP_Len[MAX_NUM_CCs];
   e_LTE_SL_PeriodComm_r12        rxPool_sc_Period[MAX_NUM_CCs];
@@ -415,13 +413,13 @@ typedef struct NRRrcConfigurationReq_s {
 
   ///NR
   //MIB
-  long                    MIB_subCarrierSpacingCommon[MAX_NUM_CCs]; 
-  uint32_t                MIB_ssb_SubcarrierOffset[MAX_NUM_CCs]; 
+  long                    MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
+  uint32_t                MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
   long                    MIB_dmrs_TypeA_Position[MAX_NUM_CCs];
   uint32_t                pdcch_ConfigSIB1[MAX_NUM_CCs];
 
   //SIB1
-  long                    SIB1_frequencyOffsetSSB[MAX_NUM_CCs]; 
+  long                    SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
   long                    SIB1_ssb_PeriodicityServingCell[MAX_NUM_CCs];
   long                    SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs];
   //NR FrequencyInfoDL
@@ -435,9 +433,9 @@ typedef struct NRRrcConfigurationReq_s {
   uint32_t                DL_carrierBandwidth[MAX_NUM_CCs];
 
   //NR BWP-DownlinkCommon
-  uint32_t                DL_locationAndBandwidth[MAX_NUM_CCs]; 
+  uint32_t                DL_locationAndBandwidth[MAX_NUM_CCs];
   long                    DL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
-  lte_prefix_type_t       DL_BWP_prefix_type[MAX_NUM_CCs];   
+  lte_prefix_type_t       DL_BWP_prefix_type[MAX_NUM_CCs];
 
   //NR FrequencyInfoUL
   long                    UL_FreqBandIndicatorNR[MAX_NUM_CCs];
@@ -552,7 +550,7 @@ typedef struct NRRrcConfigurationReq_s {
   long                    PDCCH_cce_REG_MappingType[MAX_NUM_CCs];
   long                    PDCCH_reg_BundleSize[MAX_NUM_CCs];
   long                    PDCCH_interleaverSize[MAX_NUM_CCs];
-  long                    PDCCH_shiftIndex[MAX_NUM_CCs];  
+  long                    PDCCH_shiftIndex[MAX_NUM_CCs];
   long                    PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
   long                    PDCCH_TCI_StateId[MAX_NUM_CCs];
   BOOLEAN_t               tci_PresentInDCI[MAX_NUM_CCs];
@@ -574,7 +572,7 @@ typedef struct NRRrcConfigurationReq_s {
   long                    Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs];
   long                    Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs];
   long                    Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs];
-  long                    Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];  
+  long                    Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
   long                    Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs];
   long                    Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs];
   long                    ue_Specific__dci_Formats[MAX_NUM_CCs];
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index a0527d5d7b88d6122dfa17d81b49ff20acd45439..6174632fd67b34b4dd2041390445b10f5b5d87f2 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -122,7 +122,6 @@ void RCconfig_L1(void) {
     for (j = 0; j < RC.nb_L1_inst; j++) {
       RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
 
-
       if (RC.eNB[j] == NULL) {
         RC.eNB[j]                       = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
         LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
@@ -444,7 +443,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
             config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
             //printf("Component carrier %d\n",component_carrier);
             nb_cc++;
-
             // Cell params, MIB/SIB1 in DU
             RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = ccparams_lte.tdd_config;
             AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
@@ -469,8 +467,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                            RC.config_file_name, i, ccparams_lte.prefix_type);
             }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
             if (!ccparams_lte.pbch_repetition)
               AssertFatal (0,
                            "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
@@ -485,7 +481,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                            RC.config_file_name, i, ccparams_lte.pbch_repetition);
             }
 
-#endif
             RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = ccparams_lte.eutra_band;
             RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) ccparams_lte.downlink_frequency;
             RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) ccparams_lte.uplink_frequency_offset;
@@ -604,7 +599,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
                              RC.config_file_name, i, ccparams_lte.pucch_nCS_AN);
 
-              //#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
               RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_n1_AN = ccparams_lte.pucch_n1_AN;
 
               if ((ccparams_lte.pucch_n1_AN <0) ||
@@ -613,7 +607,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
                              RC.config_file_name, i, ccparams_lte.pucch_n1_AN);
 
-              //#endif
               RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_referenceSignalPower = ccparams_lte.pdsch_referenceSignalPower;
 
               if ((ccparams_lte.pdsch_referenceSignalPower <-60) ||
@@ -792,29 +785,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
                              RC.config_file_name, i, ccparams_lte.pusch_p0_Nominal);
 
-#if (LTE_RRC_VERSION <= MAKE_VERSION(12, 0, 0))
-
-              if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al0;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al04;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL05")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al05;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL06")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al06;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL07")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al07;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL08")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al08;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL09")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al09;
-              } else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al1;
-              }
-
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 0, 0))
-
               if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
                 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al0;
               } else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
@@ -831,10 +801,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al09;
               } else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
                 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al1;
-              }
-
-#endif
-              else
+              } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
                              RC.config_file_name, i, ccparams_lte.pusch_alpha);
@@ -1002,53 +969,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              RC.config_file_name, i, ccparams_lte.rach_powerRampingStep);
 
               switch (ccparams_lte.rach_preambleTransMax) {
-#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-
-                case 3:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
-                  break;
-
-                case 4:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4;
-                  break;
-
-                case 5:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5;
-                  break;
-
-                case 6:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
-                  break;
-
-                case 7:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7;
-                  break;
-
-                case 8:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8;
-                  break;
-
-                case 10:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
-                  break;
-
-                case 20:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20;
-                  break;
-
-                case 50:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50;
-                  break;
-
-                case 100:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100;
-                  break;
-
-                case 200:
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200;
-                  break;
-#else
-
                 case 3:
                   RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n3;
                   break;
@@ -1092,7 +1012,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                 case 200:
                   RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n200;
                   break;
-#endif
 
                 default:
                   AssertFatal (0,
@@ -1151,387 +1070,374 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                   break;
               }
 
-            if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
-            }
-            else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
-                    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
-                    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
-                    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
-                    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
-                  }
-            else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
-                    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
-                  }
-            else {
-              AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
-                           RC.config_file_name,
-                           i,
-                           ccparams_lte.pcch_nB);
-            }
+              if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
+              } else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
+              } else {
+                AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
+                             RC.config_file_name,
+                             i,
+                             ccparams_lte.pcch_nB);
+              }
 
-            if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
-            } else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
-            } else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
-            } else {
-              AssertFatal (0,
-                           "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
-                           RC.config_file_name, i, ccparams_lte.drx_Config_present);
-            }
+              if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
+              } else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
+              } else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
+              } else {
+                AssertFatal (0,
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
+                             RC.config_file_name, i, ccparams_lte.drx_Config_present);
+              }
 
-            if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
-            } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
-            } else {
+              if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
+              } else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
+              } else {
                 AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
-                RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
+                             RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
                 break;
-            }
+              }
 
-            if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
-            } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
-            } else {
+              if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
+              } else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
+              } else {
                 AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
-                RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
+                             RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
                 break;
-            }
-
-            RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+              }
 
-            if (!ccparams_lte.mbms_dedicated_serving_cell)
-              AssertFatal (0,
-                           "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
-                           RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
-            else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
-            } else  if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell  = FALSE;
-            } else {
-              AssertFatal (0,
-                           "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
-                           RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
-            }
+              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
 
-#endif
-
-
-            switch (ccparams_lte.N_RB_DL) {
-	    case 25:
-	      if ((ccparams_lte.ue_multiple_max < 1) || 
-		  (ccparams_lte.ue_multiple_max > 4))
-		AssertFatal (0,
-			     "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
-			     RC.config_file_name, i, ccparams_lte.ue_multiple_max);
-
-	      break;
-
-	    case 50:
-	      if ((ccparams_lte.ue_multiple_max < 1) || 
-		  (ccparams_lte.ue_multiple_max > 8))
-		AssertFatal (0,
-			     "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
-			     RC.config_file_name, i, ccparams_lte.ue_multiple_max);
-
-	      break;
-
-	    case 100:
-	      if ((ccparams_lte.ue_multiple_max < 1) || 
-		  (ccparams_lte.ue_multiple_max > 16))
-		AssertFatal (0,
-			     "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
-			     RC.config_file_name, i, ccparams_lte.ue_multiple_max);
-
-	      break;
-
-	    default:
-	      AssertFatal (0,
-			   "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
-			   RC.config_file_name, i, ccparams_lte.N_RB_DL);
-	      break;
-	    }
-
-            if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
-            } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
-            } else {
+              if (!ccparams_lte.mbms_dedicated_serving_cell)
                 AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
-                RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
-                break;
-            }
-
-            if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
-              RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
-            } else {
-              if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
-                offsetMaxLimit = 10;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
-                offsetMaxLimit = 20;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
-                offsetMaxLimit = 32;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
-                offsetMaxLimit = 40;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
-                offsetMaxLimit = 64;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
-                offsetMaxLimit = 80;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
-                offsetMaxLimit = 128;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
-                offsetMaxLimit = 160;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
-                offsetMaxLimit = 256;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
-                offsetMaxLimit = 320;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
-                offsetMaxLimit = 512;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
-                offsetMaxLimit = 640;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
-                offsetMaxLimit = 1024;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
-                offsetMaxLimit = 1280;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
-                offsetMaxLimit = 2048;
-              } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
-                offsetMaxLimit = 2560;
+                             "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
+                             RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
+              else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
+              } else  if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell  = FALSE;
               } else {
                 AssertFatal (0,
-                            "Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
-                            RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
+                             RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
               }
 
-              if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
-              } else {
-                AssertFatal (0,
-                            "Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
-                            RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
-              }
-            }
+              switch (ccparams_lte.N_RB_DL) {
+                case 25:
+                  if ((ccparams_lte.ue_multiple_max < 1) ||
+                      (ccparams_lte.ue_multiple_max > 4))
+                    AssertFatal (0,
+                                 "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
+                                 RC.config_file_name, i, ccparams_lte.ue_multiple_max);
 
-            if  (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
-              if  (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
-                AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" -  \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
-                RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
-              } else {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
+                  break;
+
+                case 50:
+                  if ((ccparams_lte.ue_multiple_max < 1) ||
+                      (ccparams_lte.ue_multiple_max > 8))
+                    AssertFatal (0,
+                                 "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
+                                 RC.config_file_name, i, ccparams_lte.ue_multiple_max);
+
+                  break;
+
+                case 100:
+                  if ((ccparams_lte.ue_multiple_max < 1) ||
+                      (ccparams_lte.ue_multiple_max > 16))
+                    AssertFatal (0,
+                                 "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
+                                 RC.config_file_name, i, ccparams_lte.ue_multiple_max);
+
+                  break;
+
+                default:
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
+                               RC.config_file_name, i, ccparams_lte.N_RB_DL);
+                  break;
               }
-            } else {
-              if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
-                cycleNb = 2;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
-                cycleNb = 5;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
-                cycleNb = 8;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
-                cycleNb = 10;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
-                cycleNb = 16;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
-                cycleNb = 20;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
-                cycleNb = 32;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
-                cycleNb = 40;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
-                cycleNb = 64;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
-                cycleNb = 80;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
-                cycleNb = 128;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
-                cycleNb = 160;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
-                cycleNb = 256;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
-                cycleNb = 320;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
-                cycleNb = 512;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
-              } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
-                cycleNb = 640;
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
+
+              if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
+              } else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
               } else {
                 AssertFatal (0,
-                            "Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
-                            RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
+                             RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
+                break;
               }
 
-              if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
-                AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" -  \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
-                RC.config_file_name, i, cycleNb, offsetMaxLimit);
+              if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
+              } else {
+                if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
+                  offsetMaxLimit = 10;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
+                  offsetMaxLimit = 20;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
+                  offsetMaxLimit = 32;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
+                  offsetMaxLimit = 40;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
+                  offsetMaxLimit = 64;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
+                  offsetMaxLimit = 80;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
+                  offsetMaxLimit = 128;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
+                  offsetMaxLimit = 160;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
+                  offsetMaxLimit = 256;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
+                  offsetMaxLimit = 320;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
+                  offsetMaxLimit = 512;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
+                  offsetMaxLimit = 640;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
+                  offsetMaxLimit = 1024;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
+                  offsetMaxLimit = 1280;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
+                  offsetMaxLimit = 2048;
+                } else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
+                  offsetMaxLimit = 2560;
+                } else {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
+                               RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
+                }
+
+                if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
+                } else {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
+                               RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
+                }
               }
 
-              if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
+              if  (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
+                if  (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" -  \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
+                               RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
+                } else {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
+                }
               } else {
-                AssertFatal (0,
-                "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
-                RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
+                if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
+                  cycleNb = 2;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
+                  cycleNb = 5;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
+                  cycleNb = 8;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
+                  cycleNb = 10;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
+                  cycleNb = 16;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
+                  cycleNb = 20;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
+                  cycleNb = 32;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
+                  cycleNb = 40;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
+                  cycleNb = 64;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
+                  cycleNb = 80;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
+                  cycleNb = 128;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
+                  cycleNb = 160;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
+                  cycleNb = 256;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
+                  cycleNb = 320;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
+                  cycleNb = 512;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
+                } else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
+                  cycleNb = 640;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
+                } else {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
+                               RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
+                }
+
+                if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" -  \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
+                               RC.config_file_name, i, cycleNb, offsetMaxLimit);
+                }
+
+                if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
+                } else {
+                  AssertFatal (0,
+                               "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
+                               RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
+                }
               }
-            }
 
-            switch (ccparams_lte.bcch_modificationPeriodCoeff) {
-              case 2:
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
-                break;
+              switch (ccparams_lte.bcch_modificationPeriodCoeff) {
+                case 2:
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
+                  break;
 
                 case 4:
                   RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n4;
@@ -2291,7 +2197,7 @@ int RCconfig_S1(
 
               default: {
                 LOG_E(S1AP, "Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
-                         Default DRX set to 32 in MME configuration\n",
+                       Default DRX set to 32 in MME configuration\n",
                       ccparams_lte.pcch_defaultPagingCycle);
                 S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0;
               }
@@ -2784,7 +2690,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
               //carrier->sib11 = &typeandinfo->choice.sib11;
               LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB11 in CU F1AP_SETUP_RESP message\n", inst);
               break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
 
             case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
               //carrier->sib12 = &typeandinfo->choice.sib12;
@@ -2795,8 +2700,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
               carrier->sib13 = &typeandinfo->choice.sib13_v920;
               LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB13 in CU F1AP_SETUP_RESP message\n", inst);
               break;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
             //SIB18
             case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
@@ -2815,7 +2718,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
               carrier->sib21 = &typeandinfo->choice.sib21_v1430;
               LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB21 in CU F1AP_SETUP_RESP message\n", inst);
               break;
-#endif
 
             default:
               AssertFatal(1==0,"Shouldn't have received this SI %d\n",typeandinfo->present);
@@ -2843,20 +2745,14 @@ void configure_du_mac(int inst) {
                          carrier->Ncp,
                          carrier->sib1->freqBandIndicator,
                          carrier->dl_CarrierFreq,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                          carrier->pbch_repetition,
-#endif
                          0, // rnti
                          (LTE_BCCH_BCH_Message_t *) &carrier->mib,
                          (LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                          (LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2_BR->radioResourceConfigCommon,
-#endif
                          (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                          (LTE_SCellToAddMod_r10_t *)NULL,
                          //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                          (LTE_MeasObjectToAddMod_t **) NULL,
                          (LTE_MAC_MainConfig_t *) NULL, 0,
                          (struct LTE_LogicalChannelConfig *)NULL,
@@ -2867,26 +2763,17 @@ void configure_du_mac(int inst) {
                          carrier->ul_CarrierFreq,
                          carrier->sib2->freqInfo.ul_Bandwidth,
                          &carrier->sib2->freqInfo.additionalSpectrumEmission,
-                         (LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                         ,
+                         (LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
                          carrier->MBMS_flag,
                          (LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
-                         (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                         ,
-                         NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
+                         (LTE_PMCH_InfoList_r9_t *) NULL,
+                         NULL,
+                         0,
+                         (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                         (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                         (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                         (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                         (LTE_MBSFN_AreaInfoList_r9_t *) NULL
                         );
 }
 
diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h
index a7b3ac8bdac91a308a72bfc271416b1b3241ebea..165675ab12ad52002c5d0851d1e1a4dc4db4deb5 100644
--- a/openair2/ENB_APP/enb_paramdef.h
+++ b/openair2/ENB_APP/enb_paramdef.h
@@ -20,7 +20,7 @@
  */
 
 /*! \file openair2/ENB_APP/enb_paramdef.h
- * \brief definition of configuration parameters for all eNodeB modules 
+ * \brief definition of configuration parameters for all eNodeB modules
  * \author Francois TABURET
  * \date 2017
  * \version 0.1
@@ -46,9 +46,9 @@
 #define ENB_CONF_STRING_OTG_BG_TRAFFIC      "bg_traffic"
 
 #ifdef LIBCONFIG_LONG
-#define libconfig_int long
+  #define libconfig_int long
 #else
-#define libconfig_int int
+  #define libconfig_int int
 #endif
 
 typedef enum {
@@ -126,31 +126,31 @@ typedef enum {
 /*   optname                                   helpstr   paramflags    XXXptr          defXXXval                   type      numelt        */
 /*-----------------------------------------------------------------------------------------------------------------------------------------*/
 #define RUPARAMS_DESC { \
-{CONFIG_STRING_RU_LOCAL_IF_NAME,            	 NULL,       0,       strptr:NULL,     defstrval:"lo",          TYPE_STRING,	  0}, \
-{CONFIG_STRING_RU_LOCAL_ADDRESS,            	 NULL,       0,       strptr:NULL,     defstrval:"127.0.0.2",   TYPE_STRING,	  0}, \
-{CONFIG_STRING_RU_REMOTE_ADDRESS,           	 NULL,       0,       strptr:NULL,     defstrval:"127.0.0.1",   TYPE_STRING,	  0}, \
-{CONFIG_STRING_RU_LOCAL_PORTC,              	 NULL,       0,       uptr:NULL,       defuintval:50000,        TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_REMOTE_PORTC,             	 NULL,       0,       uptr:NULL,       defuintval:50000,        TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_LOCAL_PORTD,              	 NULL,       0,       uptr:NULL,       defuintval:50001,        TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_REMOTE_PORTD,             	 NULL,       0,       uptr:NULL,       defuintval:50001,        TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_TRANSPORT_PREFERENCE,     	 NULL,       0,       strptr:NULL,     defstrval:"udp_if5",     TYPE_STRING,	  0}, \
-{CONFIG_STRING_RU_LOCAL_RF,                 	 NULL,       0,       strptr:NULL,     defstrval:"yes",         TYPE_STRING,	  0}, \
-{CONFIG_STRING_RU_NB_TX,                    	 NULL,       0,       uptr:NULL,       defuintval:1,            TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_NB_RX,                    	 NULL,       0,       uptr:NULL,       defuintval:1,            TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_MAX_RS_EPRE,              	 NULL,       0,       iptr:NULL,       defintval:-29,           TYPE_INT,         0}, \
-{CONFIG_STRING_RU_MAX_RXGAIN,               	 NULL,       0,       iptr:NULL,       defintval:120,           TYPE_INT,         0}, \
-{CONFIG_STRING_RU_BAND_LIST,                	 NULL,       0,       uptr:NULL,       defintarrayval:DEFBANDS, TYPE_INTARRAY,    1}, \
-{CONFIG_STRING_RU_ENB_LIST,                 	 NULL,       0,       uptr:NULL,       defintarrayval:DEFENBS,  TYPE_INTARRAY,    1}, \
-{CONFIG_STRING_RU_ATT_TX,                   	 NULL,       0,       uptr:NULL,       defintval:0,             TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_ATT_RX,                   	 NULL,       0,       uptr:NULL,       defintval:0,             TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_IS_SLAVE,                      NULL,       0,       strptr:NULL,     defstrval:"no",          TYPE_STRING,      0}, \
-{CONFIG_STRING_RU_NBIOTRRC_LIST,                 NULL,       0,       uptr:NULL,       defintarrayval:DEFENBS,  TYPE_INTARRAY,    1}, \
-{CONFIG_STRING_RU_SDR_ADDRS,                 	 NULL,       0,       strptr:NULL,     defstrval:"type=b200",   TYPE_STRING,      0}, \
-{CONFIG_STRING_RU_SDR_CLK_SRC,               	 NULL,       0,       strptr:NULL,     defstrval:"internal",    TYPE_STRING,      0}, \
-{CONFIG_STRING_RU_SF_EXTENSION,                  NULL,       0,       uptr:NULL,       defuintval:312,          TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_END_OF_BURST_DELAY,            NULL,       0,       uptr:NULL,       defuintval:400,          TYPE_UINT,        0}, \
-{CONFIG_STRING_RU_OTA_SYNC_ENABLE,               NULL,       0,       strptr:NULL,     defstrval:"no",          TYPE_STRING,      0}, \
-}
+    {CONFIG_STRING_RU_LOCAL_IF_NAME,               NULL,       0,       strptr:NULL,     defstrval:"lo",          TYPE_STRING,    0}, \
+    {CONFIG_STRING_RU_LOCAL_ADDRESS,               NULL,       0,       strptr:NULL,     defstrval:"127.0.0.2",   TYPE_STRING,    0}, \
+    {CONFIG_STRING_RU_REMOTE_ADDRESS,              NULL,       0,       strptr:NULL,     defstrval:"127.0.0.1",   TYPE_STRING,    0}, \
+    {CONFIG_STRING_RU_LOCAL_PORTC,                 NULL,       0,       uptr:NULL,       defuintval:50000,        TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_REMOTE_PORTC,                NULL,       0,       uptr:NULL,       defuintval:50000,        TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_LOCAL_PORTD,                 NULL,       0,       uptr:NULL,       defuintval:50001,        TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_REMOTE_PORTD,                NULL,       0,       uptr:NULL,       defuintval:50001,        TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_TRANSPORT_PREFERENCE,        NULL,       0,       strptr:NULL,     defstrval:"udp_if5",     TYPE_STRING,    0}, \
+    {CONFIG_STRING_RU_LOCAL_RF,                    NULL,       0,       strptr:NULL,     defstrval:"yes",         TYPE_STRING,    0}, \
+    {CONFIG_STRING_RU_NB_TX,                       NULL,       0,       uptr:NULL,       defuintval:1,            TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_NB_RX,                       NULL,       0,       uptr:NULL,       defuintval:1,            TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_MAX_RS_EPRE,                 NULL,       0,       iptr:NULL,       defintval:-29,           TYPE_INT,         0}, \
+    {CONFIG_STRING_RU_MAX_RXGAIN,                  NULL,       0,       iptr:NULL,       defintval:120,           TYPE_INT,         0}, \
+    {CONFIG_STRING_RU_BAND_LIST,                   NULL,       0,       uptr:NULL,       defintarrayval:DEFBANDS, TYPE_INTARRAY,    1}, \
+    {CONFIG_STRING_RU_ENB_LIST,                    NULL,       0,       uptr:NULL,       defintarrayval:DEFENBS,  TYPE_INTARRAY,    1}, \
+    {CONFIG_STRING_RU_ATT_TX,                      NULL,       0,       uptr:NULL,       defintval:0,             TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_ATT_RX,                      NULL,       0,       uptr:NULL,       defintval:0,             TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_IS_SLAVE,                      NULL,       0,       strptr:NULL,     defstrval:"no",          TYPE_STRING,      0}, \
+    {CONFIG_STRING_RU_NBIOTRRC_LIST,                 NULL,       0,       uptr:NULL,       defintarrayval:DEFENBS,  TYPE_INTARRAY,    1}, \
+    {CONFIG_STRING_RU_SDR_ADDRS,                   NULL,       0,       strptr:NULL,     defstrval:"type=b200",   TYPE_STRING,      0}, \
+    {CONFIG_STRING_RU_SDR_CLK_SRC,                 NULL,       0,       strptr:NULL,     defstrval:"internal",    TYPE_STRING,      0}, \
+    {CONFIG_STRING_RU_SF_EXTENSION,                  NULL,       0,       uptr:NULL,       defuintval:312,          TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_END_OF_BURST_DELAY,            NULL,       0,       uptr:NULL,       defuintval:400,          TYPE_UINT,        0}, \
+    {CONFIG_STRING_RU_OTA_SYNC_ENABLE,               NULL,       0,       strptr:NULL,     defstrval:"no",          TYPE_STRING,      0}, \
+  }
 
 /*---------------------------------------------------------------------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------------------------------------------------------------------*/
@@ -158,7 +158,7 @@ typedef enum {
 #define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE              "none"
 #define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING          "annoying"
 #define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO              "info"
- 
+
 
 /* global parameters, not under a specific section   */
 #define ENB_CONFIG_STRING_ASN1_VERBOSITY           "Asn1_verbosity"
@@ -169,10 +169,10 @@ typedef enum {
 /*   optname                          helpstr      paramflags          XXXptr        defXXXval                                        type           numelt     */
 /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define ENBSPARAMS_DESC {                                                                                             \
-{ENB_CONFIG_STRING_ASN1_VERBOSITY,      NULL,     0,                   uptr:NULL,   defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,   TYPE_STRING,      0},   \
-{ENB_CONFIG_STRING_ACTIVE_ENBS,         NULL,     0,                   uptr:NULL,   defstrval:NULL, 				       TYPE_STRINGLIST,  0},   \
-{ENB_CONFIG_STRING_NOS1,                NULL,     PARAMFLAG_BOOL,      uptr:NULL,   defintval:0, 				       TYPE_UINT,        0},   \
-}
+    {ENB_CONFIG_STRING_ASN1_VERBOSITY,      NULL,     0,                   uptr:NULL,   defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,   TYPE_STRING,      0},   \
+    {ENB_CONFIG_STRING_ACTIVE_ENBS,         NULL,     0,                   uptr:NULL,   defstrval:NULL,                TYPE_STRINGLIST,  0},   \
+    {ENB_CONFIG_STRING_NOS1,                NULL,     PARAMFLAG_BOOL,      uptr:NULL,   defintval:0,               TYPE_UINT,        0},   \
+  }
 #define ENB_ASN1_VERBOSITY_IDX                     0
 #define ENB_ACTIVE_ENBS_IDX                        1
 #define ENB_NOS1_IDX                               2
@@ -206,25 +206,25 @@ typedef enum {
 /*   optname                                   helpstr   paramflags    XXXptr        defXXXval                   type           numelt     */
 /*-----------------------------------------------------------------------------------------------------------------------------------------*/
 #define ENBPARAMS_DESC {\
-{ENB_CONFIG_STRING_ENB_ID,                       NULL,   0,            uptr:NULL,   defintval:0,                 TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_CELL_TYPE,                    NULL,   0,            strptr:NULL, defstrval:"CELL_MACRO_ENB",  TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_ENB_NAME,                     NULL,   0,            strptr:NULL, defstrval:"OAIeNodeB",       TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_TRACKING_AREA_CODE,           NULL,   0,            uptr:NULL,   defuintval:0,                TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD,      NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD,      NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE,       NULL,   0,            strptr:NULL, defstrval:"local_mac",       TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_LOCAL_S_IF_NAME,              NULL,   0,            strptr:NULL, defstrval:"lo",              TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_LOCAL_S_ADDRESS,              NULL,   0,            strptr:NULL, defstrval:"127.0.0.1",       TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_REMOTE_S_ADDRESS,             NULL,   0,            strptr:NULL, defstrval:"127.0.0.2",       TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_LOCAL_S_PORTC,                NULL,   0,            uptr:NULL,   defuintval:50000,            TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_REMOTE_S_PORTC,               NULL,   0,            uptr:NULL,   defuintval:50000,            TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_LOCAL_S_PORTD,                NULL,   0,            uptr:NULL,   defuintval:50001,            TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_REMOTE_S_PORTD,               NULL,   0,            uptr:NULL,   defuintval:50001,            TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_NR_CELLID,                    NULL,   0,            u64ptr:NULL, defint64val:0,               TYPE_UINT64,    0},  \
-{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD,     NULL,   0,            uptr:NULL,   defintval:0,                 TYPE_UINT,      0},  \
-{ENB_CONFIG_STRING_MEASUREMENT_REPORTS,          NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
-{ENB_CONFIG_STRING_X2,                           NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
-}															     	
+    {ENB_CONFIG_STRING_ENB_ID,                       NULL,   0,            uptr:NULL,   defintval:0,                 TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_CELL_TYPE,                    NULL,   0,            strptr:NULL, defstrval:"CELL_MACRO_ENB",  TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_ENB_NAME,                     NULL,   0,            strptr:NULL, defstrval:"OAIeNodeB",       TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_TRACKING_AREA_CODE,           NULL,   0,            uptr:NULL,   defuintval:0,                TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD,      NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD,      NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE,       NULL,   0,            strptr:NULL, defstrval:"local_mac",       TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_LOCAL_S_IF_NAME,              NULL,   0,            strptr:NULL, defstrval:"lo",              TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_LOCAL_S_ADDRESS,              NULL,   0,            strptr:NULL, defstrval:"127.0.0.1",       TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_REMOTE_S_ADDRESS,             NULL,   0,            strptr:NULL, defstrval:"127.0.0.2",       TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_LOCAL_S_PORTC,                NULL,   0,            uptr:NULL,   defuintval:50000,            TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_REMOTE_S_PORTC,               NULL,   0,            uptr:NULL,   defuintval:50000,            TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_LOCAL_S_PORTD,                NULL,   0,            uptr:NULL,   defuintval:50001,            TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_REMOTE_S_PORTD,               NULL,   0,            uptr:NULL,   defuintval:50001,            TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_NR_CELLID,                    NULL,   0,            u64ptr:NULL, defint64val:0,               TYPE_UINT64,    0},  \
+    {ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD,     NULL,   0,            uptr:NULL,   defintval:0,                 TYPE_UINT,      0},  \
+    {ENB_CONFIG_STRING_MEASUREMENT_REPORTS,          NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
+    {ENB_CONFIG_STRING_X2,                           NULL,   0,            strptr:NULL, defstrval:NULL,              TYPE_STRING,    0},  \
+  }
 #define ENB_ENB_ID_IDX                  0
 #define ENB_CELL_TYPE_IDX               1
 #define ENB_ENB_NAME_IDX                2
@@ -246,26 +246,26 @@ typedef enum {
 
 #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
 #define ENBPARAMS_CHECK {                                         \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-  { .s5 = { NULL } },                                             \
-}
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+    { .s5 = { NULL } },                                             \
+  }
 
 /*-------------------------------------------------------------------------------------------------------------------------------------------------*/
-/*-------------------------------------------------------------------------------------------------------------------------------------------------*/		  
+/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
 
 /* PLMN ID configuration */
 
@@ -280,20 +280,20 @@ typedef enum {
 #define ENB_MNC_DIGIT_LENGTH            2
 
 #define PLMNPARAMS_DESC {                                                                  \
-/*   optname                              helpstr               paramflags XXXptr     def val          type    numelt */ \
-  {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code",        0, uptr:NULL, defuintval:1000, TYPE_UINT, 0},    \
-  {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code",        0, uptr:NULL, defuintval:1000, TYPE_UINT, 0},    \
-  {ENB_CONFIG_STRING_MNC_DIGIT_LENGTH,    "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0,    TYPE_UINT, 0},    \
-}
+    /*   optname                              helpstr               paramflags XXXptr     def val          type    numelt */ \
+    {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code",        0, uptr:NULL, defuintval:1000, TYPE_UINT, 0},    \
+    {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code",        0, uptr:NULL, defuintval:1000, TYPE_UINT, 0},    \
+    {ENB_CONFIG_STRING_MNC_DIGIT_LENGTH,    "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0,    TYPE_UINT, 0},    \
+  }
 
 #define MCC_MNC_OKRANGES           {0,999}
 #define MNC_DIGIT_LENGTH_OKVALUES  {2,3}
 
 #define PLMNPARAMS_CHECK {                                           \
-  { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } },             \
-  { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } },             \
-  { .s1 = { config_check_intval,   MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
-}
+    { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } },             \
+    { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } },             \
+    { .s1 = { config_check_intval,   MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
+  }
 
 
 /* component carries configuration parameters name */
@@ -311,9 +311,8 @@ typedef enum {
 #define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT                             "pucch_delta_shift"
 #define ENB_CONFIG_STRING_PUCCH_NRB_CQI                                 "pucch_nRB_CQI"
 #define ENB_CONFIG_STRING_PUCCH_NCS_AN                                  "pucch_nCS_AN"
-//#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #define ENB_CONFIG_STRING_PUCCH_N1_AN                                   "pucch_n1_AN"
-//#endif
+
 
 #define ENB_CONFIG_STRING_PCCH_CONFIG_V1310                      "pcch_config_v1310"
 #define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13                 "paging_narrowbands_r13"
@@ -385,8 +384,8 @@ typedef enum {
 #define ENB_CONFIG_STRING_UETIMERS_N311                                 "ue_TimersAndConstants_n311"
 #define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE                          "ue_TransmissionMode"
 #define ENB_CONFIG_STRING_UE_MULTIPLE_MAX                               "ue_multiple_max"
-//SIB1-MBMS 
-#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL  			"mbms_dedicated_serving_cell"
+//SIB1-MBMS
+#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL       "mbms_dedicated_serving_cell"
 
 
 
@@ -538,271 +537,271 @@ typedef struct ccparams_lte_s {
 } ccparams_lte_t;
 
 #define CCPARAMS_CHECK                 {                                     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,  					     \
-             { .s5= {NULL }} ,	               \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-             { .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} ,						     \
-             { .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} ,						     \
-             { .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} ,						     \
-             { .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} ,						     \
-             { .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , 					      \
-             { .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , 					      \
-             { .s5= {NULL }} ,						     \
-             { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-                          { .s5= {NULL }} ,						     \
-			  { .s5= {NULL }} ,				\
-			  { .s5= {NULL }}				\
-}
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} ,                \
+    { .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} ,                \
+    { .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} ,                \
+    { .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} ,                \
+    { .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} ,                 \
+    { .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                 \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,                \
+    { .s5= {NULL }} ,       \
+    { .s5= {NULL }}       \
+  }
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*                                     component carriers configuration parameters                                                                                                                   */
 /*   optname                                                   helpstr   paramflags    XXXptr                                        defXXXval                    type         numelt  checked_param */
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 
-#define CCPARAMS_DESC(ccparams) {					\
-{ENB_CONFIG_STRING_FRAME_TYPE,                                   NULL,   0,           strptr:&ccparams.frame_type,                             defstrval:"FDD",           TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_TDD_CONFIG,                                   NULL,   0,           iptr:&ccparams.tdd_config,                               defintval:3,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_TDD_CONFIG_S,                                 NULL,   0,           iptr:&ccparams.tdd_config_s,                             defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PREFIX_TYPE,                                  NULL,   0,           strptr:&ccparams.prefix_type,                            defstrval:"NORMAL",        TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PBCH_REPETITION,                              NULL,   0,           strptr:&ccparams.pbch_repetition,                        defstrval:"FALSE",         TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_EUTRA_BAND,                                   NULL,   0,           iptr:&ccparams.eutra_band,                               defintval:7,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY,                           NULL,   0,           i64ptr:(int64_t *)&ccparams.downlink_frequency,          defint64val:2680000000,    TYPE_UINT64,     0},  \
-{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET,                      NULL,   0,           iptr:&ccparams.uplink_frequency_offset,                  defintval:-120000000,      TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_NID_CELL,                                     NULL,   0,           iptr:&ccparams.Nid_cell,                                 defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_N_RB_DL,                                      NULL,   0,           iptr:&ccparams.N_RB_DL,                                  defintval:25,              TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_CELL_MBSFN,                                   NULL,   0,           iptr:&ccparams.Nid_cell_mbsfn,                           defintval:0,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_NB_ANT_PORTS,                                 NULL,   0,           iptr:&ccparams.nb_antenna_ports,                         defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PRACH_ROOT,                                   NULL,   0,           iptr:&ccparams.prach_root,                               defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX,                           NULL,   0,           iptr:&ccparams.prach_config_index,                       defintval:0,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PRACH_HIGH_SPEED,                             NULL,   0,           strptr:&ccparams.prach_high_speed,                       defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION,                       NULL,   0,           iptr:&ccparams.prach_zero_correlation,                   defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET,                            NULL,   0,           iptr:&ccparams.prach_freq_offset,                        defintval:2,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT,                            NULL,   0,           iptr:&ccparams.pucch_delta_shift,                        defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUCCH_NRB_CQI,                                NULL,   0,           iptr:&ccparams.pucch_nRB_CQI,                            defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUCCH_NCS_AN,                                 NULL,   0,           iptr:&ccparams.pucch_nCS_AN,                             defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUCCH_N1_AN,                                  NULL,   0,           iptr:&ccparams.pucch_n1_AN,                              defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PDSCH_RS_EPRE,                                NULL,   0,           iptr:&ccparams.pdsch_referenceSignalPower,               defintval:-29,             TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PDSCH_PB,                                     NULL,   0,           iptr:&ccparams.pdsch_p_b,                                defintval:0,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PUSCH_N_SB,                                   NULL,   0,           iptr:&ccparams.pusch_n_SB,                               defintval:1,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE,                            NULL,   0,           strptr:&ccparams.pusch_hoppingMode,                      defstrval:"interSubFrame", TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET,                          NULL,   0,           iptr:&ccparams.pusch_hoppingOffset,                      defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM,                            NULL,   0,           strptr:&ccparams.pusch_enable64QAM,                      defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN,                       NULL,   0,           strptr:&ccparams.pusch_groupHoppingEnabled,              defstrval:"ENABLE",        TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT,                       NULL,   0,           iptr:&ccparams.pusch_groupAssignment,                    defintval:0,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN,                    NULL,   0,           strptr:&ccparams.pusch_sequenceHoppingEnabled,           defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUSCH_NDMRS1,                                 NULL,   0,           iptr:&ccparams.pusch_nDMRS1,                             defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PHICH_DURATION,                               NULL,   0,           strptr:&ccparams.phich_duration,                         defstrval:"NORMAL",        TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PHICH_RESOURCE,                               NULL,   0,           strptr:&ccparams.phich_resource,                         defstrval:"ONESIXTH",      TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_SRS_ENABLE,                                   NULL,   0,           strptr:&ccparams.srs_enable,                             defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG,                         NULL,   0,           iptr:&ccparams.srs_BandwidthConfig,                      defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG,                          NULL,   0,           iptr:&ccparams.srs_SubframeConfig,                       defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG,                         NULL,   0,           strptr:&ccparams.srs_ackNackST,                          defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_SRS_MAXUPPTS,                                 NULL,   0,           strptr:&ccparams.srs_MaxUpPts,                           defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL,                             NULL,   0,           iptr:&ccparams.pusch_p0_Nominal,                         defintval:-90,             TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PUSCH_ALPHA,                                  NULL,   0,           strptr:&ccparams.pusch_alpha,                            defstrval:"AL1",           TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL,                             NULL,   0,           iptr:&ccparams.pucch_p0_Nominal,                         defintval:-96,             TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE,                          NULL,   0,           iptr:&ccparams.msg3_delta_Preamble,                      defintval:6,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1,                         NULL,   0,           strptr:&ccparams.pucch_deltaF_Format1,                   defstrval:"DELTAF2",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format1b,                  defstrval:"deltaF3",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2,                         NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2,                   defstrval:"deltaF0",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2a,                  defstrval:"deltaF0",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2b,                  defstrval:"deltaF0",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES,                        NULL,   0,           iptr:&ccparams.rach_numberOfRA_Preambles,                defintval:4,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG,                   NULL,   0,           strptr:&ccparams.rach_preamblesGroupAConfig,             defstrval:"DISABLE",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA,                NULL,   0,           iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA,            defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA,                       NULL,   0,           iptr:&ccparams.rach_messageSizeGroupA,                   defintval:56,              TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB,                NULL,   0,           strptr:&ccparams.rach_messagePowerOffsetGroupB,          defstrval:"minusinfinity", TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP,                        NULL,   0,           iptr:&ccparams.rach_powerRampingStep,                    defintval:4,               TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER,      NULL,   0,           iptr:&ccparams.rach_preambleInitialReceivedTargetPower,  defintval:-100,            TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX,                        NULL,   0,           iptr:&ccparams.rach_preambleTransMax,                    defintval:10,              TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE,                    NULL,   0,           iptr:&ccparams.rach_raResponseWindowSize,                defintval:10,              TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER,            NULL,   0,           iptr:&ccparams.rach_macContentionResolutionTimer,        defintval:48,              TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX,                           NULL,   0,           iptr:&ccparams.rach_maxHARQ_Msg3Tx,                      defintval:4,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE,                    NULL,   0,           iptr:&ccparams.pcch_defaultPagingCycle,                  defintval:128,             TYPE_INT,        0},  \
-{ENB_CONFIG_STRING_PCCH_NB,                                      NULL,   0,           strptr:&ccparams.pcch_nB,                                defstrval:"oneT",          TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT,                           NULL,   0,           strptr:&ccparams.drx_Config_present,                     defstrval:"prNothing",     TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER,                          NULL,   0,           strptr:&ccparams.drx_onDurationTimer,                    defstrval:"psf10",         TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER,                          NULL,   0,           strptr:&ccparams.drx_InactivityTimer,                    defstrval:"psf10",         TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER,                      NULL,   0,           strptr:&ccparams.drx_RetransmissionTimer,                defstrval:"psf8",          TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT,         NULL,   0,           strptr:&ccparams.drx_longDrx_CycleStartOffset_present,   defstrval:"prSf128",       TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET,                 NULL,   0,           iptr:&ccparams.drx_longDrx_CycleStartOffset,             defintval:0,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE,                           NULL,   0,           strptr:&ccparams.drx_shortDrx_Cycle,                     defstrval:"sf32",          TYPE_STRING,     0},  \
-{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER,                 NULL,   0,           iptr:&ccparams.drx_shortDrx_ShortCycleTimer,             defintval:3,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF,                 NULL,   0,           iptr:&ccparams.bcch_modificationPeriodCoeff,             defintval:2,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_T300,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t300,               defintval:1000,            TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_T301,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t301,               defintval:1000,            TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_T310,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t310,               defintval:1000,            TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_T311,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t311,               defintval:10000,           TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_N310,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_n310,               defintval:20,              TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UETIMERS_N311,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_n311,               defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE,                         NULL,   0,           iptr:&ccparams.ue_TransmissionMode,                      defintval:1,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_UE_MULTIPLE_MAX,                              NULL,   0,           iptr:&ccparams.ue_multiple_max,                          defintval:4,               TYPE_UINT,       0},  \
-{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL,                  NULL,   0,           strptr:&ccparams.mbms_dedicated_serving_cell,  defstrval:"DISABLE",       TYPE_STRING,       0}  \
-}
-
-
-
-#define ENB_CONFIG_FRAME_TYPE_IDX                            0  			     
-#define ENB_CONFIG_TDD_CONFIG_IDX                            1  			     
-#define ENB_CONFIG_TDD_CONFIG_S_IDX			     2
-#define ENB_CONFIG_PREFIX_TYPE_IDX 			     3
-#define ENB_CONFIG_PBCH_REPETITION_IDX			     4
-#define ENB_CONFIG_EUTRA_BAND_IDX  			     5
-#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX  		     6
-#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX		     7
-#define ENB_CONFIG_NID_CELL_IDX				     8
-#define ENB_CONFIG_N_RB_DL_IDX				     9
-#define ENB_CONFIG_CELL_MBSFN_IDX  			     10
-#define ENB_CONFIG_NB_ANT_PORTS_IDX			     11
-#define ENB_CONFIG_PRACH_ROOT_IDX  			     12
-#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX  		     13
-#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX			     14
-#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX		     15
-#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX	             16     
-#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX		     17     
-#define ENB_CONFIG_PUCCH_NRB_CQI_IDX			     18
-#define ENB_CONFIG_PUCCH_NCS_AN_IDX			     19
-#define ENB_CONFIG_PUCCH_N1_AN_IDX 			     20
-#define ENB_CONFIG_PDSCH_RS_EPRE_IDX			     21
-#define ENB_CONFIG_PDSCH_PB_IDX				     22
-#define ENB_CONFIG_PUSCH_N_SB_IDX  			     23
-#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX		     24     
-#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX 		     25
-#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX		     26     
-#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX		     27
-#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX		     28
-#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX	     29     
-#define ENB_CONFIG_PUSCH_NDMRS1_IDX			     30
-#define ENB_CONFIG_PHICH_DURATION_IDX			     31
-#define ENB_CONFIG_PHICH_RESOURCE_IDX			     32
-#define ENB_CONFIG_SRS_ENABLE_IDX  			     33
-#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX		     34
-#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX 		     35
-#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX		     36
-#define ENB_CONFIG_SRS_MAXUPPTS_IDX			     37
-#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX			     38
-#define ENB_CONFIG_PUSCH_ALPHA_IDX 			     39
-#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX			     40
-#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX 		     41
-#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX		     42
-#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX		     43
-#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX		     44
-#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX		     45
-#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX		     46
-#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX		     47
-#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX  	     48
-#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX	     49
-#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX		     50
-#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX	     51
-#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX		     52
-#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53 
-#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX		     54
-#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX	     55     
-#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX     56	     
-#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX  		     57
-#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX	     58     
-#define ENB_CONFIG_PCCH_NB_IDX				     59
+#define CCPARAMS_DESC(ccparams) {         \
+    {ENB_CONFIG_STRING_FRAME_TYPE,                                   NULL,   0,           strptr:&ccparams.frame_type,                             defstrval:"FDD",           TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_TDD_CONFIG,                                   NULL,   0,           iptr:&ccparams.tdd_config,                               defintval:3,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_TDD_CONFIG_S,                                 NULL,   0,           iptr:&ccparams.tdd_config_s,                             defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PREFIX_TYPE,                                  NULL,   0,           strptr:&ccparams.prefix_type,                            defstrval:"NORMAL",        TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PBCH_REPETITION,                              NULL,   0,           strptr:&ccparams.pbch_repetition,                        defstrval:"FALSE",         TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_EUTRA_BAND,                                   NULL,   0,           iptr:&ccparams.eutra_band,                               defintval:7,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_DOWNLINK_FREQUENCY,                           NULL,   0,           i64ptr:(int64_t *)&ccparams.downlink_frequency,          defint64val:2680000000,    TYPE_UINT64,     0},  \
+    {ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET,                      NULL,   0,           iptr:&ccparams.uplink_frequency_offset,                  defintval:-120000000,      TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_NID_CELL,                                     NULL,   0,           iptr:&ccparams.Nid_cell,                                 defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_N_RB_DL,                                      NULL,   0,           iptr:&ccparams.N_RB_DL,                                  defintval:25,              TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_CELL_MBSFN,                                   NULL,   0,           iptr:&ccparams.Nid_cell_mbsfn,                           defintval:0,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_NB_ANT_PORTS,                                 NULL,   0,           iptr:&ccparams.nb_antenna_ports,                         defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PRACH_ROOT,                                   NULL,   0,           iptr:&ccparams.prach_root,                               defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PRACH_CONFIG_INDEX,                           NULL,   0,           iptr:&ccparams.prach_config_index,                       defintval:0,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PRACH_HIGH_SPEED,                             NULL,   0,           strptr:&ccparams.prach_high_speed,                       defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION,                       NULL,   0,           iptr:&ccparams.prach_zero_correlation,                   defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PRACH_FREQ_OFFSET,                            NULL,   0,           iptr:&ccparams.prach_freq_offset,                        defintval:2,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT,                            NULL,   0,           iptr:&ccparams.pucch_delta_shift,                        defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUCCH_NRB_CQI,                                NULL,   0,           iptr:&ccparams.pucch_nRB_CQI,                            defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUCCH_NCS_AN,                                 NULL,   0,           iptr:&ccparams.pucch_nCS_AN,                             defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUCCH_N1_AN,                                  NULL,   0,           iptr:&ccparams.pucch_n1_AN,                              defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PDSCH_RS_EPRE,                                NULL,   0,           iptr:&ccparams.pdsch_referenceSignalPower,               defintval:-29,             TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PDSCH_PB,                                     NULL,   0,           iptr:&ccparams.pdsch_p_b,                                defintval:0,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PUSCH_N_SB,                                   NULL,   0,           iptr:&ccparams.pusch_n_SB,                               defintval:1,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PUSCH_HOPPINGMODE,                            NULL,   0,           strptr:&ccparams.pusch_hoppingMode,                      defstrval:"interSubFrame", TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET,                          NULL,   0,           iptr:&ccparams.pusch_hoppingOffset,                      defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUSCH_ENABLE64QAM,                            NULL,   0,           strptr:&ccparams.pusch_enable64QAM,                      defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN,                       NULL,   0,           strptr:&ccparams.pusch_groupHoppingEnabled,              defstrval:"ENABLE",        TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT,                       NULL,   0,           iptr:&ccparams.pusch_groupAssignment,                    defintval:0,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN,                    NULL,   0,           strptr:&ccparams.pusch_sequenceHoppingEnabled,           defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUSCH_NDMRS1,                                 NULL,   0,           iptr:&ccparams.pusch_nDMRS1,                             defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PHICH_DURATION,                               NULL,   0,           strptr:&ccparams.phich_duration,                         defstrval:"NORMAL",        TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PHICH_RESOURCE,                               NULL,   0,           strptr:&ccparams.phich_resource,                         defstrval:"ONESIXTH",      TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_SRS_ENABLE,                                   NULL,   0,           strptr:&ccparams.srs_enable,                             defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG,                         NULL,   0,           iptr:&ccparams.srs_BandwidthConfig,                      defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG,                          NULL,   0,           iptr:&ccparams.srs_SubframeConfig,                       defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG,                         NULL,   0,           strptr:&ccparams.srs_ackNackST,                          defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_SRS_MAXUPPTS,                                 NULL,   0,           strptr:&ccparams.srs_MaxUpPts,                           defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUSCH_PO_NOMINAL,                             NULL,   0,           iptr:&ccparams.pusch_p0_Nominal,                         defintval:-90,             TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PUSCH_ALPHA,                                  NULL,   0,           strptr:&ccparams.pusch_alpha,                            defstrval:"AL1",           TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUCCH_PO_NOMINAL,                             NULL,   0,           iptr:&ccparams.pucch_p0_Nominal,                         defintval:-96,             TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE,                          NULL,   0,           iptr:&ccparams.msg3_delta_Preamble,                      defintval:6,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1,                         NULL,   0,           strptr:&ccparams.pucch_deltaF_Format1,                   defstrval:"DELTAF2",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format1b,                  defstrval:"deltaF3",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2,                         NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2,                   defstrval:"deltaF0",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2a,                  defstrval:"deltaF0",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B,                        NULL,   0,           strptr:&ccparams.pucch_deltaF_Format2b,                  defstrval:"deltaF0",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES,                        NULL,   0,           iptr:&ccparams.rach_numberOfRA_Preambles,                defintval:4,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG,                   NULL,   0,           strptr:&ccparams.rach_preamblesGroupAConfig,             defstrval:"DISABLE",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA,                NULL,   0,           iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA,            defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA,                       NULL,   0,           iptr:&ccparams.rach_messageSizeGroupA,                   defintval:56,              TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB,                NULL,   0,           strptr:&ccparams.rach_messagePowerOffsetGroupB,          defstrval:"minusinfinity", TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP,                        NULL,   0,           iptr:&ccparams.rach_powerRampingStep,                    defintval:4,               TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER,      NULL,   0,           iptr:&ccparams.rach_preambleInitialReceivedTargetPower,  defintval:-100,            TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX,                        NULL,   0,           iptr:&ccparams.rach_preambleTransMax,                    defintval:10,              TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE,                    NULL,   0,           iptr:&ccparams.rach_raResponseWindowSize,                defintval:10,              TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER,            NULL,   0,           iptr:&ccparams.rach_macContentionResolutionTimer,        defintval:48,              TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX,                           NULL,   0,           iptr:&ccparams.rach_maxHARQ_Msg3Tx,                      defintval:4,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE,                    NULL,   0,           iptr:&ccparams.pcch_defaultPagingCycle,                  defintval:128,             TYPE_INT,        0},  \
+    {ENB_CONFIG_STRING_PCCH_NB,                                      NULL,   0,           strptr:&ccparams.pcch_nB,                                defstrval:"oneT",          TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_CONFIG_PRESENT,                           NULL,   0,           strptr:&ccparams.drx_Config_present,                     defstrval:"prNothing",     TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_ONDURATIONTIMER,                          NULL,   0,           strptr:&ccparams.drx_onDurationTimer,                    defstrval:"psf10",         TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_INACTIVITYTIMER,                          NULL,   0,           strptr:&ccparams.drx_InactivityTimer,                    defstrval:"psf10",         TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER,                      NULL,   0,           strptr:&ccparams.drx_RetransmissionTimer,                defstrval:"psf8",          TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT,         NULL,   0,           strptr:&ccparams.drx_longDrx_CycleStartOffset_present,   defstrval:"prSf128",       TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET,                 NULL,   0,           iptr:&ccparams.drx_longDrx_CycleStartOffset,             defintval:0,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE,                           NULL,   0,           strptr:&ccparams.drx_shortDrx_Cycle,                     defstrval:"sf32",          TYPE_STRING,     0},  \
+    {ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER,                 NULL,   0,           iptr:&ccparams.drx_shortDrx_ShortCycleTimer,             defintval:3,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF,                 NULL,   0,           iptr:&ccparams.bcch_modificationPeriodCoeff,             defintval:2,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_T300,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t300,               defintval:1000,            TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_T301,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t301,               defintval:1000,            TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_T310,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t310,               defintval:1000,            TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_T311,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_t311,               defintval:10000,           TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_N310,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_n310,               defintval:20,              TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UETIMERS_N311,                                NULL,   0,           iptr:&ccparams.ue_TimersAndConstants_n311,               defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UE_TRANSMISSION_MODE,                         NULL,   0,           iptr:&ccparams.ue_TransmissionMode,                      defintval:1,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_UE_MULTIPLE_MAX,                              NULL,   0,           iptr:&ccparams.ue_multiple_max,                          defintval:4,               TYPE_UINT,       0},  \
+    {ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL,                  NULL,   0,           strptr:&ccparams.mbms_dedicated_serving_cell,  defstrval:"DISABLE",       TYPE_STRING,       0}  \
+  }
+
+
+
+#define ENB_CONFIG_FRAME_TYPE_IDX                            0
+#define ENB_CONFIG_TDD_CONFIG_IDX                            1
+#define ENB_CONFIG_TDD_CONFIG_S_IDX          2
+#define ENB_CONFIG_PREFIX_TYPE_IDX           3
+#define ENB_CONFIG_PBCH_REPETITION_IDX           4
+#define ENB_CONFIG_EUTRA_BAND_IDX            5
+#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX          6
+#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX         7
+#define ENB_CONFIG_NID_CELL_IDX            8
+#define ENB_CONFIG_N_RB_DL_IDX             9
+#define ENB_CONFIG_CELL_MBSFN_IDX            10
+#define ENB_CONFIG_NB_ANT_PORTS_IDX          11
+#define ENB_CONFIG_PRACH_ROOT_IDX            12
+#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX          13
+#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX          14
+#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX        15
+#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX               16
+#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX         17
+#define ENB_CONFIG_PUCCH_NRB_CQI_IDX           18
+#define ENB_CONFIG_PUCCH_NCS_AN_IDX          19
+#define ENB_CONFIG_PUCCH_N1_AN_IDX           20
+#define ENB_CONFIG_PDSCH_RS_EPRE_IDX           21
+#define ENB_CONFIG_PDSCH_PB_IDX            22
+#define ENB_CONFIG_PUSCH_N_SB_IDX            23
+#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX         24
+#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX         25
+#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX         26
+#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX        27
+#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX        28
+#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX       29
+#define ENB_CONFIG_PUSCH_NDMRS1_IDX          30
+#define ENB_CONFIG_PHICH_DURATION_IDX          31
+#define ENB_CONFIG_PHICH_RESOURCE_IDX          32
+#define ENB_CONFIG_SRS_ENABLE_IDX            33
+#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX        34
+#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX         35
+#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX        36
+#define ENB_CONFIG_SRS_MAXUPPTS_IDX          37
+#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX          38
+#define ENB_CONFIG_PUSCH_ALPHA_IDX           39
+#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX          40
+#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX         41
+#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX        42
+#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX         43
+#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX        44
+#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX         45
+#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX         46
+#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX         47
+#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX        48
+#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX       49
+#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX        50
+#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX       51
+#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX         52
+#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53
+#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX         54
+#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX       55
+#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX     56
+#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX          57
+#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX       58
+#define ENB_CONFIG_PCCH_NB_IDX             59
 #define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
 #define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
 #define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
@@ -819,7 +818,7 @@ typedef struct ccparams_lte_s {
 #define ENB_CONFIG_UETIMERS_N310_IDX 73
 #define ENB_CONFIG_UETIMERS_N311_IDX 74
 #define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
-#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX	     76
+#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX       76
 
 /*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 /* SRB1 configuration parameters section name */
@@ -846,14 +845,14 @@ typedef struct srb1_params_s {
   int32_t     srb1_max_retx_threshold;
 } srb1_params_t;
 
-#define SRB1PARAMS_DESC(srb1_params) {					\
-{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT,         NULL,   0,            iptr:&srb1_params.srb1_timer_poll_retransmit,   defintval:80,     TYPE_UINT,      0},       \
-{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING,              NULL,   0,            iptr:&srb1_params.srb1_timer_reordering,        defintval:35,     TYPE_UINT,      0},       \
-{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT,         NULL,   0,            iptr:&srb1_params.srb1_timer_status_prohibit,   defintval:0,      TYPE_UINT,      0},       \
-{ENB_CONFIG_STRING_SRB1_POLL_PDU,                      NULL,   0,            iptr:&srb1_params.srb1_poll_pdu,                defintval:4,      TYPE_UINT,      0},       \
-{ENB_CONFIG_STRING_SRB1_POLL_BYTE,                     NULL,   0,            iptr:&srb1_params.srb1_poll_byte,               defintval:99999,  TYPE_UINT,      0},       \
-{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD,            NULL,   0,            iptr:&srb1_params.srb1_max_retx_threshold,      defintval:4,      TYPE_UINT,      0}        \
-}
+#define SRB1PARAMS_DESC(srb1_params) {          \
+    {ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT,         NULL,   0,            iptr:&srb1_params.srb1_timer_poll_retransmit,   defintval:80,     TYPE_UINT,      0},       \
+    {ENB_CONFIG_STRING_SRB1_TIMER_REORDERING,              NULL,   0,            iptr:&srb1_params.srb1_timer_reordering,        defintval:35,     TYPE_UINT,      0},       \
+    {ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT,         NULL,   0,            iptr:&srb1_params.srb1_timer_status_prohibit,   defintval:0,      TYPE_UINT,      0},       \
+    {ENB_CONFIG_STRING_SRB1_POLL_PDU,                      NULL,   0,            iptr:&srb1_params.srb1_poll_pdu,                defintval:4,      TYPE_UINT,      0},       \
+    {ENB_CONFIG_STRING_SRB1_POLL_BYTE,                     NULL,   0,            iptr:&srb1_params.srb1_poll_byte,               defintval:99999,  TYPE_UINT,      0},       \
+    {ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD,            NULL,   0,            iptr:&srb1_params.srb1_max_retx_threshold,      defintval:4,      TYPE_UINT,      0}        \
+  }
 
 /* MME configuration parameters section name */
 #define ENB_CONFIG_STRING_MME_IP_ADDRESS                "mme_ip_address"
@@ -871,12 +870,12 @@ typedef struct srb1_params_s {
 /*   optname                                          helpstr   paramflags    XXXptr       defXXXval         type           numelt     */
 /*-------------------------------------------------------------------------------------------------------------------------------------*/
 #define S1PARAMS_DESC {  \
-{ENB_CONFIG_STRING_MME_IPV4_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_MME_IPV6_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE,              NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE,          NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX,           NULL,      0,         uptr:NULL,   defintarrayval:NULL,TYPE_UINTARRAY, 6}           \
-}
+    {ENB_CONFIG_STRING_MME_IPV4_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_MME_IPV6_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE,              NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE,          NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX,           NULL,      0,         uptr:NULL,   defintarrayval:NULL,TYPE_UINTARRAY, 6}           \
+  }
 
 #define ENB_MME_IPV4_ADDRESS_IDX          0
 #define ENB_MME_IPV6_ADDRESS_IDX          1
@@ -901,10 +900,10 @@ typedef struct srb1_params_s {
 /*   optname                                          helpstr   paramflags    XXXptr       defXXXval         type           numelt     */
 /*-------------------------------------------------------------------------------------------------------------------------------------*/
 #define X2PARAMS_DESC {  \
-{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE,          NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
-}
+    {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS,                   NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+    {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE,          NULL,      0,         uptr:NULL,   defstrval:NULL,   TYPE_STRING,   0},          \
+  }
 
 #define ENB_X2_IPV4_ADDRESS_IDX          0
 #define ENB_X2_IPV6_ADDRESS_IDX          1
@@ -924,9 +923,9 @@ typedef struct srb1_params_s {
 /*   optname                                          helpstr   paramflags    XXXptr                             defXXXval         type           numelt     */
 /*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define SCTPPARAMS_DESC {  \
-{ENB_CONFIG_STRING_SCTP_INSTREAMS,                       NULL,   0,   uptr:NULL,   defintval:-1,    TYPE_UINT,   0},       \
-{ENB_CONFIG_STRING_SCTP_OUTSTREAMS,                      NULL,   0,   uptr:NULL,   defintval:-1,    TYPE_UINT,   0}        \
-}
+    {ENB_CONFIG_STRING_SCTP_INSTREAMS,                       NULL,   0,   uptr:NULL,   defintval:-1,    TYPE_UINT,   0},       \
+    {ENB_CONFIG_STRING_SCTP_OUTSTREAMS,                      NULL,   0,   uptr:NULL,   defintval:-1,    TYPE_UINT,   0}        \
+  }
 
 #define ENB_SCTP_INSTREAMS_IDX          0
 #define ENB_SCTP_OUTSTREAMS_IDX         1
@@ -940,8 +939,8 @@ typedef struct srb1_params_s {
 #define ENB_INTERFACE_NAME_FOR_S1U_IDX             2
 #define ENB_IPV4_ADDR_FOR_S1U_IDX                  3
 #define ENB_PORT_FOR_S1U_IDX                       4
-#define ENB_IPV4_ADDR_FOR_X2C_IDX		   5
-#define ENB_PORT_FOR_X2C_IDX			   6
+#define ENB_IPV4_ADDR_FOR_X2C_IDX      5
+#define ENB_PORT_FOR_X2C_IDX         6
 
 /* S1 interface configuration parameters names   */
 #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
@@ -959,14 +958,14 @@ typedef struct srb1_params_s {
 /*   optname                                            helpstr   paramflags    XXXptr              defXXXval             type           numelt     */
 /*--------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define NETPARAMS_DESC {  \
-{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME,        NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
-{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME,          NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
-{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U,           NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
-{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U,                NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
-{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U,                     NULL,      0,         uptr:NULL,           defintval:2152L,     TYPE_UINT,        0},      \
-{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C,                NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
-{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C,                     NULL,      0,         uptr:NULL,           defintval:0L,        TYPE_UINT,        0},      \
-}   
+    {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME,        NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
+    {ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME,          NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
+    {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U,           NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
+    {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U,                NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
+    {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U,                     NULL,      0,         uptr:NULL,           defintval:2152L,     TYPE_UINT,        0},      \
+    {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C,                NULL,      0,         strptr:NULL,         defstrval:NULL,      TYPE_STRING,      0},      \
+    {ENB_CONFIG_STRING_ENB_PORT_FOR_X2C,                     NULL,      0,         uptr:NULL,           defintval:0L,        TYPE_UINT,        0},      \
+  }
 
 
 
@@ -975,10 +974,10 @@ typedef struct srb1_params_s {
 /*   optname                                            helpstr   paramflags    XXXptr              defXXXval                                           type           numelt     */
 /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define GTPUPARAMS_DESC { \
-{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U,           NULL,    0,            strptr:&enb_interface_name_for_S1U,      defstrval:"lo",                TYPE_STRING,   0},        \
-{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U,                NULL,    0,            strptr:&enb_ipv4_address_for_S1U,        defstrval:"127.0.0.1",         TYPE_STRING,   0},        \
-{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U,                     NULL,    0,            uptr:&enb_port_for_S1U,                  defintval:2152,                TYPE_UINT,     0}         \
-}
+    {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U,           NULL,    0,            strptr:&enb_interface_name_for_S1U,      defstrval:"lo",                TYPE_STRING,   0},        \
+    {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U,                NULL,    0,            strptr:&enb_ipv4_address_for_S1U,        defstrval:"127.0.0.1",         TYPE_STRING,   0},        \
+    {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U,                     NULL,    0,            uptr:&enb_port_for_S1U,                  defintval:2152,                TYPE_UINT,     0}         \
+  }
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1008,65 +1007,65 @@ typedef struct srb1_params_s {
 #define FLEXRAN_AWAIT_RECONF_IDX                      5
 
 #define FLEXRANPARAMS_DESC { \
-{CONFIG_STRING_FLEXRAN_ENABLED,                NULL,   0,   strptr:NULL,   defstrval:"no",                    TYPE_STRING,   0},           \
-{CONFIG_STRING_FLEXRAN_INTERFACE_NAME,         NULL,   0,   strptr:NULL,   defstrval:"lo",                    TYPE_STRING,   0},           \
-{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS,           NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",             TYPE_STRING,   0},           \
-{CONFIG_STRING_FLEXRAN_PORT,                   NULL,   0,   uptr:NULL,     defintval:2210,                    TYPE_UINT,     0},           \
-{CONFIG_STRING_FLEXRAN_CACHE,                  NULL,   0,   strptr:NULL,   defstrval:"/mnt/oai_agent_cache",  TYPE_STRING,   0},           \
-{CONFIG_STRING_FLEXRAN_AWAIT_RECONF,           NULL,   0,   strptr:NULL,   defstrval:"no",                    TYPE_STRING,   0}            \
-}
+    {CONFIG_STRING_FLEXRAN_ENABLED,                NULL,   0,   strptr:NULL,   defstrval:"no",                    TYPE_STRING,   0},           \
+    {CONFIG_STRING_FLEXRAN_INTERFACE_NAME,         NULL,   0,   strptr:NULL,   defstrval:"lo",                    TYPE_STRING,   0},           \
+    {CONFIG_STRING_FLEXRAN_IPV4_ADDRESS,           NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",             TYPE_STRING,   0},           \
+    {CONFIG_STRING_FLEXRAN_PORT,                   NULL,   0,   uptr:NULL,     defintval:2210,                    TYPE_UINT,     0},           \
+    {CONFIG_STRING_FLEXRAN_CACHE,                  NULL,   0,   strptr:NULL,   defstrval:"/mnt/oai_agent_cache",  TYPE_STRING,   0},           \
+    {CONFIG_STRING_FLEXRAN_AWAIT_RECONF,           NULL,   0,   strptr:NULL,   defstrval:"no",                    TYPE_STRING,   0}            \
+  }
 
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
 /* CU/DU configuration section names*/
-#define CONFIG_STRING_DU_LIST			"DU"
-#define CONFIG_STRING_CU_LIST			"CU"
-#define DU_TYPE_LTE					0
-#define DU_TYPE_WIFI					1
-#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG		"CU_INTERFACES"
+#define CONFIG_STRING_DU_LIST     "DU"
+#define CONFIG_STRING_CU_LIST     "CU"
+#define DU_TYPE_LTE         0
+#define DU_TYPE_WIFI          1
+#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG    "CU_INTERFACES"
 #define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U     "CU_INTERFACE_NAME_FOR_F1U"
 #define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U       "CU_IPV4_ADDRESS_FOR_F1U"
 #define ENB_CONFIG_STRING_CU_PORT_FOR_F1U               "CU_PORT_FOR_F1U"
-#define ENB_CONFIG_STRING_DU_TYPE	                "DU_TYPE"
+#define ENB_CONFIG_STRING_DU_TYPE                 "DU_TYPE"
 #define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE        "F1_U_CU_TRANSPORT_TYPE"
 
-#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG		"DU_INTERFACES"
+#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG    "DU_INTERFACES"
 #define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U     "DU_INTERFACE_NAME_FOR_F1U"
 #define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U       "DU_IPV4_ADDRESS_FOR_F1U"
 #define ENB_CONFIG_STRING_DU_PORT_FOR_F1U               "DU_PORT_FOR_F1U"
 #define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE        "F1_U_DU_TRANSPORT_TYPE"
 
-#define CONFIG_STRING_CU_BALANCING			"CU_BALANCING"
+#define CONFIG_STRING_CU_BALANCING      "CU_BALANCING"
 
 #define CUPARAMS_DESC { \
-{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U,           	NULL,   0,   strptr:NULL,   defstrval:"eth0",   	TYPE_STRING,   0},           \
-{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U,                   	NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",   	TYPE_STRING,   0},           \
-{ENB_CONFIG_STRING_CU_PORT_FOR_F1U,                 	 	NULL,   0,   uptr:NULL,     defintval:2210,   		TYPE_UINT,     0},            \
-{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE,                  	NULL,   0,   strptr:NULL,   defstrval:"TCP",   		TYPE_STRING,   0},            \
-{ENB_CONFIG_STRING_DU_TYPE,                  			NULL,   0,   strptr:NULL,   defstrval:"LTE",   		TYPE_STRING,   0},            \
-}
+    {ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U,             NULL,   0,   strptr:NULL,   defstrval:"eth0",     TYPE_STRING,   0},           \
+    {ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U,                     NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",    TYPE_STRING,   0},           \
+    {ENB_CONFIG_STRING_CU_PORT_FOR_F1U,                     NULL,   0,   uptr:NULL,     defintval:2210,       TYPE_UINT,     0},            \
+    {ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE,                    NULL,   0,   strptr:NULL,   defstrval:"TCP",      TYPE_STRING,   0},            \
+    {ENB_CONFIG_STRING_DU_TYPE,                       NULL,   0,   strptr:NULL,   defstrval:"LTE",      TYPE_STRING,   0},            \
+  }
 
 #define DUPARAMS_DESC { \
-{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U,           	NULL,   0,   strptr:NULL,   defstrval:"eth0",   	TYPE_STRING,   0},           \
-{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U,                  	NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",   	TYPE_STRING,   0},           \
-{ENB_CONFIG_STRING_DU_PORT_FOR_F1U,                  		NULL,   0,   uptr:NULL,     defintval:2210,   		TYPE_UINT,     0},            \
-{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE,                   	NULL,   0,   strptr:NULL,   defstrval:"TCP",   		TYPE_STRING,   0},           \
-}
+    {ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U,             NULL,   0,   strptr:NULL,   defstrval:"eth0",     TYPE_STRING,   0},           \
+    {ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U,                   NULL,   0,   strptr:NULL,   defstrval:"127.0.0.1",    TYPE_STRING,   0},           \
+    {ENB_CONFIG_STRING_DU_PORT_FOR_F1U,                     NULL,   0,   uptr:NULL,     defintval:2210,       TYPE_UINT,     0},            \
+    {ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE,                    NULL,   0,   strptr:NULL,   defstrval:"TCP",      TYPE_STRING,   0},           \
+  }
 
 #define CU_BAL_DESC { \
-{CONFIG_STRING_CU_BALANCING,           				NULL,   0,   strptr:NULL,   defstrval:"ALL",   	TYPE_STRING,   0},           \
-}
+    {CONFIG_STRING_CU_BALANCING,                  NULL,   0,   strptr:NULL,   defstrval:"ALL",    TYPE_STRING,   0},           \
+  }
 
-#define CU_INTERFACE_F1U 	                     0
-#define CU_ADDRESS_F1U 		  		     1
-#define CU_PORT_F1U 	              		     2
-#define CU_TYPE_F1U 	              		     3
+#define CU_INTERFACE_F1U                       0
+#define CU_ADDRESS_F1U               1
+#define CU_PORT_F1U                          2
+#define CU_TYPE_F1U                          3
 
-#define DU_INTERFACE_F1U	                     0
-#define DU_ADDRESS_F1U		  		     1
-#define DU_PORT_F1U	               		     2
-#define DU_TYPE_F1U	               		     3
-#define DU_TECH					     4
+#define DU_INTERFACE_F1U                       0
+#define DU_ADDRESS_F1U               1
+#define DU_PORT_F1U                        2
+#define DU_TYPE_F1U                        3
+#define DU_TECH              4
 
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -1133,9 +1132,9 @@ typedef struct srb1_params_s {
 /*   optname                                          helpstr   paramflags    XXXptr       defXXXval                                 type           numelt     */
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define THREAD_CONF_DESC {  \
-{THREAD_CONFIG_STRING_PARALLEL,          CONFIG_HLP_PARALLEL,      0,       strptr:NULL,   defstrval:"PARALLEL_RU_L1_TRX_SPLIT",   TYPE_STRING,   0},          \
-{THREAD_CONFIG_STRING_WORKER,            CONFIG_HLP_WORKER,        0,       strptr:NULL,   defstrval:"WORKER_ENABLE",              TYPE_STRING,   0}           \
-}
+    {THREAD_CONFIG_STRING_PARALLEL,          CONFIG_HLP_PARALLEL,      0,       strptr:NULL,   defstrval:"PARALLEL_RU_L1_TRX_SPLIT",   TYPE_STRING,   0},          \
+    {THREAD_CONFIG_STRING_WORKER,            CONFIG_HLP_WORKER,        0,       strptr:NULL,   defstrval:"WORKER_ENABLE",              TYPE_STRING,   0}           \
+  }
 
 
 #define CONFIG_HLP_WORKER                          "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n"
diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c
index bb81c2c2d2dbec3971ce234b6534c327bd5f2af2..221786965d4d060c7a38ab48d84b872b210f1f80 100644
--- a/openair2/ENB_APP/flexran_agent_ran_api.c
+++ b/openair2/ENB_APP/flexran_agent_ran_api.c
@@ -17,10 +17,10 @@
  *-------------------------------------------------------------------------------
  * For more information about the OpenAirInterface (OAI) Software Alliance:
  *      contact@openairinterface.org
- */ 
+ */
 
 /*! \file flexran_agent_ran_api.c
- * \brief FlexRAN RAN API abstraction 
+ * \brief FlexRAN RAN API abstraction
  * \author N. Nikaein, X. Foukas, S. SHARIAT BAGHERI and R. Schmidt
  * \date 2017
  * \version 0.1
@@ -29,62 +29,57 @@
 #include <dlfcn.h>
 #include "flexran_agent_ran_api.h"
 
-static inline int phy_is_present(mid_t mod_id, uint8_t cc_id)
-{
+static inline int phy_is_present(mid_t mod_id, uint8_t cc_id) {
   return RC.eNB && RC.eNB[mod_id] && RC.eNB[mod_id][cc_id];
 }
 
-static inline int mac_is_present(mid_t mod_id)
-{
+static inline int mac_is_present(mid_t mod_id) {
   return RC.mac && RC.mac[mod_id];
 }
 
-static inline int rrc_is_present(mid_t mod_id)
-{
+static inline int rrc_is_present(mid_t mod_id) {
   return RC.rrc && RC.rrc[mod_id];
 }
 
-uint32_t flexran_get_current_time_ms(mid_t mod_id, int subframe_flag)
-{
+uint32_t flexran_get_current_time_ms(mid_t mod_id, int subframe_flag) {
   if (!mac_is_present(mod_id)) return 0;
+
   if (subframe_flag == 1)
     return RC.mac[mod_id]->frame*10 + RC.mac[mod_id]->subframe;
   else
     return RC.mac[mod_id]->frame*10;
 }
 
-frame_t flexran_get_current_frame(mid_t mod_id)
-{
+frame_t flexran_get_current_frame(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   //  #warning "SFN will not be in [0-1023] when oaisim is used"
   return RC.mac[mod_id]->frame;
 }
 
-frame_t flexran_get_current_system_frame_num(mid_t mod_id)
-{
+frame_t flexran_get_current_system_frame_num(mid_t mod_id) {
   return flexran_get_current_frame(mod_id) % 1024;
 }
 
-sub_frame_t flexran_get_current_subframe(mid_t mod_id)
-{
+sub_frame_t flexran_get_current_subframe(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->subframe;
 }
 
-uint32_t flexran_get_sfn_sf(mid_t mod_id)
-{
+uint32_t flexran_get_sfn_sf(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return flexran_get_current_frame(mod_id) * 10 + flexran_get_current_subframe(mod_id);
 }
 
-uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time)
-{
+uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time) {
   if (!mac_is_present(mod_id)) return 0;
+
   frame_t frame = flexran_get_current_system_frame_num(mod_id);
   sub_frame_t subframe = flexran_get_current_subframe(mod_id);
   uint16_t sfn_sf, frame_mask, sf_mask;
   int additional_frames;
-
   subframe = (subframe + ahead_of_time) % 10;
 
   if (subframe < flexran_get_current_subframe(mod_id))
@@ -92,26 +87,25 @@ uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time)
 
   additional_frames = ahead_of_time / 10;
   frame = (frame + additional_frames) % 1024;
-
   frame_mask = (1 << 12) - 1;
   sf_mask = (1 << 4) - 1;
   sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4);
-
   return sfn_sf;
 }
 
-int flexran_get_mac_num_ues(mid_t mod_id)
-{
+int flexran_get_mac_num_ues(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.num_UEs;
 }
 
-int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id)
-{
+int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   // Not sure whether this is needed: if (!rrc_is_present(mod_id)) return 0;
   const rnti_t rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
   const int s = mac_eNB_get_rrc_status(mod_id, rnti);
+
   if (s < RRC_CONNECTED)
     return 0;
   else if (s == RRC_CONNECTED)
@@ -120,10 +114,11 @@ int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id)
     return 3;
 }
 
-int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti) {
   int n;
+
   if (!mac_is_present(mod_id)) return 0;
+
   /* get the (active) UE with RNTI i */
   for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
     if (RC.mac[mod_id]->UE_list.active[n] == TRUE
@@ -131,295 +126,295 @@ int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti)
       return n;
     }
   }
-  return 0;
 
+  return 0;
 }
 
-int flexran_get_mac_ue_id(mid_t mod_id, int i)
-{
+int flexran_get_mac_ue_id(mid_t mod_id, int i) {
   int n;
+
   if (!mac_is_present(mod_id)) return 0;
+
   /* get the (i+1)'th active UE */
   for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
     if (RC.mac[mod_id]->UE_list.active[n] == TRUE) {
       if (i == 0)
         return n;
+
       --i;
     }
   }
+
   return 0;
 }
 
-rnti_t flexran_get_mac_ue_crnti(mid_t mod_id, mid_t ue_id)
-{
+rnti_t flexran_get_mac_ue_crnti(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return UE_RNTI(mod_id, ue_id);
 }
 
-int flexran_get_ue_bsr_ul_buffer_info(mid_t mod_id, mid_t ue_id, lcid_t lcid)
-{
+int flexran_get_ue_bsr_ul_buffer_info(mid_t mod_id, mid_t ue_id, lcid_t lcid) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->UE_list.UE_template[UE_PCCID(mod_id, ue_id)][ue_id].ul_buffer_info[lcid];
 }
 
-int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id)
-{
+int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_template[UE_PCCID(mod_id, ue_id)][ue_id].phr_info;
 }
 
-uint8_t flexran_get_ue_wcqi(mid_t mod_id, mid_t ue_id)
-{
+uint8_t flexran_get_ue_wcqi(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_sched_ctrl[ue_id].dl_cqi[0];
 }
 
-rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
-{
+rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   rnti_t rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
   frame_t frame = flexran_get_current_frame(mod_id);
   sub_frame_t subframe = flexran_get_current_subframe(mod_id);
-  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                                    ,0, 0
-#endif
-                                                    );
+  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0,0, 0
+                                                       );
   return rlc_status.bytes_in_buffer;
 }
 
-rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
-{
+rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id);
   frame_t frame = flexran_get_current_frame(mod_id);
   sub_frame_t subframe = flexran_get_current_subframe(mod_id);
-  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                                    ,0, 0
-#endif
-                                                    );
+  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0,0, 0
+                                                       );
   return rlc_status.pdus_in_buffer;
 }
 
-frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
-{
+frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id);
   frame_t frame = flexran_get_current_frame(mod_id);
   sub_frame_t subframe = flexran_get_current_subframe(mod_id);
-  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                                    ,0, 0
-#endif
-                                                    );
+  mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0,0, 0
+                                                       );
   return rlc_status.head_sdu_creation_time;
 }
 
-int32_t flexran_get_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+int32_t flexran_get_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
 
   int32_t tau = RC.eNB[mod_id][cc_id]->UE_stats[ue_id].timing_advance_update;
+
   switch (flexran_get_N_RB_DL(mod_id, cc_id)) {
-  case 6:
-    return tau;
-  case 15:
-    return tau / 2;
-  case 25:
-    return tau / 4;
-  case 50:
-    return tau / 8;
-  case 75:
-    return tau / 12;
-  case 100:
-    if (flexran_get_threequarter_fs(mod_id, cc_id) == 0)
-      return tau / 16;
-    else
+    case 6:
+      return tau;
+
+    case 15:
+      return tau / 2;
+
+    case 25:
+      return tau / 4;
+
+    case 50:
+      return tau / 8;
+
+    case 75:
       return tau / 12;
-  default:
-    return 0;
+
+    case 100:
+      if (flexran_get_threequarter_fs(mod_id, cc_id) == 0)
+        return tau / 16;
+      else
+        return tau / 12;
+
+    default:
+      return 0;
   }
 }
 
-uint32_t flexran_get_total_size_dl_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_size_dl_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_sdu_bytes;
 }
 
-uint32_t flexran_get_total_size_ul_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_size_ul_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   uint64_t bytes = 0;
+
   for (int i = 0; i < NB_RB_MAX; ++i) {
     bytes += RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].num_bytes_rx[i];
   }
+
   return bytes;
 }
 
-uint32_t flexran_get_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].TBS;
 }
 
-uint32_t flexran_get_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].ulsch_TBS;
 }
 
-uint16_t flexran_get_num_prb_retx_dl_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint16_t flexran_get_num_prb_retx_dl_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used_retx;
 }
 
-uint32_t flexran_get_num_prb_retx_ul_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_num_prb_retx_ul_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used_retx_rx;
 }
 
-uint16_t flexran_get_num_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint16_t flexran_get_num_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used;
 }
 
-uint16_t flexran_get_num_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint16_t flexran_get_num_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used_rx;
 }
 
-uint8_t flexran_get_ue_wpmi(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+uint8_t flexran_get_ue_wpmi(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_sched_ctrl[ue_id].periodic_wideband_pmi[cc_id];
 }
 
-uint8_t flexran_get_mcs1_dl(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint8_t flexran_get_mcs1_dl(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].dlsch_mcs1;
 }
 
-uint8_t flexran_get_mcs2_dl(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint8_t flexran_get_mcs2_dl(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].dlsch_mcs2;
 }
 
-uint8_t flexran_get_mcs1_ul(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint8_t flexran_get_mcs1_ul(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].ulsch_mcs1;
 }
 
-uint8_t flexran_get_mcs2_ul(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint8_t flexran_get_mcs2_ul(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].ulsch_mcs2;
 }
 
-uint32_t flexran_get_total_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_rbs_used;
 }
 
-uint32_t flexran_get_total_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_rbs_used_rx;
 }
 
-uint32_t flexran_get_total_num_pdu_dl(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_num_pdu_dl(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_num_pdus;
 }
 
-uint32_t flexran_get_total_num_pdu_ul(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_total_num_pdu_ul(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_num_pdus_rx;
 }
 
-uint64_t flexran_get_total_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint64_t flexran_get_total_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_pdu_bytes;
 }
 
-uint64_t flexran_get_total_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint64_t flexran_get_total_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_ulsch_TBS;
 }
 
-int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id)
-{
+int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].harq_round;
 }
 
-uint32_t flexran_get_num_mac_sdu_tx(mid_t mod_id, mid_t ue_id, int cc_id)
-{
+uint32_t flexran_get_num_mac_sdu_tx(mid_t mod_id, mid_t ue_id, int cc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].num_mac_sdu_tx;
 }
 
-unsigned char flexran_get_mac_sdu_lcid_index(mid_t mod_id, mid_t ue_id, int cc_id, int index)
-{
+unsigned char flexran_get_mac_sdu_lcid_index(mid_t mod_id, mid_t ue_id, int cc_id, int index) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].lcid_sdu[index];
 }
 
-uint32_t flexran_get_mac_sdu_size(mid_t mod_id, mid_t ue_id, int cc_id, int lcid)
-{
+uint32_t flexran_get_mac_sdu_size(mid_t mod_id, mid_t ue_id, int cc_id, int lcid) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].sdu_length_tx[lcid];
 }
 
 
 /* TODO needs to be revised */
-void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
-/*
-  UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list;
-  UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[ue_id];
-
-  if (ue_sched_ctl->ta_timer == 0) {
-    
-    // WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...                                                                         
-    //    LTE_eNB_UE_stats		*eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti);
-    //ue_sched_ctl->ta_timer		      = 20;	// wait 20 subframes before taking TA measurement from PHY                                         
-    ue_sched_ctl->ta_update = flexran_get_TA(mod_id, ue_id, CC_id);
-
-    // clear the update in case PHY does not have a new measurement after timer expiry                                               
-    //    eNB_UE_stats->timing_advance_update	      = 0;
-  } else {
-    ue_sched_ctl->ta_timer--;
-    ue_sched_ctl->ta_update		      = 0;	// don't trigger a timing advance command      
-  }
-#warning "Implement flexran_update_TA() in RAN API"
-*/
+void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
+  /*
+    UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list;
+    UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[ue_id];
+
+    if (ue_sched_ctl->ta_timer == 0) {
+
+      // WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...
+      //    LTE_eNB_UE_stats    *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti);
+      //ue_sched_ctl->ta_timer          = 20; // wait 20 subframes before taking TA measurement from PHY
+      ue_sched_ctl->ta_update = flexran_get_TA(mod_id, ue_id, CC_id);
+
+      // clear the update in case PHY does not have a new measurement after timer expiry
+      //    eNB_UE_stats->timing_advance_update       = 0;
+    } else {
+      ue_sched_ctl->ta_timer--;
+      ue_sched_ctl->ta_update         = 0;  // don't trigger a timing advance command
+    }
+  #warning "Implement flexran_update_TA() in RAN API"
+  */
 }
 
 /* TODO needs to be revised, looks suspicious: why do we need UE stats? */
-int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
-/*
-#warning "Implement flexran_get_MAC_CE_bitmap_TA() in RAN API"
-*/
+int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
+  /*
+  #warning "Implement flexran_get_MAC_CE_bitmap_TA() in RAN API"
+  */
   if (!phy_is_present(mod_id, cc_id)) return 0;
 
   /* UE_stats can not be null, they are an array in RC
   LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id,CC_id,rnti);
-  
+
   if (eNB_UE_stats == NULL) {
     return 0;
   }
@@ -432,20 +427,19 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
   }
 }
 
-int flexran_get_active_CC(mid_t mod_id, mid_t ue_id)
-{
+int flexran_get_active_CC(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.numactiveCCs[ue_id];
 }
 
-uint8_t flexran_get_current_RI(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+uint8_t flexran_get_current_RI(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->UE_stats[ue_id].rank;
 }
 
-int flexran_get_tpc(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+int flexran_get_tpc(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
 
   /* before: tested that UL_rssi != NULL and set parameter ([0]), but it is a
@@ -453,14 +447,15 @@ int flexran_get_tpc(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
   int pCCid = UE_PCCID(mod_id,ue_id);
   int32_t target_rx_power = RC.eNB[mod_id][pCCid]->frame_parms.ul_power_control_config_common.p0_NominalPUSCH;
   int32_t normalized_rx_power = RC.eNB[mod_id][cc_id]->UE_stats[ue_id].UL_rssi[0];
-
   int tpc;
+
   if (normalized_rx_power > target_rx_power + 1)
-    tpc = 0;	//-1
+    tpc = 0;  //-1
   else if (normalized_rx_power < target_rx_power - 1)
-    tpc = 2;	//+1
+    tpc = 2;  //+1
   else
-    tpc = 1;	//0
+    tpc = 1;  //0
+
   return tpc;
 }
 
@@ -471,18 +466,16 @@ int flexran_get_harq(mid_t       mod_id,
                      sub_frame_t subframe,
                      uint8_t    *pid,
                      uint8_t    *round,
-                     uint8_t     harq_flag)
-{
+                     uint8_t     harq_flag) {
   /* TODO: Add int TB in function parameters to get the status of the second
    * TB. This can be done to by editing in get_ue_active_harq_pid function in
    * line 272 file: phy_procedures_lte_eNB.c to add DLSCH_ptr =
    * PHY_vars_eNB_g[Mod_id][CC_id]->dlsch_eNB[(uint32_t)UE_id][1];*/
-
   /* TODO IMPLEMENT */
   /*
   uint8_t harq_pid;
   uint8_t harq_round;
-  
+
   if (mac_xface_not_ready()) return 0 ;
 
   uint16_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id);
@@ -492,7 +485,7 @@ int flexran_get_harq(mid_t       mod_id,
 
    } else if (harq_flag == openair_harq_UL){
 
-     mac_xface->get_ue_active_harq_pid(mod_id,CC_id,rnti,frame,subframe,&harq_pid,round,openair_harq_UL);    
+     mac_xface->get_ue_active_harq_pid(mod_id,CC_id,rnti,frame,subframe,&harq_pid,round,openair_harq_UL);
    }
    else {
 
@@ -508,33 +501,33 @@ int flexran_get_harq(mid_t       mod_id,
   /*   *status = 0; */
   /* } */
   /*return *round;*/
-/*
-#warning "Implement flexran_get_harq() in RAN API"
-*/
+  /*
+  #warning "Implement flexran_get_harq() in RAN API"
+  */
   return 0;
 }
 
-int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_dBm;
 }
 
-int8_t flexran_get_p0_nominal_pucch(mid_t mod_id, uint8_t cc_id)
-{
+int8_t flexran_get_p0_nominal_pucch(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.ul_power_control_config_common.p0_NominalPUCCH;
 }
 
-int32_t flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+int32_t flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_update;
 }
 
-int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
-{
+int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   RC.eNB[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_update = 0;
   return 0;
 }
@@ -545,228 +538,242 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
  * Get Messages for eNB Configuration Reply
  * ************************************
  */
-uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.threequarter_fs;
 }
 
 
-uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.pusch_HoppingOffset;
 }
 
-Protocol__FlexHoppingMode flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexHoppingMode flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return -1;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.hoppingMode) {
-  case interSubFrame:
-    return PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTER;
-  case intraAndInterSubFrame:
-    return PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTERINTRA;
+    case interSubFrame:
+      return PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTER;
+
+    case intraAndInterSubFrame:
+      return PROTOCOL__FLEX_HOPPING_MODE__FLHM_INTERINTRA;
   }
+
   return -1;
 }
 
-uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.n_SB;
 }
 
-Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == TRUE)
     return PROTOCOL__FLEX_QAM__FLEQ_MOD_64QAM;
   else
     return PROTOCOL__FLEX_QAM__FLEQ_MOD_16QAM;
 }
 
-Protocol__FlexPhichDuration flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexPhichDuration flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return -1;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.phich_config_common.phich_duration) {
-  case normal:
-    return PROTOCOL__FLEX_PHICH_DURATION__FLPD_NORMAL;
-  case extended:
-    return PROTOCOL__FLEX_PHICH_DURATION__FLPD_EXTENDED;
+    case normal:
+      return PROTOCOL__FLEX_PHICH_DURATION__FLPD_NORMAL;
+
+    case extended:
+      return PROTOCOL__FLEX_PHICH_DURATION__FLPD_EXTENDED;
   }
+
   return -1;
 }
 
-Protocol__FlexPhichResource flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexPhichResource flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return -1;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.phich_config_common.phich_resource) {
-  case oneSixth:
-    return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE_SIXTH;
-  case half:
-    return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_HALF;
-  case one:
-    return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE;
-  case two:
-    return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_TWO;
+    case oneSixth:
+      return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE_SIXTH;
+
+    case half:
+      return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_HALF;
+
+    case one:
+      return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_ONE;
+
+    case two:
+      return PROTOCOL__FLEX_PHICH_RESOURCE__FLPR_TWO;
   }
+
   return -1;
 }
 
-uint16_t flexran_get_n1pucch_an(mid_t mod_id, uint8_t cc_id)
-{
+uint16_t flexran_get_n1pucch_an(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pucch_config_common.n1PUCCH_AN;
 }
 
-uint8_t flexran_get_nRB_CQI(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_nRB_CQI(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pucch_config_common.nRB_CQI;
 }
 
-uint8_t flexran_get_deltaPUCCH_Shift(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_deltaPUCCH_Shift(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pucch_config_common.deltaPUCCH_Shift;
 }
 
-uint8_t flexran_get_prach_ConfigIndex(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_prach_ConfigIndex(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
 }
 
-uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset;
 }
 
-uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.maxHARQ_Msg3Tx;
 }
 
-Protocol__FlexUlCyclicPrefixLength flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexUlCyclicPrefixLength flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return -1;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.Ncp_UL) {
-  case EXTENDED:
-    return PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_EXTENDED;
-  case NORMAL:
-    return PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_NORMAL;
+    case EXTENDED:
+      return PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_EXTENDED;
+
+    case NORMAL:
+      return PROTOCOL__FLEX_UL_CYCLIC_PREFIX_LENGTH__FLUCPL_NORMAL;
   }
+
   return -1;
 }
 
-Protocol__FlexDlCyclicPrefixLength flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexDlCyclicPrefixLength flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return -1;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.Ncp) {
-  case EXTENDED:
-    return PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_EXTENDED;
-  case NORMAL:
-    return PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_NORMAL;
+    case EXTENDED:
+      return PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_EXTENDED;
+
+    case NORMAL:
+      return PROTOCOL__FLEX_DL_CYCLIC_PREFIX_LENGTH__FLDCPL_NORMAL;
   }
+
   return -1;
 }
 
-uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id)
-{
+uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.Nid_cell;
 }
 
-uint8_t flexran_get_srs_BandwidthConfig(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_srs_BandwidthConfig(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig;
 }
 
-uint8_t flexran_get_srs_SubframeConfig(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_srs_SubframeConfig(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig;
 }
 
-uint8_t flexran_get_srs_MaxUpPts(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_srs_MaxUpPts(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_MaxUpPts;
 }
 
-uint8_t flexran_get_N_RB_DL(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_N_RB_DL(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.N_RB_DL;
 }
 
-uint8_t flexran_get_N_RB_UL(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_N_RB_UL(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.N_RB_UL;
 }
 
-uint8_t flexran_get_N_RBG(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_N_RBG(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.N_RBG;
 }
 
-uint8_t flexran_get_subframe_assignment(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_subframe_assignment(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.tdd_config;
 }
 
-uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.tdd_config_S;
 }
 
-long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id)
-{
+long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].rach_raResponseWindowSize;
 }
 
-long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id)
-{
+long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].rach_macContentionResolutionTimer;
 }
 
-Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id)
-{
+Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   switch (RC.eNB[mod_id][cc_id]->frame_parms.frame_type) {
-  case TDD:
-    return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD;
-  case FDD:
-    return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_FDD;
-  default:
-    return -1;
+    case TDD:
+      return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD;
+
+    case FDD:
+      return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_FDD;
+
+    default:
+      return -1;
   }
 }
 
-long flexran_get_si_window_length(mid_t mod_id, uint8_t cc_id)
-{
+long flexran_get_si_window_length(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id) || !RC.rrc[mod_id]->carrier[cc_id].sib1) return 0;
+
   return RC.rrc[mod_id]->carrier[cc_id].sib1->si_WindowLength;
 }
 
-uint8_t flexran_get_sib1_length(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_sib1_length(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->carrier[cc_id].sizeof_SIB1;
 }
 
-uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->pdcch_vars[0].num_pdcch_symbols;
 }
 
@@ -777,120 +784,148 @@ uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id)
  * Get Messages for UE Configuration Reply
  * ************************************
  */
-int flexran_get_rrc_num_ues(mid_t mod_id)
-{
+int flexran_get_rrc_num_ues(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->Nb_ue;
 }
 
-rnti_t flexran_get_rrc_rnti_nth_ue(mid_t mod_id, int index)
-{
+rnti_t flexran_get_rrc_rnti_nth_ue(mid_t mod_id, int index) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = NULL;
+
+  struct rrc_eNB_ue_context_s *ue_context_p = NULL;
   RB_FOREACH(ue_context_p, rrc_ue_tree_s, &RC.rrc[mod_id]->rrc_ue_head) {
     if (index == 0) return ue_context_p->ue_context.rnti;
+
     --index;
   }
   return 0;
 }
 
-int flexran_get_rrc_rnti_list(mid_t mod_id, rnti_t *list, int max_list)
-{
+int flexran_get_rrc_rnti_list(mid_t mod_id, rnti_t *list, int max_list) {
   if (!rrc_is_present(mod_id)) return 0;
+
   int n = 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = NULL;
+  struct rrc_eNB_ue_context_s *ue_context_p = NULL;
   RB_FOREACH(ue_context_p, rrc_ue_tree_s, &RC.rrc[mod_id]->rrc_ue_head) {
     if (n >= max_list) break;
+
     list[n] = ue_context_p->ue_context.rnti;
     ++n;
   }
   return n;
 }
 
-LTE_TimeAlignmentTimer_t  flexran_get_time_alignment_timer(mid_t mod_id, rnti_t rnti)
-{
+LTE_TimeAlignmentTimer_t  flexran_get_time_alignment_timer(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig) return -1;
+
   return ue_context_p->ue_context.mac_MainConfig->timeAlignmentTimerDedicated;
 }
 
-Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, rnti_t rnti)
-{
+Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measGapConfig) return -1;
+
   if (ue_context_p->ue_context.measGapConfig->present != LTE_MeasGapConfig_PR_setup) return -1;
+
   switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
-  case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
-    return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP1;
-  case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
-    return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP2;
-  default:
-    return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF;
+    case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
+      return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP1;
+
+    case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
+      return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP2;
+
+    default:
+      return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF;
   }
 }
 
 
-long flexran_get_meas_gap_config_offset(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_meas_gap_config_offset(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measGapConfig) return -1;
+
   if (ue_context_p->ue_context.measGapConfig->present != LTE_MeasGapConfig_PR_setup) return -1;
+
   switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
-  case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
-    return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0;
-  case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
-    return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp1;
-  default:
-    return -1;
+    case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
+      return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0;
+
+    case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
+      return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp1;
+
+    default:
+      return -1;
   }
 }
 
-uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti)
-{
+uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return RRC_INACTIVE;
+
   return ue_context_p->ue_context.Status;
 }
 
-uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id)
-{
+uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateDL;
 }
 
-uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id)
-{
+uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateUL;
 }
 
-int flexran_get_half_duplex(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_half_duplex(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability) return -1;
+
   LTE_SupportedBandListEUTRA_t *bands = &ue_context_p->ue_context.UE_Capability->rf_Parameters.supportedBandListEUTRA;
+
   for (int i = 0; i < bands->list.count; i++) {
     if (bands->list.array[i]->halfDuplex > 0) return 1;
   }
+
   return 0;
 }
 
-int flexran_get_intra_sf_hopping(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_intra_sf_hopping(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability->featureGroupIndicators) return -1;
+
   /* According to TS 36.331 Annex B.1, Intra SF Hopping is bit 1 (leftmost bit)
    * in this bitmap, i.e. the eighth bit (from right) in the first bye (from
    * left) */
@@ -899,13 +934,17 @@ int flexran_get_intra_sf_hopping(mid_t mod_id, rnti_t rnti)
   return (buf >> 7) & 1;
 }
 
-int flexran_get_type2_sb_1(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_type2_sb_1(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability->featureGroupIndicators) return -1;
+
   /* According to TS 36.331 Annex B.1, Predefined intra- and inter-sf or
    * predfined inter-sf frequency hopping for PUSCH with N_sb>1 is bit 21 (bit
    * 1 is leftmost bit) in this bitmap, i.e. the fourth bit (from right) in the
@@ -915,22 +954,29 @@ int flexran_get_type2_sb_1(mid_t mod_id, rnti_t rnti)
   return (buf >> 3) & 1;
 }
 
-long flexran_get_ue_category(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_ue_category(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability) return -1;
+
   return ue_context_p->ue_context.UE_Capability->ue_Category;
 }
 
-int flexran_get_res_alloc_type1(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_res_alloc_type1(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability) return -1;
+
   if (!ue_context_p->ue_context.UE_Capability->featureGroupIndicators) return -1;
+
   /* According to TS 36.331 Annex B.1, Resource allocation type 1 for PDSCH is
    * bit 2 (bit 1 is leftmost bit) in this bitmap, i.e. the seventh bit (from
    * right) in the first byte (from left) */
@@ -939,168 +985,233 @@ int flexran_get_res_alloc_type1(mid_t mod_id, rnti_t rnti)
   return (buf >> 6) & 1;
 }
 
-long flexran_get_ue_transmission_mode(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_ue_transmission_mode(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->antennaInfo) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode;
 }
 
-BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, rnti_t rnti)
-{
+BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config) return -1;
+
   return ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->ttiBundling;
 }
 
-long flexran_get_maxHARQ_TX(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_maxHARQ_TX(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config) return -1;
+
   return *(ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->maxHARQ_Tx);
 }
 
-long flexran_get_beta_offset_ack_index(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_beta_offset_ack_index(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_ACK_Index;
 }
 
-long flexran_get_beta_offset_ri_index(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_beta_offset_ri_index(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_RI_Index;
 }
 
-long flexran_get_beta_offset_cqi_index(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_beta_offset_cqi_index(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_CQI_Index;
 }
 
-BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, rnti_t rnti)
-{
+BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI;
 }
 
-BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, uint8_t cc_id)
-{
+BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id)) return -1;
+
   if (!RC.rrc[mod_id]->carrier[cc_id].sib2) return -1;
+
   return RC.rrc[mod_id]->carrier[cc_id].sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission;
 }
 
-Protocol__FlexAperiodicCqiReportMode flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id, rnti_t rnti)
-{
+Protocol__FlexAperiodicCqiReportMode flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig) return -1;
+
   switch (*ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportModeAperiodic) {
-  case LTE_CQI_ReportModeAperiodic_rm12:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM12;
-  case LTE_CQI_ReportModeAperiodic_rm20:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM20;
-  case LTE_CQI_ReportModeAperiodic_rm22:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM22;
-  case LTE_CQI_ReportModeAperiodic_rm30:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM30;
-  case LTE_CQI_ReportModeAperiodic_rm31:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM31;
-  case LTE_CQI_ReportModeAperiodic_rm32_v1250:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM32_v1250;
-  case LTE_CQI_ReportModeAperiodic_rm10_v1310:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM10_v1310;
-  case LTE_CQI_ReportModeAperiodic_rm11_v1310:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM11_v1310;
-  default:
-    return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
+    case LTE_CQI_ReportModeAperiodic_rm12:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM12;
+
+    case LTE_CQI_ReportModeAperiodic_rm20:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM20;
+
+    case LTE_CQI_ReportModeAperiodic_rm22:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM22;
+
+    case LTE_CQI_ReportModeAperiodic_rm30:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM30;
+
+    case LTE_CQI_ReportModeAperiodic_rm31:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM31;
+
+    case LTE_CQI_ReportModeAperiodic_rm32_v1250:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM32_v1250;
+
+    case LTE_CQI_ReportModeAperiodic_rm10_v1310:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM10_v1310;
+
+    case LTE_CQI_ReportModeAperiodic_rm11_v1310:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_RM11_v1310;
+
+    default:
+      return PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE;
   }
 }
 
-long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode) return -1;
+
   return *(ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode);
 }
 
-long flexran_get_ack_nack_repetition_factor(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_ack_nack_repetition_factor(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated) return -1;
+
   return ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.choice.setup.repetitionFactor;
 }
 
-long flexran_get_extended_bsr_size(mid_t mod_id, rnti_t rnti)
-{
+long flexran_get_extended_bsr_size(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig->ext2) return -1;
+
   if (!ue_context_p->ue_context.mac_MainConfig->ext2->mac_MainConfig_v1020) return -1;
+
   return *(ue_context_p->ue_context.mac_MainConfig->ext2->mac_MainConfig_v1020->extendedBSR_Sizes_r10);
 }
 
-int flexran_get_ue_transmission_antenna(mid_t mod_id, rnti_t rnti)
-{
+int flexran_get_ue_transmission_antenna(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
+
   if (!ue_context_p->ue_context.physicalConfigDedicated->antennaInfo) return -1;
+
   switch (ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.setup) {
-  case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop:
-    return 2;
-  case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop:
-    return 1;
-  default:
-    return 0;
+    case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop:
+      return 2;
+
+    case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop:
+      return 1;
+
+    default:
+      return 0;
   }
 }
 
-uint64_t flexran_get_ue_imsi(mid_t mod_id, rnti_t rnti)
-{
+uint64_t flexran_get_ue_imsi(mid_t mod_id, rnti_t rnti) {
   uint64_t imsi;
+
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   imsi  = ue_context_p->ue_context.imsi.digit15;
   imsi += ue_context_p->ue_context.imsi.digit14 * 10;              // pow(10, 1)
   imsi += ue_context_p->ue_context.imsi.digit13 * 100;             // pow(10, 2)
@@ -1119,69 +1230,70 @@ uint64_t flexran_get_ue_imsi(mid_t mod_id, rnti_t rnti)
   return imsi;
 }
 
-long flexran_get_lcg(mid_t mod_id, mid_t ue_id, mid_t lc_id)
-{
+long flexran_get_lcg(mid_t mod_id, mid_t ue_id, mid_t lc_id) {
   if (!mac_is_present(mod_id)) return 0;
+
   return RC.mac[mod_id]->UE_list.UE_template[UE_PCCID(mod_id, ue_id)][ue_id].lcgidmap[lc_id];
 }
 
 /* TODO Navid: needs to be revised */
-int flexran_get_direction(mid_t ue_id, mid_t lc_id)
-{
+int flexran_get_direction(mid_t ue_id, mid_t lc_id) {
   switch (lc_id) {
-  case DCCH:
-  case DCCH1:
-    return 2;
-  case DTCH:
-    return 1;
-  default:
-    return -1;
+    case DCCH:
+    case DCCH1:
+      return 2;
+
+    case DTCH:
+      return 1;
+
+    default:
+      return -1;
   }
 }
 
-uint8_t flexran_get_antenna_ports(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_get_antenna_ports(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.nb_antenna_ports_eNB;
 }
 
-uint32_t flexran_agent_get_operating_dl_freq(mid_t mod_id, uint8_t cc_id)
-{
+uint32_t flexran_agent_get_operating_dl_freq(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.dl_CarrierFreq / 1000000;
 }
 
-uint32_t flexran_agent_get_operating_ul_freq(mid_t mod_id, uint8_t cc_id)
-{
+uint32_t flexran_agent_get_operating_ul_freq(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.ul_CarrierFreq / 1000000;
 }
 
-uint8_t flexran_agent_get_operating_eutra_band(mid_t mod_id, uint8_t cc_id)
-{
+uint8_t flexran_agent_get_operating_eutra_band(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.eutra_band;
 }
 
-int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id)
-{
+int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
+
   return RC.eNB[mod_id][cc_id]->frame_parms.pdsch_config_common.referenceSignalPower;
 }
 
-long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id)
-{
+long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.radioresourceconfig[cc_id].pusch_p0_Nominal;
 }
 
-void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz)
-{
+void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz) {
   if (phy_is_present(mod_id, cc_id)) {
     RC.eNB[mod_id][cc_id]->frame_parms.dl_CarrierFreq = dl_freq_mhz * 1000000;
   } else {
     LOG_E(FLEXRAN_AGENT, "can not set dl_CarrierFreq to %d MHz in PHY: PHY is not present\n", dl_freq_mhz);
   }
+
   if (rrc_is_present(mod_id)) {
     RC.rrc[mod_id]->configuration.downlink_frequency[cc_id] = dl_freq_mhz * 1000000;
   } else {
@@ -1189,14 +1301,14 @@ void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t d
   }
 }
 
-void flexran_agent_set_operating_ul_freq(mid_t mod_id, uint8_t cc_id, int32_t ul_freq_mhz_offset)
-{
+void flexran_agent_set_operating_ul_freq(mid_t mod_id, uint8_t cc_id, int32_t ul_freq_mhz_offset) {
   if (phy_is_present(mod_id, cc_id)) {
     uint32_t new_ul_freq_mhz = flexran_agent_get_operating_dl_freq(mod_id, cc_id) + ul_freq_mhz_offset;
     RC.eNB[mod_id][cc_id]->frame_parms.ul_CarrierFreq = new_ul_freq_mhz * 1000000;
   } else {
     LOG_E(FLEXRAN_AGENT, "can not set ul_CarrierFreq using offset %d MHz in PHY: PHY is not present\n", ul_freq_mhz_offset);
   }
+
   if (rrc_is_present(mod_id)) {
     RC.rrc[mod_id]->configuration.uplink_frequency_offset[cc_id] = ul_freq_mhz_offset;
   } else {
@@ -1204,13 +1316,13 @@ void flexran_agent_set_operating_ul_freq(mid_t mod_id, uint8_t cc_id, int32_t ul
   }
 }
 
-void flexran_agent_set_operating_eutra_band(mid_t mod_id, uint8_t cc_id, uint8_t eutra_band)
-{
+void flexran_agent_set_operating_eutra_band(mid_t mod_id, uint8_t cc_id, uint8_t eutra_band) {
   if (phy_is_present(mod_id, cc_id)) {
     RC.eNB[mod_id][cc_id]->frame_parms.eutra_band = eutra_band;
   } else {
     LOG_E(FLEXRAN_AGENT, "can not set eutra_band to %d in PHY: PHY is not present\n", eutra_band);
   }
+
   if (rrc_is_present(mod_id)) {
     RC.rrc[mod_id]->configuration.eutra_band[cc_id] = eutra_band;
   } else {
@@ -1219,14 +1331,14 @@ void flexran_agent_set_operating_eutra_band(mid_t mod_id, uint8_t cc_id, uint8_t
 }
 
 /* Sets both DL/UL */
-void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t N_RB)
-{
+void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t N_RB) {
   if (phy_is_present(mod_id, cc_id)) {
     RC.eNB[mod_id][cc_id]->frame_parms.N_RB_DL = N_RB;
     RC.eNB[mod_id][cc_id]->frame_parms.N_RB_UL = N_RB;
   } else {
     LOG_E(FLEXRAN_AGENT, "can not set N_RB_DL and N_RB_UL to %d in PHY: PHY is not present\n", N_RB);
   }
+
   if (rrc_is_present(mod_id)) {
     RC.rrc[mod_id]->configuration.N_RB_DL[cc_id] = N_RB;
   } else {
@@ -1234,13 +1346,13 @@ void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t
   }
 }
 
-void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type)
-{
+void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type) {
   if (phy_is_present(mod_id, cc_id)) {
     RC.eNB[mod_id][cc_id]->frame_parms.frame_type = frame_type;
   } else {
     LOG_E(FLEXRAN_AGENT, "can not set frame_type to %d in PHY: PHY is not present\n", frame_type);
   }
+
   if (rrc_is_present(mod_id)) {
     RC.rrc[mod_id]->configuration.frame_type[cc_id] = frame_type;
   } else {
@@ -1250,9 +1362,9 @@ void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_fra
 
 /*********** PDCP  *************/
 
-uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti)
-{
+uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti) {
   if (rnti == NOT_A_RNTI) return 0;
+
   if (mod_id < 0 || mod_id >= RC.nb_inst)
     return 0;
 
@@ -1260,167 +1372,168 @@ uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti)
     if (pdcp_enb[mod_id].rnti[pdcp_uid] == rnti)
       return pdcp_uid;
   }
+
   return 0;
 }
 
 /*PDCP super frame counter flexRAN*/
-uint32_t flexran_get_pdcp_sfn(mid_t mod_id)
-{
+uint32_t flexran_get_pdcp_sfn(mid_t mod_id) {
   if (mod_id < 0 || mod_id >= RC.nb_inst)
     return 0;
+
   return pdcp_enb[mod_id].sfn;
 }
 
 /*PDCP super frame counter flexRAN*/
-void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window)
-{
+void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB)
     return;
+
   Pdcp_stats_tx_window_ms[mod_id][uid] = obs_window > 0 ? obs_window : 1000;
 }
 
 /*PDCP super frame counter flexRAN*/
-void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window)
-{
+void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB)
     return;
+
   Pdcp_stats_rx_window_ms[mod_id][uid] = obs_window > 0 ? obs_window : 1000;
 }
 
 /*PDCP num tx pdu status flexRAN*/
-uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx[mod_id][uid][lcid];
 }
 
 /*PDCP num tx bytes status flexRAN*/
-uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_bytes[mod_id][uid][lcid];
 }
 
 /*PDCP number of transmit packet / second status flexRAN*/
-uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_w[mod_id][uid][lcid];
 }
 
 /*PDCP throughput (bit/s) status flexRAN*/
-uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_bytes_w[mod_id][uid][lcid];
 }
 
 /*PDCP tx sequence number flexRAN*/
-uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_sn[mod_id][uid][lcid];
 }
 
 /*PDCP tx aggregated packet arrival  flexRAN*/
-uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_aiat[mod_id][uid][lcid];
 }
 
 /*PDCP tx aggregated packet arrival  flexRAN*/
-uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_tx_aiat_w[mod_id][uid][lcid];
 }
 
 /*PDCP num rx pdu status flexRAN*/
-uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx[mod_id][uid][lcid];
 }
 
 /*PDCP num rx bytes status flexRAN*/
-uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_bytes[mod_id][uid][lcid];
 }
 
 /*PDCP number of received packet / second  flexRAN*/
-uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_w[mod_id][uid][lcid];
 }
 
 /*PDCP gootput (bit/s) status flexRAN*/
-uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_bytes_w[mod_id][uid][lcid];
 }
 
 /*PDCP rx sequence number flexRAN*/
-uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_sn[mod_id][uid][lcid];
 }
 
 /*PDCP rx aggregated packet arrival  flexRAN*/
-uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_aiat[mod_id][uid][lcid];
 }
 
 /*PDCP rx aggregated packet arrival  flexRAN*/
-uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_aiat_w[mod_id][uid][lcid];
 }
 
 /*PDCP num of received outoforder pdu status flexRAN*/
-uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid)
-{
+uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid) {
   if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
       || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
     return 0;
+
   return Pdcp_stats_rx_outoforder[mod_id][uid][lcid];
 }
 
@@ -1428,10 +1541,13 @@ uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid)
 /* RRC Wrappers */
 int flexran_call_rrc_reconfiguration (mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
+
   protocol_ctxt_t  ctxt;
   memset(&ctxt, 0, sizeof(ctxt));
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, ue_context_p->ue_context.rnti, flexran_get_current_frame(mod_id), flexran_get_current_subframe (mod_id), mod_id);
   flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt, ue_context_p, 0);
   return 0;
@@ -1439,10 +1555,13 @@ int flexran_call_rrc_reconfiguration (mid_t mod_id, rnti_t rnti) {
 
 int flexran_call_rrc_trigger_handover (mid_t mod_id, rnti_t rnti, int target_cell_id) {
   if (!rrc_is_present(mod_id)) return -1;
+
   protocol_ctxt_t  ctxt;
   memset(&ctxt, 0, sizeof(ctxt));
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, ue_context_p->ue_context.rnti, flexran_get_current_frame(mod_id), flexran_get_current_subframe (mod_id), mod_id);
   return flexran_rrc_eNB_trigger_handover(mod_id, &ctxt, ue_context_p, target_cell_id);
 }
@@ -1451,131 +1570,159 @@ int flexran_call_rrc_trigger_handover (mid_t mod_id, rnti_t rnti, int target_cel
 
 LTE_MeasId_t  flexran_get_rrc_pcell_measid(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
+
   return ue_context_p->ue_context.measResults->measId;
 }
 
 float flexran_get_rrc_pcell_rsrp(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    return RSRP_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrpResult];
-  #else
-    return RSRP_meas_mapping[ue_context_p->ue_context.measResults->measResultServCell.rsrpResult];
-  #endif
+
+  return RSRP_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrpResult];
 }
 
 float flexran_get_rrc_pcell_rsrq(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    return RSRQ_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrqResult];
-  #else
-    return RSRQ_meas_mapping[ue_context_p->ue_context.measResults->measResultServCell.rsrqResult];
-  #endif
+
+  return RSRQ_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrqResult];
 }
 
 /*Number of neighbouring cells for specific UE*/
 int flexran_get_rrc_num_ncell(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   if (!ue_context_p->ue_context.measResults) return 0;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells) return 0;
+
   //if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return 0;
   return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.count;
 }
 
 long flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, rnti_t rnti, long cell_id) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
+
   //if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
   if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
+
   return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->physCellId;
 }
 
 int flexran_get_rrc_neigh_cgi(mid_t mod_id, rnti_t rnti, long cell_id) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   if (!ue_context_p->ue_context.measResults) return 0;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells) return 0;
+
   //if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return 0;
   if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return 0;
+
   return (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info)?0:1;
 }
 
 uint32_t flexran_get_rrc_neigh_cgi_cell_id(mid_t mod_id, rnti_t rnti, long cell_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   uint8_t *cId = ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.cellIdentity.buf;
   return ((cId[0] << 20) + (cId[1] << 12) + (cId[2] << 4) + (cId[3] >> 4));
 }
 
 uint32_t flexran_get_rrc_neigh_cgi_tac(mid_t mod_id, rnti_t rnti, long cell_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   uint8_t *tac = ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->trackingAreaCode.buf;
   return (tac[0] << 8) + (tac[1]);
 }
 
 int flexran_get_rrc_neigh_cgi_num_mnc(mid_t mod_id, rnti_t rnti, long cell_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mnc.list.count;
 }
 
 int flexran_get_rrc_neigh_cgi_num_mcc(mid_t mod_id, rnti_t rnti, long cell_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mcc->list.count;
 }
 
 uint32_t flexran_get_rrc_neigh_cgi_mnc(mid_t mod_id, rnti_t rnti, long cell_id, int mnc_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   int num_mnc = ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mnc.list.count;
   return *(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mnc.list.array[mnc_id]) *
-               ((uint32_t) pow(10, num_mnc - mnc_id - 1));
+         ((uint32_t) pow(10, num_mnc - mnc_id - 1));
 }
 
 uint32_t flexran_get_rrc_neigh_cgi_mcc(mid_t mod_id, rnti_t rnti, long cell_id, int mcc_id) {
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
   int num_mcc = ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mcc->list.count;
   return *(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->cgi_Info->cellGlobalId.plmn_Identity.mcc->list.array[mcc_id]) *
-               ((uint32_t) pow(10, num_mcc - mcc_id - 1));
+         ((uint32_t) pow(10, num_mcc - mcc_id - 1));
 }
 
 float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
+
   //if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
   if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult) return -1;
+
   return RSRP_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult)];
 }
 
 float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measResults) return -1;
+
   if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
+
   //if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
   if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult) return -1;
+
   return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)];
 }
 
@@ -1583,151 +1730,367 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id) {
 
 long flexran_get_rrc_ofp(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   return ue_context_p->ue_context.measurement_info->offsetFreq;
 }
 
 long flexran_get_rrc_ofn(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   return ue_context_p->ue_context.measurement_info->offsetFreq;
 }
 
 long flexran_get_rrc_ocp(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   switch (ue_context_p->ue_context.measurement_info->cellIndividualOffset[0]) {
-  case LTE_Q_OffsetRange_dB_24: return -24;
-  case LTE_Q_OffsetRange_dB_22: return -22;
-  case LTE_Q_OffsetRange_dB_20: return -20;
-  case LTE_Q_OffsetRange_dB_18: return -18;
-  case LTE_Q_OffsetRange_dB_16: return -16;
-  case LTE_Q_OffsetRange_dB_14: return -14;
-  case LTE_Q_OffsetRange_dB_12: return -12;
-  case LTE_Q_OffsetRange_dB_10: return -10;
-  case LTE_Q_OffsetRange_dB_8:  return -8;
-  case LTE_Q_OffsetRange_dB_6:  return -6;
-  case LTE_Q_OffsetRange_dB_5:  return -5;
-  case LTE_Q_OffsetRange_dB_4:  return -4;
-  case LTE_Q_OffsetRange_dB_3:  return -3;
-  case LTE_Q_OffsetRange_dB_2:  return -2;
-  case LTE_Q_OffsetRange_dB_1:  return -1;
-  case LTE_Q_OffsetRange_dB0:   return  0;
-  case LTE_Q_OffsetRange_dB1:   return  1;
-  case LTE_Q_OffsetRange_dB2:   return  2;
-  case LTE_Q_OffsetRange_dB3:   return  3;
-  case LTE_Q_OffsetRange_dB4:   return  4;
-  case LTE_Q_OffsetRange_dB5:   return  5;
-  case LTE_Q_OffsetRange_dB6:   return  6;
-  case LTE_Q_OffsetRange_dB8:   return  8;
-  case LTE_Q_OffsetRange_dB10:  return 10;
-  case LTE_Q_OffsetRange_dB12:  return 12;
-  case LTE_Q_OffsetRange_dB14:  return 14;
-  case LTE_Q_OffsetRange_dB16:  return 16;
-  case LTE_Q_OffsetRange_dB18:  return 18;
-  case LTE_Q_OffsetRange_dB20:  return 20;
-  case LTE_Q_OffsetRange_dB22:  return 22;
-  case LTE_Q_OffsetRange_dB24:  return 24;
-  default:                      return -99;
+    case LTE_Q_OffsetRange_dB_24:
+      return -24;
+
+    case LTE_Q_OffsetRange_dB_22:
+      return -22;
+
+    case LTE_Q_OffsetRange_dB_20:
+      return -20;
+
+    case LTE_Q_OffsetRange_dB_18:
+      return -18;
+
+    case LTE_Q_OffsetRange_dB_16:
+      return -16;
+
+    case LTE_Q_OffsetRange_dB_14:
+      return -14;
+
+    case LTE_Q_OffsetRange_dB_12:
+      return -12;
+
+    case LTE_Q_OffsetRange_dB_10:
+      return -10;
+
+    case LTE_Q_OffsetRange_dB_8:
+      return -8;
+
+    case LTE_Q_OffsetRange_dB_6:
+      return -6;
+
+    case LTE_Q_OffsetRange_dB_5:
+      return -5;
+
+    case LTE_Q_OffsetRange_dB_4:
+      return -4;
+
+    case LTE_Q_OffsetRange_dB_3:
+      return -3;
+
+    case LTE_Q_OffsetRange_dB_2:
+      return -2;
+
+    case LTE_Q_OffsetRange_dB_1:
+      return -1;
+
+    case LTE_Q_OffsetRange_dB0:
+      return  0;
+
+    case LTE_Q_OffsetRange_dB1:
+      return  1;
+
+    case LTE_Q_OffsetRange_dB2:
+      return  2;
+
+    case LTE_Q_OffsetRange_dB3:
+      return  3;
+
+    case LTE_Q_OffsetRange_dB4:
+      return  4;
+
+    case LTE_Q_OffsetRange_dB5:
+      return  5;
+
+    case LTE_Q_OffsetRange_dB6:
+      return  6;
+
+    case LTE_Q_OffsetRange_dB8:
+      return  8;
+
+    case LTE_Q_OffsetRange_dB10:
+      return 10;
+
+    case LTE_Q_OffsetRange_dB12:
+      return 12;
+
+    case LTE_Q_OffsetRange_dB14:
+      return 14;
+
+    case LTE_Q_OffsetRange_dB16:
+      return 16;
+
+    case LTE_Q_OffsetRange_dB18:
+      return 18;
+
+    case LTE_Q_OffsetRange_dB20:
+      return 20;
+
+    case LTE_Q_OffsetRange_dB22:
+      return 22;
+
+    case LTE_Q_OffsetRange_dB24:
+      return 24;
+
+    default:
+      return -99;
   }
 }
 
 long flexran_get_rrc_ocn(mid_t mod_id, rnti_t rnti, long cell_id) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   switch (ue_context_p->ue_context.measurement_info->cellIndividualOffset[cell_id+1]) {
-  case LTE_Q_OffsetRange_dB_24: return -24;
-  case LTE_Q_OffsetRange_dB_22: return -22;
-  case LTE_Q_OffsetRange_dB_20: return -20;
-  case LTE_Q_OffsetRange_dB_18: return -18;
-  case LTE_Q_OffsetRange_dB_16: return -16;
-  case LTE_Q_OffsetRange_dB_14: return -14;
-  case LTE_Q_OffsetRange_dB_12: return -12;
-  case LTE_Q_OffsetRange_dB_10: return -10;
-  case LTE_Q_OffsetRange_dB_8:  return -8;
-  case LTE_Q_OffsetRange_dB_6:  return -6;
-  case LTE_Q_OffsetRange_dB_5:  return -5;
-  case LTE_Q_OffsetRange_dB_4:  return -4;
-  case LTE_Q_OffsetRange_dB_3:  return -3;
-  case LTE_Q_OffsetRange_dB_2:  return -2;
-  case LTE_Q_OffsetRange_dB_1:  return -1;
-  case LTE_Q_OffsetRange_dB0:   return  0;
-  case LTE_Q_OffsetRange_dB1:   return  1;
-  case LTE_Q_OffsetRange_dB2:   return  2;
-  case LTE_Q_OffsetRange_dB3:   return  3;
-  case LTE_Q_OffsetRange_dB4:   return  4;
-  case LTE_Q_OffsetRange_dB5:   return  5;
-  case LTE_Q_OffsetRange_dB6:   return  6;
-  case LTE_Q_OffsetRange_dB8:   return  8;
-  case LTE_Q_OffsetRange_dB10:  return 10;
-  case LTE_Q_OffsetRange_dB12:  return 12;
-  case LTE_Q_OffsetRange_dB14:  return 14;
-  case LTE_Q_OffsetRange_dB16:  return 16;
-  case LTE_Q_OffsetRange_dB18:  return 18;
-  case LTE_Q_OffsetRange_dB20:  return 20;
-  case LTE_Q_OffsetRange_dB22:  return 22;
-  case LTE_Q_OffsetRange_dB24:  return 24;
-  default:                      return -99;
+    case LTE_Q_OffsetRange_dB_24:
+      return -24;
+
+    case LTE_Q_OffsetRange_dB_22:
+      return -22;
+
+    case LTE_Q_OffsetRange_dB_20:
+      return -20;
+
+    case LTE_Q_OffsetRange_dB_18:
+      return -18;
+
+    case LTE_Q_OffsetRange_dB_16:
+      return -16;
+
+    case LTE_Q_OffsetRange_dB_14:
+      return -14;
+
+    case LTE_Q_OffsetRange_dB_12:
+      return -12;
+
+    case LTE_Q_OffsetRange_dB_10:
+      return -10;
+
+    case LTE_Q_OffsetRange_dB_8:
+      return -8;
+
+    case LTE_Q_OffsetRange_dB_6:
+      return -6;
+
+    case LTE_Q_OffsetRange_dB_5:
+      return -5;
+
+    case LTE_Q_OffsetRange_dB_4:
+      return -4;
+
+    case LTE_Q_OffsetRange_dB_3:
+      return -3;
+
+    case LTE_Q_OffsetRange_dB_2:
+      return -2;
+
+    case LTE_Q_OffsetRange_dB_1:
+      return -1;
+
+    case LTE_Q_OffsetRange_dB0:
+      return  0;
+
+    case LTE_Q_OffsetRange_dB1:
+      return  1;
+
+    case LTE_Q_OffsetRange_dB2:
+      return  2;
+
+    case LTE_Q_OffsetRange_dB3:
+      return  3;
+
+    case LTE_Q_OffsetRange_dB4:
+      return  4;
+
+    case LTE_Q_OffsetRange_dB5:
+      return  5;
+
+    case LTE_Q_OffsetRange_dB6:
+      return  6;
+
+    case LTE_Q_OffsetRange_dB8:
+      return  8;
+
+    case LTE_Q_OffsetRange_dB10:
+      return 10;
+
+    case LTE_Q_OffsetRange_dB12:
+      return 12;
+
+    case LTE_Q_OffsetRange_dB14:
+      return 14;
+
+    case LTE_Q_OffsetRange_dB16:
+      return 16;
+
+    case LTE_Q_OffsetRange_dB18:
+      return 18;
+
+    case LTE_Q_OffsetRange_dB20:
+      return 20;
+
+    case LTE_Q_OffsetRange_dB22:
+      return 22;
+
+    case LTE_Q_OffsetRange_dB24:
+      return 24;
+
+    default:
+      return -99;
   }
 }
 
 long flexran_get_filter_coeff_rsrp(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   switch (ue_context_p->ue_context.measurement_info->filterCoefficientRSRP) {
-  case LTE_FilterCoefficient_fc0:    return 0;
-  case LTE_FilterCoefficient_fc1:    return 1;
-  case LTE_FilterCoefficient_fc2:    return 2;
-  case LTE_FilterCoefficient_fc3:    return 3;
-  case LTE_FilterCoefficient_fc4:    return 4;
-  case LTE_FilterCoefficient_fc5:    return 5;
-  case LTE_FilterCoefficient_fc6:    return 6;
-  case LTE_FilterCoefficient_fc7:    return 7;
-  case LTE_FilterCoefficient_fc8:    return 8;
-  case LTE_FilterCoefficient_fc9:    return 9;
-  case LTE_FilterCoefficient_fc11:   return 11;
-  case LTE_FilterCoefficient_fc13:   return 13;
-  case LTE_FilterCoefficient_fc15:   return 15;
-  case LTE_FilterCoefficient_fc17:   return 17;
-  case LTE_FilterCoefficient_fc19:   return 19;
-  case LTE_FilterCoefficient_spare1: return -1; /* spare means no coefficient */
-  default:                           return -1;
+    case LTE_FilterCoefficient_fc0:
+      return 0;
+
+    case LTE_FilterCoefficient_fc1:
+      return 1;
+
+    case LTE_FilterCoefficient_fc2:
+      return 2;
+
+    case LTE_FilterCoefficient_fc3:
+      return 3;
+
+    case LTE_FilterCoefficient_fc4:
+      return 4;
+
+    case LTE_FilterCoefficient_fc5:
+      return 5;
+
+    case LTE_FilterCoefficient_fc6:
+      return 6;
+
+    case LTE_FilterCoefficient_fc7:
+      return 7;
+
+    case LTE_FilterCoefficient_fc8:
+      return 8;
+
+    case LTE_FilterCoefficient_fc9:
+      return 9;
+
+    case LTE_FilterCoefficient_fc11:
+      return 11;
+
+    case LTE_FilterCoefficient_fc13:
+      return 13;
+
+    case LTE_FilterCoefficient_fc15:
+      return 15;
+
+    case LTE_FilterCoefficient_fc17:
+      return 17;
+
+    case LTE_FilterCoefficient_fc19:
+      return 19;
+
+    case LTE_FilterCoefficient_spare1:
+      return -1; /* spare means no coefficient */
+
+    default:
+      return -1;
   }
 }
 
 long flexran_get_filter_coeff_rsrq(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   switch (ue_context_p->ue_context.measurement_info->filterCoefficientRSRQ) {
-  case LTE_FilterCoefficient_fc0:    return 0;
-  case LTE_FilterCoefficient_fc1:    return 1;
-  case LTE_FilterCoefficient_fc2:    return 2;
-  case LTE_FilterCoefficient_fc3:    return 3;
-  case LTE_FilterCoefficient_fc4:    return 4;
-  case LTE_FilterCoefficient_fc5:    return 5;
-  case LTE_FilterCoefficient_fc6:    return 6;
-  case LTE_FilterCoefficient_fc7:    return 7;
-  case LTE_FilterCoefficient_fc8:    return 8;
-  case LTE_FilterCoefficient_fc9:    return 9;
-  case LTE_FilterCoefficient_fc11:   return 11;
-  case LTE_FilterCoefficient_fc13:   return 13;
-  case LTE_FilterCoefficient_fc15:   return 15;
-  case LTE_FilterCoefficient_fc17:   return 17;
-  case LTE_FilterCoefficient_fc19:   return 19;
-  case LTE_FilterCoefficient_spare1: return -1; /* spare means no coefficient */
-  default:                           return -1;
+    case LTE_FilterCoefficient_fc0:
+      return 0;
+
+    case LTE_FilterCoefficient_fc1:
+      return 1;
+
+    case LTE_FilterCoefficient_fc2:
+      return 2;
+
+    case LTE_FilterCoefficient_fc3:
+      return 3;
+
+    case LTE_FilterCoefficient_fc4:
+      return 4;
+
+    case LTE_FilterCoefficient_fc5:
+      return 5;
+
+    case LTE_FilterCoefficient_fc6:
+      return 6;
+
+    case LTE_FilterCoefficient_fc7:
+      return 7;
+
+    case LTE_FilterCoefficient_fc8:
+      return 8;
+
+    case LTE_FilterCoefficient_fc9:
+      return 9;
+
+    case LTE_FilterCoefficient_fc11:
+      return 11;
+
+    case LTE_FilterCoefficient_fc13:
+      return 13;
+
+    case LTE_FilterCoefficient_fc15:
+      return 15;
+
+    case LTE_FilterCoefficient_fc17:
+      return 17;
+
+    case LTE_FilterCoefficient_fc19:
+      return 19;
+
+    case LTE_FilterCoefficient_spare1:
+      return -1; /* spare means no coefficient */
+
+    default:
+      return -1;
   }
 }
 
@@ -1735,11 +2098,17 @@ long flexran_get_filter_coeff_rsrq(mid_t mod_id, rnti_t rnti) {
 
 long flexran_get_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->per_event) return -1;
+
   return ue_context_p->ue_context.measurement_info->events->per_event->maxReportCells;
 }
 
@@ -1747,69 +2116,132 @@ long flexran_get_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
 
 long flexran_get_rrc_a3_event_hysteresis(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   return ue_context_p->ue_context.measurement_info->events->a3_event->hysteresis;
 }
 
 long flexran_get_rrc_a3_event_timeToTrigger(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   switch (ue_context_p->ue_context.measurement_info->events->a3_event->timeToTrigger) {
-  case LTE_TimeToTrigger_ms0:    return 0;
-  case LTE_TimeToTrigger_ms40:   return 40;
-  case LTE_TimeToTrigger_ms64:   return 64;
-  case LTE_TimeToTrigger_ms80:   return 80;
-  case LTE_TimeToTrigger_ms100:  return 100;
-  case LTE_TimeToTrigger_ms128:  return 128;
-  case LTE_TimeToTrigger_ms160:  return 160;
-  case LTE_TimeToTrigger_ms256:  return 256;
-  case LTE_TimeToTrigger_ms320:  return 320;
-  case LTE_TimeToTrigger_ms480:  return 480;
-  case LTE_TimeToTrigger_ms512:  return 512;
-  case LTE_TimeToTrigger_ms640:  return 640;
-  case LTE_TimeToTrigger_ms1024: return 1024;
-  case LTE_TimeToTrigger_ms1280: return 1280;
-  case LTE_TimeToTrigger_ms2560: return 2560;
-  case LTE_TimeToTrigger_ms5120: return 5120;
-  default:                       return -1;
-  }
-}
+    case LTE_TimeToTrigger_ms0:
+      return 0;
 
-long flexran_get_rrc_a3_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
-  if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
-  if (!ue_context_p) return -1;
-  if (!ue_context_p->ue_context.measurement_info) return -1;
-  if (!ue_context_p->ue_context.measurement_info->events) return -1;
-  if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
-  return ue_context_p->ue_context.measurement_info->events->a3_event->maxReportCells;
-}
+    case LTE_TimeToTrigger_ms40:
+      return 40;
 
-long flexran_get_rrc_a3_event_a3_offset(mid_t mod_id, rnti_t rnti) {
+    case LTE_TimeToTrigger_ms64:
+      return 64;
+
+    case LTE_TimeToTrigger_ms80:
+      return 80;
+
+    case LTE_TimeToTrigger_ms100:
+      return 100;
+
+    case LTE_TimeToTrigger_ms128:
+      return 128;
+
+    case LTE_TimeToTrigger_ms160:
+      return 160;
+
+    case LTE_TimeToTrigger_ms256:
+      return 256;
+
+    case LTE_TimeToTrigger_ms320:
+      return 320;
+
+    case LTE_TimeToTrigger_ms480:
+      return 480;
+
+    case LTE_TimeToTrigger_ms512:
+      return 512;
+
+    case LTE_TimeToTrigger_ms640:
+      return 640;
+
+    case LTE_TimeToTrigger_ms1024:
+      return 1024;
+
+    case LTE_TimeToTrigger_ms1280:
+      return 1280;
+
+    case LTE_TimeToTrigger_ms2560:
+      return 2560;
+
+    case LTE_TimeToTrigger_ms5120:
+      return 5120;
+
+    default:
+      return -1;
+  }
+}
+
+long flexran_get_rrc_a3_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
+  return ue_context_p->ue_context.measurement_info->events->a3_event->maxReportCells;
+}
+
+long flexran_get_rrc_a3_event_a3_offset(mid_t mod_id, rnti_t rnti) {
+  if (!rrc_is_present(mod_id)) return -1;
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  if (!ue_context_p) return -1;
+
+  if (!ue_context_p->ue_context.measurement_info) return -1;
+
+  if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
+  if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   return ue_context_p->ue_context.measurement_info->events->a3_event->a3_offset;
 }
 
 int flexran_get_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   return ue_context_p->ue_context.measurement_info->events->a3_event->reportOnLeave;
 }
 
@@ -1819,163 +2251,483 @@ int flexran_get_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti) {
 
 int flexran_set_rrc_ofp(mid_t mod_id, rnti_t rnti, long offsetFreq) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!((offsetFreq >= -15) && (offsetFreq <= 15))) return -1;
+
   ue_context_p->ue_context.measurement_info->offsetFreq = offsetFreq;
   return 0;
 }
 
 int flexran_set_rrc_ofn(mid_t mod_id, rnti_t rnti, long offsetFreq) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!((offsetFreq >= -15) && (offsetFreq <= 15))) return -1;
+
   ue_context_p->ue_context.measurement_info->offsetFreq = offsetFreq;
   return 0;
 }
 
 int flexran_set_rrc_ocp(mid_t mod_id, rnti_t rnti, long cellIndividualOffset) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   LTE_Q_OffsetRange_t *cio = &ue_context_p->ue_context.measurement_info->cellIndividualOffset[0];
+
   switch (cellIndividualOffset) {
-  case -24: *cio = LTE_Q_OffsetRange_dB_24; break;
-  case -22: *cio = LTE_Q_OffsetRange_dB_22; break;
-  case -20: *cio = LTE_Q_OffsetRange_dB_20; break;
-  case -18: *cio = LTE_Q_OffsetRange_dB_18; break;
-  case -16: *cio = LTE_Q_OffsetRange_dB_16; break;
-  case -14: *cio = LTE_Q_OffsetRange_dB_14; break;
-  case -12: *cio = LTE_Q_OffsetRange_dB_12; break;
-  case -10: *cio = LTE_Q_OffsetRange_dB_10; break;
-  case -8:  *cio = LTE_Q_OffsetRange_dB_8;  break;
-  case -6:  *cio = LTE_Q_OffsetRange_dB_6;  break;
-  case -5:  *cio = LTE_Q_OffsetRange_dB_5;  break;
-  case -4:  *cio = LTE_Q_OffsetRange_dB_4;  break;
-  case -3:  *cio = LTE_Q_OffsetRange_dB_3;  break;
-  case -2:  *cio = LTE_Q_OffsetRange_dB_2;  break;
-  case -1:  *cio = LTE_Q_OffsetRange_dB_1;  break;
-  case 0:   *cio = LTE_Q_OffsetRange_dB0;   break;
-  case 1:   *cio = LTE_Q_OffsetRange_dB1;   break;
-  case 2:   *cio = LTE_Q_OffsetRange_dB2;   break;
-  case 3:   *cio = LTE_Q_OffsetRange_dB3;   break;
-  case 4:   *cio = LTE_Q_OffsetRange_dB4;   break;
-  case 5:   *cio = LTE_Q_OffsetRange_dB5;   break;
-  case 6:   *cio = LTE_Q_OffsetRange_dB6;   break;
-  case 8:   *cio = LTE_Q_OffsetRange_dB8;   break;
-  case 10:  *cio = LTE_Q_OffsetRange_dB10;  break;
-  case 12:  *cio = LTE_Q_OffsetRange_dB12;  break;
-  case 14:  *cio = LTE_Q_OffsetRange_dB14;  break;
-  case 16:  *cio = LTE_Q_OffsetRange_dB16;  break;
-  case 18:  *cio = LTE_Q_OffsetRange_dB18;  break;
-  case 20:  *cio = LTE_Q_OffsetRange_dB20;  break;
-  case 22:  *cio = LTE_Q_OffsetRange_dB22;  break;
-  case 24:  *cio = LTE_Q_OffsetRange_dB24;  break;
-  default:                                  return -1;
+    case -24:
+      *cio = LTE_Q_OffsetRange_dB_24;
+      break;
+
+    case -22:
+      *cio = LTE_Q_OffsetRange_dB_22;
+      break;
+
+    case -20:
+      *cio = LTE_Q_OffsetRange_dB_20;
+      break;
+
+    case -18:
+      *cio = LTE_Q_OffsetRange_dB_18;
+      break;
+
+    case -16:
+      *cio = LTE_Q_OffsetRange_dB_16;
+      break;
+
+    case -14:
+      *cio = LTE_Q_OffsetRange_dB_14;
+      break;
+
+    case -12:
+      *cio = LTE_Q_OffsetRange_dB_12;
+      break;
+
+    case -10:
+      *cio = LTE_Q_OffsetRange_dB_10;
+      break;
+
+    case -8:
+      *cio = LTE_Q_OffsetRange_dB_8;
+      break;
+
+    case -6:
+      *cio = LTE_Q_OffsetRange_dB_6;
+      break;
+
+    case -5:
+      *cio = LTE_Q_OffsetRange_dB_5;
+      break;
+
+    case -4:
+      *cio = LTE_Q_OffsetRange_dB_4;
+      break;
+
+    case -3:
+      *cio = LTE_Q_OffsetRange_dB_3;
+      break;
+
+    case -2:
+      *cio = LTE_Q_OffsetRange_dB_2;
+      break;
+
+    case -1:
+      *cio = LTE_Q_OffsetRange_dB_1;
+      break;
+
+    case 0:
+      *cio = LTE_Q_OffsetRange_dB0;
+      break;
+
+    case 1:
+      *cio = LTE_Q_OffsetRange_dB1;
+      break;
+
+    case 2:
+      *cio = LTE_Q_OffsetRange_dB2;
+      break;
+
+    case 3:
+      *cio = LTE_Q_OffsetRange_dB3;
+      break;
+
+    case 4:
+      *cio = LTE_Q_OffsetRange_dB4;
+      break;
+
+    case 5:
+      *cio = LTE_Q_OffsetRange_dB5;
+      break;
+
+    case 6:
+      *cio = LTE_Q_OffsetRange_dB6;
+      break;
+
+    case 8:
+      *cio = LTE_Q_OffsetRange_dB8;
+      break;
+
+    case 10:
+      *cio = LTE_Q_OffsetRange_dB10;
+      break;
+
+    case 12:
+      *cio = LTE_Q_OffsetRange_dB12;
+      break;
+
+    case 14:
+      *cio = LTE_Q_OffsetRange_dB14;
+      break;
+
+    case 16:
+      *cio = LTE_Q_OffsetRange_dB16;
+      break;
+
+    case 18:
+      *cio = LTE_Q_OffsetRange_dB18;
+      break;
+
+    case 20:
+      *cio = LTE_Q_OffsetRange_dB20;
+      break;
+
+    case 22:
+      *cio = LTE_Q_OffsetRange_dB22;
+      break;
+
+    case 24:
+      *cio = LTE_Q_OffsetRange_dB24;
+      break;
+
+    default:
+      return -1;
   }
+
   return 0;
 }
 
 int flexran_set_rrc_ocn(mid_t mod_id, rnti_t rnti, long cell_id, long cellIndividualOffset) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   LTE_Q_OffsetRange_t *cio = &ue_context_p->ue_context.measurement_info->cellIndividualOffset[cell_id+1];
+
   switch (cellIndividualOffset) {
-  case -24: *cio = LTE_Q_OffsetRange_dB_24; break;
-  case -22: *cio = LTE_Q_OffsetRange_dB_22; break;
-  case -20: *cio = LTE_Q_OffsetRange_dB_20; break;
-  case -18: *cio = LTE_Q_OffsetRange_dB_18; break;
-  case -16: *cio = LTE_Q_OffsetRange_dB_16; break;
-  case -14: *cio = LTE_Q_OffsetRange_dB_14; break;
-  case -12: *cio = LTE_Q_OffsetRange_dB_12; break;
-  case -10: *cio = LTE_Q_OffsetRange_dB_10; break;
-  case -8:  *cio = LTE_Q_OffsetRange_dB_8;  break;
-  case -6:  *cio = LTE_Q_OffsetRange_dB_6;  break;
-  case -5:  *cio = LTE_Q_OffsetRange_dB_5;  break;
-  case -4:  *cio = LTE_Q_OffsetRange_dB_4;  break;
-  case -3:  *cio = LTE_Q_OffsetRange_dB_3;  break;
-  case -2:  *cio = LTE_Q_OffsetRange_dB_2;  break;
-  case -1:  *cio = LTE_Q_OffsetRange_dB_1;  break;
-  case 0:   *cio = LTE_Q_OffsetRange_dB0;   break;
-  case 1:   *cio = LTE_Q_OffsetRange_dB1;   break;
-  case 2:   *cio = LTE_Q_OffsetRange_dB2;   break;
-  case 3:   *cio = LTE_Q_OffsetRange_dB3;   break;
-  case 4:   *cio = LTE_Q_OffsetRange_dB4;   break;
-  case 5:   *cio = LTE_Q_OffsetRange_dB5;   break;
-  case 6:   *cio = LTE_Q_OffsetRange_dB6;   break;
-  case 8:   *cio = LTE_Q_OffsetRange_dB8;   break;
-  case 10:  *cio = LTE_Q_OffsetRange_dB10;  break;
-  case 12:  *cio = LTE_Q_OffsetRange_dB12;  break;
-  case 14:  *cio = LTE_Q_OffsetRange_dB14;  break;
-  case 16:  *cio = LTE_Q_OffsetRange_dB16;  break;
-  case 18:  *cio = LTE_Q_OffsetRange_dB18;  break;
-  case 20:  *cio = LTE_Q_OffsetRange_dB20;  break;
-  case 22:  *cio = LTE_Q_OffsetRange_dB22;  break;
-  case 24:  *cio = LTE_Q_OffsetRange_dB24;  break;
-  default:                                  return -1;
+    case -24:
+      *cio = LTE_Q_OffsetRange_dB_24;
+      break;
+
+    case -22:
+      *cio = LTE_Q_OffsetRange_dB_22;
+      break;
+
+    case -20:
+      *cio = LTE_Q_OffsetRange_dB_20;
+      break;
+
+    case -18:
+      *cio = LTE_Q_OffsetRange_dB_18;
+      break;
+
+    case -16:
+      *cio = LTE_Q_OffsetRange_dB_16;
+      break;
+
+    case -14:
+      *cio = LTE_Q_OffsetRange_dB_14;
+      break;
+
+    case -12:
+      *cio = LTE_Q_OffsetRange_dB_12;
+      break;
+
+    case -10:
+      *cio = LTE_Q_OffsetRange_dB_10;
+      break;
+
+    case -8:
+      *cio = LTE_Q_OffsetRange_dB_8;
+      break;
+
+    case -6:
+      *cio = LTE_Q_OffsetRange_dB_6;
+      break;
+
+    case -5:
+      *cio = LTE_Q_OffsetRange_dB_5;
+      break;
+
+    case -4:
+      *cio = LTE_Q_OffsetRange_dB_4;
+      break;
+
+    case -3:
+      *cio = LTE_Q_OffsetRange_dB_3;
+      break;
+
+    case -2:
+      *cio = LTE_Q_OffsetRange_dB_2;
+      break;
+
+    case -1:
+      *cio = LTE_Q_OffsetRange_dB_1;
+      break;
+
+    case 0:
+      *cio = LTE_Q_OffsetRange_dB0;
+      break;
+
+    case 1:
+      *cio = LTE_Q_OffsetRange_dB1;
+      break;
+
+    case 2:
+      *cio = LTE_Q_OffsetRange_dB2;
+      break;
+
+    case 3:
+      *cio = LTE_Q_OffsetRange_dB3;
+      break;
+
+    case 4:
+      *cio = LTE_Q_OffsetRange_dB4;
+      break;
+
+    case 5:
+      *cio = LTE_Q_OffsetRange_dB5;
+      break;
+
+    case 6:
+      *cio = LTE_Q_OffsetRange_dB6;
+      break;
+
+    case 8:
+      *cio = LTE_Q_OffsetRange_dB8;
+      break;
+
+    case 10:
+      *cio = LTE_Q_OffsetRange_dB10;
+      break;
+
+    case 12:
+      *cio = LTE_Q_OffsetRange_dB12;
+      break;
+
+    case 14:
+      *cio = LTE_Q_OffsetRange_dB14;
+      break;
+
+    case 16:
+      *cio = LTE_Q_OffsetRange_dB16;
+      break;
+
+    case 18:
+      *cio = LTE_Q_OffsetRange_dB18;
+      break;
+
+    case 20:
+      *cio = LTE_Q_OffsetRange_dB20;
+      break;
+
+    case 22:
+      *cio = LTE_Q_OffsetRange_dB22;
+      break;
+
+    case 24:
+      *cio = LTE_Q_OffsetRange_dB24;
+      break;
+
+    default:
+      return -1;
   }
+
   return 0;
 }
 
 int flexran_set_filter_coeff_rsrp(mid_t mod_id, rnti_t rnti, long filterCoefficientRSRP) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   LTE_FilterCoefficient_t *fc = &ue_context_p->ue_context.measurement_info->filterCoefficientRSRP;
+
   switch (filterCoefficientRSRP) {
-  case 0:  *fc = LTE_FilterCoefficient_fc0;    break;
-  case 1:  *fc = LTE_FilterCoefficient_fc1;    break;
-  case 2:  *fc = LTE_FilterCoefficient_fc2;    break;
-  case 3:  *fc = LTE_FilterCoefficient_fc3;    break;
-  case 4:  *fc = LTE_FilterCoefficient_fc4;    break;
-  case 5:  *fc = LTE_FilterCoefficient_fc5;    break;
-  case 6:  *fc = LTE_FilterCoefficient_fc6;    break;
-  case 7:  *fc = LTE_FilterCoefficient_fc7;    break;
-  case 8:  *fc = LTE_FilterCoefficient_fc8;    break;
-  case 9:  *fc = LTE_FilterCoefficient_fc9;    break;
-  case 11: *fc = LTE_FilterCoefficient_fc11;   break;
-  case 13: *fc = LTE_FilterCoefficient_fc13;   break;
-  case 15: *fc = LTE_FilterCoefficient_fc15;   break;
-  case 17: *fc = LTE_FilterCoefficient_fc17;   break;
-  case 19: *fc = LTE_FilterCoefficient_fc19;   break;
-  case -1: *fc = LTE_FilterCoefficient_spare1; break;
-  default:                                     return -1;
+    case 0:
+      *fc = LTE_FilterCoefficient_fc0;
+      break;
+
+    case 1:
+      *fc = LTE_FilterCoefficient_fc1;
+      break;
+
+    case 2:
+      *fc = LTE_FilterCoefficient_fc2;
+      break;
+
+    case 3:
+      *fc = LTE_FilterCoefficient_fc3;
+      break;
+
+    case 4:
+      *fc = LTE_FilterCoefficient_fc4;
+      break;
+
+    case 5:
+      *fc = LTE_FilterCoefficient_fc5;
+      break;
+
+    case 6:
+      *fc = LTE_FilterCoefficient_fc6;
+      break;
+
+    case 7:
+      *fc = LTE_FilterCoefficient_fc7;
+      break;
+
+    case 8:
+      *fc = LTE_FilterCoefficient_fc8;
+      break;
+
+    case 9:
+      *fc = LTE_FilterCoefficient_fc9;
+      break;
+
+    case 11:
+      *fc = LTE_FilterCoefficient_fc11;
+      break;
+
+    case 13:
+      *fc = LTE_FilterCoefficient_fc13;
+      break;
+
+    case 15:
+      *fc = LTE_FilterCoefficient_fc15;
+      break;
+
+    case 17:
+      *fc = LTE_FilterCoefficient_fc17;
+      break;
+
+    case 19:
+      *fc = LTE_FilterCoefficient_fc19;
+      break;
+
+    case -1:
+      *fc = LTE_FilterCoefficient_spare1;
+      break;
+
+    default:
+      return -1;
   }
+
   return 0;
 }
 
 int flexran_set_filter_coeff_rsrq(mid_t mod_id, rnti_t rnti, long filterCoefficientRSRQ) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   LTE_FilterCoefficient_t *fc = &ue_context_p->ue_context.measurement_info->filterCoefficientRSRQ;
+
   switch (filterCoefficientRSRQ) {
-  case 0:  *fc = LTE_FilterCoefficient_fc0;    break;
-  case 1:  *fc = LTE_FilterCoefficient_fc1;    break;
-  case 2:  *fc = LTE_FilterCoefficient_fc2;    break;
-  case 3:  *fc = LTE_FilterCoefficient_fc3;    break;
-  case 4:  *fc = LTE_FilterCoefficient_fc4;    break;
-  case 5:  *fc = LTE_FilterCoefficient_fc5;    break;
-  case 6:  *fc = LTE_FilterCoefficient_fc6;    break;
-  case 7:  *fc = LTE_FilterCoefficient_fc7;    break;
-  case 8:  *fc = LTE_FilterCoefficient_fc8;    break;
-  case 9:  *fc = LTE_FilterCoefficient_fc9;    break;
-  case 11: *fc = LTE_FilterCoefficient_fc11;   break;
-  case 13: *fc = LTE_FilterCoefficient_fc13;   break;
-  case 15: *fc = LTE_FilterCoefficient_fc15;   break;
-  case 17: *fc = LTE_FilterCoefficient_fc17;   break;
-  case 19: *fc = LTE_FilterCoefficient_fc19;   break;
-  case -1: *fc = LTE_FilterCoefficient_spare1; break;
-  default:                                     return -1;
+    case 0:
+      *fc = LTE_FilterCoefficient_fc0;
+      break;
+
+    case 1:
+      *fc = LTE_FilterCoefficient_fc1;
+      break;
+
+    case 2:
+      *fc = LTE_FilterCoefficient_fc2;
+      break;
+
+    case 3:
+      *fc = LTE_FilterCoefficient_fc3;
+      break;
+
+    case 4:
+      *fc = LTE_FilterCoefficient_fc4;
+      break;
+
+    case 5:
+      *fc = LTE_FilterCoefficient_fc5;
+      break;
+
+    case 6:
+      *fc = LTE_FilterCoefficient_fc6;
+      break;
+
+    case 7:
+      *fc = LTE_FilterCoefficient_fc7;
+      break;
+
+    case 8:
+      *fc = LTE_FilterCoefficient_fc8;
+      break;
+
+    case 9:
+      *fc = LTE_FilterCoefficient_fc9;
+      break;
+
+    case 11:
+      *fc = LTE_FilterCoefficient_fc11;
+      break;
+
+    case 13:
+      *fc = LTE_FilterCoefficient_fc13;
+      break;
+
+    case 15:
+      *fc = LTE_FilterCoefficient_fc15;
+      break;
+
+    case 17:
+      *fc = LTE_FilterCoefficient_fc17;
+      break;
+
+    case 19:
+      *fc = LTE_FilterCoefficient_fc19;
+      break;
+
+    case -1:
+      *fc = LTE_FilterCoefficient_spare1;
+      break;
+
+    default:
+      return -1;
   }
+
   return 0;
 }
 
@@ -1983,12 +2735,19 @@ int flexran_set_filter_coeff_rsrq(mid_t mod_id, rnti_t rnti, long filterCoeffici
 
 int flexran_set_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti, long maxReportCells) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->per_event) return -1;
+
   if (!((maxReportCells >= 1) && (maxReportCells <= 8))) return -1;
+
   ue_context_p->ue_context.measurement_info->events->per_event->maxReportCells = maxReportCells;
   return 0;
 }
@@ -1997,652 +2756,817 @@ int flexran_set_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti, long max
 
 int flexran_set_rrc_a3_event_hysteresis(mid_t mod_id, rnti_t rnti, long hysteresis) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   if (!((hysteresis >=0) && (hysteresis <= 30))) return -1;
+
   ue_context_p->ue_context.measurement_info->events->a3_event->hysteresis = hysteresis;
   return 0;
 }
 
 int flexran_set_rrc_a3_event_timeToTrigger(mid_t mod_id, rnti_t rnti, long timeToTrigger) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   LTE_TimeToTrigger_t *ttt = &ue_context_p->ue_context.measurement_info->events->a3_event->timeToTrigger;
+
   switch (timeToTrigger) {
-  case 0:    *ttt = LTE_TimeToTrigger_ms0;    break;
-  case 40:   *ttt = LTE_TimeToTrigger_ms40;   break;
-  case 64:   *ttt = LTE_TimeToTrigger_ms64;   break;
-  case 80:   *ttt = LTE_TimeToTrigger_ms80;   break;
-  case 100:  *ttt = LTE_TimeToTrigger_ms100;  break;
-  case 128:  *ttt = LTE_TimeToTrigger_ms128;  break;
-  case 160:  *ttt = LTE_TimeToTrigger_ms160;  break;
-  case 256:  *ttt = LTE_TimeToTrigger_ms256;  break;
-  case 320:  *ttt = LTE_TimeToTrigger_ms320;  break;
-  case 480:  *ttt = LTE_TimeToTrigger_ms480;  break;
-  case 512:  *ttt = LTE_TimeToTrigger_ms512;  break;
-  case 640:  *ttt = LTE_TimeToTrigger_ms640;  break;
-  case 1024: *ttt = LTE_TimeToTrigger_ms1024; break;
-  case 1280: *ttt = LTE_TimeToTrigger_ms1280; break;
-  case 2560: *ttt = LTE_TimeToTrigger_ms2560; break;
-  case 5120: *ttt = LTE_TimeToTrigger_ms5120; break;
-  default:                                    return -1;
+    case 0:
+      *ttt = LTE_TimeToTrigger_ms0;
+      break;
+
+    case 40:
+      *ttt = LTE_TimeToTrigger_ms40;
+      break;
+
+    case 64:
+      *ttt = LTE_TimeToTrigger_ms64;
+      break;
+
+    case 80:
+      *ttt = LTE_TimeToTrigger_ms80;
+      break;
+
+    case 100:
+      *ttt = LTE_TimeToTrigger_ms100;
+      break;
+
+    case 128:
+      *ttt = LTE_TimeToTrigger_ms128;
+      break;
+
+    case 160:
+      *ttt = LTE_TimeToTrigger_ms160;
+      break;
+
+    case 256:
+      *ttt = LTE_TimeToTrigger_ms256;
+      break;
+
+    case 320:
+      *ttt = LTE_TimeToTrigger_ms320;
+      break;
+
+    case 480:
+      *ttt = LTE_TimeToTrigger_ms480;
+      break;
+
+    case 512:
+      *ttt = LTE_TimeToTrigger_ms512;
+      break;
+
+    case 640:
+      *ttt = LTE_TimeToTrigger_ms640;
+      break;
+
+    case 1024:
+      *ttt = LTE_TimeToTrigger_ms1024;
+      break;
+
+    case 1280:
+      *ttt = LTE_TimeToTrigger_ms1280;
+      break;
+
+    case 2560:
+      *ttt = LTE_TimeToTrigger_ms2560;
+      break;
+
+    case 5120:
+      *ttt = LTE_TimeToTrigger_ms5120;
+      break;
+
+    default:
+      return -1;
   }
+
   return 0;
 }
 
 int flexran_set_rrc_a3_event_maxReportCells(mid_t mod_id, rnti_t rnti, long maxReportCells) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   if (!((maxReportCells >= 1) && (maxReportCells <= 8))) return -1;
+
   ue_context_p->ue_context.measurement_info->events->a3_event->maxReportCells = maxReportCells;
   return 0;
 }
 
 int flexran_set_rrc_a3_event_a3_offset(mid_t mod_id, rnti_t rnti, long a3_offset) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   if (!((a3_offset >= -30) && (a3_offset <= 30))) return -1;
+
   ue_context_p->ue_context.measurement_info->events->a3_event->a3_offset = a3_offset;
   return 0;
 }
 
 int flexran_set_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti, int reportOnLeave) {
   if (!rrc_is_present(mod_id)) return -1;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return -1;
+
   if (!ue_context_p->ue_context.measurement_info) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events) return -1;
+
   if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
+
   if (!((reportOnLeave == 0) || (reportOnLeave == 1))) return -1;
+
   ue_context_p->ue_context.measurement_info->events->a3_event->reportOnLeave = reportOnLeave;
   return 0;
 }
 
 int flexran_set_x2_ho_net_control(mid_t mod_id, int x2_ho_net_control) {
   if (!rrc_is_present(mod_id)) return -1;
+
   if (!((x2_ho_net_control == 0) || (x2_ho_net_control == 1))) return -1;
+
   RC.rrc[mod_id]->x2_ho_net_control = x2_ho_net_control;
   return 0;
 }
 
 int flexran_get_x2_ho_net_control(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return -1;
+
   return RC.rrc[mod_id]->x2_ho_net_control;
 }
 
 uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.num_plmn;
 }
 
 uint16_t flexran_get_rrc_mcc(mid_t mod_id, uint8_t index) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.mcc[index];
 }
 
 uint16_t flexran_get_rrc_mnc(mid_t mod_id, uint8_t index) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.mnc[index];
 }
 
 uint8_t flexran_get_rrc_mnc_digit_length(mid_t mod_id, uint8_t index) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->configuration.mnc_digit_length[index];
 }
 
 int flexran_get_rrc_num_adj_cells(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->num_neigh_cells;
 }
 
 int flexran_agent_rrc_gtp_num_e_rab(mid_t mod_id, rnti_t rnti) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   return ue_context_p->ue_context.setup_e_rabs;
 }
 
 int flexran_agent_rrc_gtp_get_e_rab_id(mid_t mod_id, rnti_t rnti, int index) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   return ue_context_p->ue_context.e_rab[index].param.e_rab_id;
 }
 
 int flexran_agent_rrc_gtp_get_teid_enb(mid_t mod_id, rnti_t rnti, int index) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   return ue_context_p->ue_context.enb_gtp_teid[index];
 }
 
 int flexran_agent_rrc_gtp_get_teid_sgw(mid_t mod_id, rnti_t rnti, int index) {
   if (!rrc_is_present(mod_id)) return 0;
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
+
   if (!ue_context_p) return 0;
+
   return ue_context_p->ue_context.e_rab[index].param.gtp_teid;
 }
 
 /**************************** SLICING ****************************/
-int flexran_get_ue_dl_slice_id(mid_t mod_id, mid_t ue_id)
-{
+int flexran_get_ue_dl_slice_id(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   int slice_idx = RC.mac[mod_id]->UE_list.assoc_dl_slice_idx[ue_id];
+
   if (slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_dl)
     return RC.mac[mod_id]->slice_info.dl[slice_idx].id;
+
   return 0;
 }
 
-void flexran_set_ue_dl_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx)
-{
+void flexran_set_ue_dl_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return;
+
   if (flexran_get_mac_ue_crnti(mod_id, ue_id) == NOT_A_RNTI) return;
+
   if (!flexran_dl_slice_exists(mod_id, slice_idx)) return;
+
   RC.mac[mod_id]->UE_list.assoc_dl_slice_idx[ue_id] = slice_idx;
 }
 
-int flexran_get_ue_ul_slice_id(mid_t mod_id, mid_t ue_id)
-{
+int flexran_get_ue_ul_slice_id(mid_t mod_id, mid_t ue_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   int slice_idx = RC.mac[mod_id]->UE_list.assoc_ul_slice_idx[ue_id];
+
   if (slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_ul)
     return RC.mac[mod_id]->slice_info.ul[slice_idx].id;
+
   return 0;
 }
 
-void flexran_set_ue_ul_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx)
-{
+void flexran_set_ue_ul_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return;
+
   if (flexran_get_mac_ue_crnti(mod_id, ue_id) == NOT_A_RNTI) return;
+
   if (!flexran_ul_slice_exists(mod_id, slice_idx)) return;
+
   RC.mac[mod_id]->UE_list.assoc_ul_slice_idx[ue_id] = slice_idx;
 }
 
-int flexran_dl_slice_exists(mid_t mod_id, int slice_idx)
-{
+int flexran_dl_slice_exists(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_dl;
 }
 
-int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id)
-{
+int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   int newidx = RC.mac[mod_id]->slice_info.n_dl;
+
   if (newidx >= MAX_NUM_SLICES) return -1;
+
   ++RC.mac[mod_id]->slice_info.n_dl;
   flexran_set_dl_slice_id(mod_id, newidx, slice_id);
   return newidx;
 }
 
-int flexran_find_dl_slice(mid_t mod_id, slice_id_t slice_id)
-{
+int flexran_find_dl_slice(mid_t mod_id, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   slice_info_t *sli = &RC.mac[mod_id]->slice_info;
   int n = sli->n_dl;
+
   for (int i = 0; i < n; i++) {
     if (sli->dl[i].id == slice_id) return i;
   }
+
   return -1;
 }
 
-int flexran_remove_dl_slice(mid_t mod_id, int slice_idx)
-{
+int flexran_remove_dl_slice(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   slice_info_t *sli = &RC.mac[mod_id]->slice_info;
+
   if (sli->n_dl <= 1) return -1;
 
   if (sli->dl[slice_idx].sched_name) free(sli->dl[slice_idx].sched_name);
+
   --sli->n_dl;
+
   /* move last element to the position of the removed one */
   if (slice_idx != sli->n_dl)
     memcpy(&sli->dl[slice_idx], &sli->dl[sli->n_dl], sizeof(sli->dl[sli->n_dl]));
-  memset(&sli->dl[sli->n_dl], 0, sizeof(sli->dl[sli->n_dl]));
 
+  memset(&sli->dl[sli->n_dl], 0, sizeof(sli->dl[sli->n_dl]));
   /* all UEs that have been in the old slice are put into slice index 0 */
   int *assoc_list = RC.mac[mod_id]->UE_list.assoc_dl_slice_idx;
+
   for (int i = 0; i < MAX_MOBILES_PER_ENB; ++i) {
     if (assoc_list[i] == slice_idx)
       assoc_list[i] = 0;
   }
+
   return sli->n_dl;
 }
 
-int flexran_get_num_dl_slices(mid_t mod_id)
-{
+int flexran_get_num_dl_slices(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.n_dl;
 }
 
-int flexran_get_intraslice_sharing_active(mid_t mod_id)
-{
+int flexran_get_intraslice_sharing_active(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.intraslice_share_active;
 }
-void flexran_set_intraslice_sharing_active(mid_t mod_id, int intraslice_active)
-{
+void flexran_set_intraslice_sharing_active(mid_t mod_id, int intraslice_active) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.intraslice_share_active = intraslice_active;
 }
 
-int flexran_get_interslice_sharing_active(mid_t mod_id)
-{
+int flexran_get_interslice_sharing_active(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.interslice_share_active;
 }
-void flexran_set_interslice_sharing_active(mid_t mod_id, int interslice_active)
-{
+void flexran_set_interslice_sharing_active(mid_t mod_id, int interslice_active) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.interslice_share_active = interslice_active;
 }
 
-slice_id_t flexran_get_dl_slice_id(mid_t mod_id, int slice_idx)
-{
+slice_id_t flexran_get_dl_slice_id(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].id;
 }
-void flexran_set_dl_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id)
-{
+void flexran_set_dl_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].id = slice_id;
 }
 
-int flexran_get_dl_slice_percentage(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_percentage(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].pct * 100.0f;
 }
-void flexran_set_dl_slice_percentage(mid_t mod_id, int slice_idx, int percentage)
-{
+void flexran_set_dl_slice_percentage(mid_t mod_id, int slice_idx, int percentage) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].pct = percentage / 100.0f;
 }
 
-int flexran_get_dl_slice_isolation(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_isolation(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].isol;
 }
-void flexran_set_dl_slice_isolation(mid_t mod_id, int slice_idx, int is_isolated)
-{
+void flexran_set_dl_slice_isolation(mid_t mod_id, int slice_idx, int is_isolated) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].isol = is_isolated;
 }
 
-int flexran_get_dl_slice_priority(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_priority(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].prio;
 }
-void flexran_set_dl_slice_priority(mid_t mod_id, int slice_idx, int priority)
-{
+void flexran_set_dl_slice_priority(mid_t mod_id, int slice_idx, int priority) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].prio = priority;
 }
 
-int flexran_get_dl_slice_position_low(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_position_low(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].pos_low;
 }
-void flexran_set_dl_slice_position_low(mid_t mod_id, int slice_idx, int poslow)
-{
+void flexran_set_dl_slice_position_low(mid_t mod_id, int slice_idx, int poslow) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].pos_low = poslow;
 }
 
-int flexran_get_dl_slice_position_high(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_position_high(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].pos_high;
 }
-void flexran_set_dl_slice_position_high(mid_t mod_id, int slice_idx, int poshigh)
-{
+void flexran_set_dl_slice_position_high(mid_t mod_id, int slice_idx, int poshigh) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].pos_high = poshigh;
 }
 
-int flexran_get_dl_slice_maxmcs(mid_t mod_id, int slice_idx)
-{
+int flexran_get_dl_slice_maxmcs(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].maxmcs;
 }
-void flexran_set_dl_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs)
-{
+void flexran_set_dl_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].maxmcs = maxmcs;
 }
 
-int flexran_get_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting **sorting_list)
-{
+int flexran_get_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting **sorting_list) {
   if (!mac_is_present(mod_id)) return -1;
+
   if (!(*sorting_list)) {
     *sorting_list = calloc(CR_NUM, sizeof(Protocol__FlexDlSorting));
+
     if (!(*sorting_list)) return -1;
   }
+
   uint32_t policy = RC.mac[mod_id]->slice_info.dl[slice_idx].sorting;
+
   for (int i = 0; i < CR_NUM; i++) {
     switch (policy >> 4 * (CR_NUM - 1 - i) & 0xF) {
-    case CR_ROUND:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND;
-      break;
-    case CR_SRB12:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_SRB12;
-      break;
-    case CR_HOL:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_HOL;
-      break;
-    case CR_LC:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LC;
-      break;
-    case CR_CQI:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_CQI;
-      break;
-    case CR_LCP:
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LCP;
-      break;
-    default:
-      /* this should not happen, but a "default" */
-      (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND;
-      break;
+      case CR_ROUND:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND;
+        break;
+
+      case CR_SRB12:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_SRB12;
+        break;
+
+      case CR_HOL:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_HOL;
+        break;
+
+      case CR_LC:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LC;
+        break;
+
+      case CR_CQI:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_CQI;
+        break;
+
+      case CR_LCP:
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LCP;
+        break;
+
+      default:
+        /* this should not happen, but a "default" */
+        (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND;
+        break;
     }
   }
+
   return CR_NUM;
 }
-void flexran_set_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting *sorting_list, int n)
-{
+void flexran_set_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting *sorting_list, int n) {
   if (!mac_is_present(mod_id)) return;
+
   uint32_t policy = 0;
+
   for (int i = 0; i < n && i < CR_NUM; i++) {
     switch (sorting_list[i]) {
-    case PROTOCOL__FLEX_DL_SORTING__CR_ROUND:
-      policy = policy << 4 | CR_ROUND;
-      break;
-    case PROTOCOL__FLEX_DL_SORTING__CR_SRB12:
-      policy = policy << 4 | CR_SRB12;
-      break;
-    case PROTOCOL__FLEX_DL_SORTING__CR_HOL:
-      policy = policy << 4 | CR_HOL;
-      break;
-    case PROTOCOL__FLEX_DL_SORTING__CR_LC:
-      policy = policy << 4 | CR_LC;
-      break;
-    case PROTOCOL__FLEX_DL_SORTING__CR_CQI:
-      policy = policy << 4 | CR_CQI;
-      break;
-    case PROTOCOL__FLEX_DL_SORTING__CR_LCP:
-      policy = policy << 4 | CR_LCP;
-      break;
-    default: /* suppresses warnings */
-      policy = policy << 4 | CR_ROUND;
-      break;
+      case PROTOCOL__FLEX_DL_SORTING__CR_ROUND:
+        policy = policy << 4 | CR_ROUND;
+        break;
+
+      case PROTOCOL__FLEX_DL_SORTING__CR_SRB12:
+        policy = policy << 4 | CR_SRB12;
+        break;
+
+      case PROTOCOL__FLEX_DL_SORTING__CR_HOL:
+        policy = policy << 4 | CR_HOL;
+        break;
+
+      case PROTOCOL__FLEX_DL_SORTING__CR_LC:
+        policy = policy << 4 | CR_LC;
+        break;
+
+      case PROTOCOL__FLEX_DL_SORTING__CR_CQI:
+        policy = policy << 4 | CR_CQI;
+        break;
+
+      case PROTOCOL__FLEX_DL_SORTING__CR_LCP:
+        policy = policy << 4 | CR_LCP;
+        break;
+
+      default: /* suppresses warnings */
+        policy = policy << 4 | CR_ROUND;
+        break;
     }
   }
+
   /* fill up with 0 == CR_ROUND */
   if (CR_NUM > n) policy = policy << 4 * (CR_NUM - n);
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].sorting = policy;
 }
 
-Protocol__FlexDlAccountingPolicy flexran_get_dl_slice_accounting_policy(mid_t mod_id, int slice_idx)
-{
+Protocol__FlexDlAccountingPolicy flexran_get_dl_slice_accounting_policy(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR;
+
   switch (RC.mac[mod_id]->slice_info.dl[slice_idx].accounting) {
-  case POL_FAIR:
-    return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR;
-  case POL_GREEDY:
-    return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY;
-  default:
-    return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR;
+    case POL_FAIR:
+      return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR;
+
+    case POL_GREEDY:
+      return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY;
+
+    default:
+      return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR;
   }
 }
-void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__FlexDlAccountingPolicy accounting)
-{
+void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__FlexDlAccountingPolicy accounting) {
   if (!mac_is_present(mod_id)) return;
+
   switch (accounting) {
-  case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR:
-    RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR;
-    return;
-  case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY:
-    RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_GREEDY;
-    return;
-  default:
-    RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR;
-    return;
+    case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR:
+      RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR;
+      return;
+
+    case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY:
+      RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_GREEDY;
+      return;
+
+    default:
+      RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR;
+      return;
   }
 }
 
-char *flexran_get_dl_slice_scheduler(mid_t mod_id, int slice_idx)
-{
+char *flexran_get_dl_slice_scheduler(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return NULL;
+
   return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name;
 }
-int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name)
-{
+int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name) {
   if (!mac_is_present(mod_id)) return 0;
+
   if (RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name)
     free(RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name);
+
   RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name = strdup(name);
   RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb = dlsym(NULL, name);
   return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb != NULL;
 }
 
-int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id)
-{
+int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   int newidx = RC.mac[mod_id]->slice_info.n_ul;
+
   if (newidx >= MAX_NUM_SLICES) return -1;
+
   ++RC.mac[mod_id]->slice_info.n_ul;
   flexran_set_ul_slice_id(mod_id, newidx, slice_id);
   return newidx;
 }
 
-int flexran_find_ul_slice(mid_t mod_id, slice_id_t slice_id)
-{
+int flexran_find_ul_slice(mid_t mod_id, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   slice_info_t *sli = &RC.mac[mod_id]->slice_info;
   int n = sli->n_ul;
+
   for (int i = 0; i < n; i++) {
     if (sli->ul[i].id == slice_id) return i;
   }
+
   return -1;
 }
 
-int flexran_remove_ul_slice(mid_t mod_id, int slice_idx)
-{
+int flexran_remove_ul_slice(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   slice_info_t *sli = &RC.mac[mod_id]->slice_info;
+
   if (sli->n_ul <= 1) return -1;
 
   if (sli->ul[slice_idx].sched_name) free(sli->ul[slice_idx].sched_name);
+
   --sli->n_ul;
+
   /* move last element to the position of the removed one */
   if (slice_idx != sli->n_ul)
     memcpy(&sli->ul[slice_idx], &sli->ul[sli->n_ul], sizeof(sli->ul[sli->n_ul]));
-  memset(&sli->ul[sli->n_ul], 0, sizeof(sli->ul[sli->n_ul]));
 
+  memset(&sli->ul[sli->n_ul], 0, sizeof(sli->ul[sli->n_ul]));
   /* all UEs that have been in the old slice are put into slice index 0 */
   int *assoc_list = RC.mac[mod_id]->UE_list.assoc_ul_slice_idx;
+
   for (int i = 0; i < MAX_MOBILES_PER_ENB; ++i) {
     if (assoc_list[i] == slice_idx)
       assoc_list[i] = 0;
   }
+
   return sli->n_ul;
 }
 
-int flexran_get_num_ul_slices(mid_t mod_id)
-{
+int flexran_get_num_ul_slices(mid_t mod_id) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.n_ul;
 }
 
-int flexran_ul_slice_exists(mid_t mod_id, int slice_idx)
-{
+int flexran_ul_slice_exists(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_ul;
 }
 
-slice_id_t flexran_get_ul_slice_id(mid_t mod_id, int slice_idx)
-{
+slice_id_t flexran_get_ul_slice_id(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.ul[slice_idx].id;
 }
-void flexran_set_ul_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id)
-{
+void flexran_set_ul_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.ul[slice_idx].id = slice_id;
 }
 
-int flexran_get_ul_slice_percentage(mid_t mod_id, int slice_idx)
-{
+int flexran_get_ul_slice_percentage(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.ul[slice_idx].pct * 100.0f;
 }
-void flexran_set_ul_slice_percentage(mid_t mod_id, int slice_idx, int percentage)
-{
+void flexran_set_ul_slice_percentage(mid_t mod_id, int slice_idx, int percentage) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.ul[slice_idx].pct = percentage / 100.0f;
 }
 
-int flexran_get_ul_slice_first_rb(mid_t mod_id, int slice_idx)
-{
+int flexran_get_ul_slice_first_rb(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.ul[slice_idx].first_rb;
 }
 
-void flexran_set_ul_slice_first_rb(mid_t mod_id, int slice_idx, int first_rb)
-{
+void flexran_set_ul_slice_first_rb(mid_t mod_id, int slice_idx, int first_rb) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.ul[slice_idx].first_rb = first_rb;
 }
 
-int flexran_get_ul_slice_maxmcs(mid_t mod_id, int slice_idx)
-{
+int flexran_get_ul_slice_maxmcs(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return -1;
+
   return RC.mac[mod_id]->slice_info.ul[slice_idx].maxmcs;
 }
-void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs)
-{
+void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs) {
   if (!mac_is_present(mod_id)) return;
+
   RC.mac[mod_id]->slice_info.ul[slice_idx].maxmcs = maxmcs;
 }
 
-char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx)
-{
+char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx) {
   if (!mac_is_present(mod_id)) return NULL;
+
   return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name;
 }
-int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name)
-{
+int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name) {
   if (!mac_is_present(mod_id)) return 0;
+
   if (RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name)
     free(RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name);
+
   RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name = strdup(name);
   RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb = dlsym(NULL, name);
   return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb != NULL;
 }
 
 /**************************** General BS info  ****************************/
-uint64_t flexran_get_bs_id(mid_t mod_id)
-{
+uint64_t flexran_get_bs_id(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   return RC.rrc[mod_id]->nr_cellid;
 }
 
-size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps)
-{
+size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps) {
   if (!caps) return 0;
+
   if (!rrc_is_present(mod_id)) return 0;
+
   size_t n_caps = 0;
+
   switch (RC.rrc[mod_id]->node_type) {
-  case ngran_eNB_CU:
-  case ngran_ng_eNB_CU:
-  case ngran_gNB_CU:
-    n_caps = 3;
-    *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
-    AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
-                n_caps * sizeof(Protocol__FlexBsCapability));
-    (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__PDCP;
-    (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__SDAP;
-    (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__RRC;
-    break;
-  case ngran_eNB_DU:
-  case ngran_gNB_DU:
-    n_caps = 5;
-    *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
-    AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
-                n_caps * sizeof(Protocol__FlexBsCapability));
-    (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__LOPHY;
-    (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__HIPHY;
-    (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__LOMAC;
-    (*caps)[3] = PROTOCOL__FLEX_BS_CAPABILITY__HIMAC;
-    (*caps)[4] = PROTOCOL__FLEX_BS_CAPABILITY__RLC;
-    break;
-  case ngran_eNB:
-  case ngran_ng_eNB:
-  case ngran_gNB:
-    n_caps = 8;
-    *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
-    AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
-                n_caps * sizeof(Protocol__FlexBsCapability));
-    (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__LOPHY;
-    (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__HIPHY;
-    (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__LOMAC;
-    (*caps)[3] = PROTOCOL__FLEX_BS_CAPABILITY__HIMAC;
-    (*caps)[4] = PROTOCOL__FLEX_BS_CAPABILITY__RLC;
-    (*caps)[5] = PROTOCOL__FLEX_BS_CAPABILITY__PDCP;
-    (*caps)[6] = PROTOCOL__FLEX_BS_CAPABILITY__SDAP;
-    (*caps)[7] = PROTOCOL__FLEX_BS_CAPABILITY__RRC;
-    break;
+    case ngran_eNB_CU:
+    case ngran_ng_eNB_CU:
+    case ngran_gNB_CU:
+      n_caps = 3;
+      *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
+      AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
+                  n_caps * sizeof(Protocol__FlexBsCapability));
+      (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__PDCP;
+      (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__SDAP;
+      (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__RRC;
+      break;
+
+    case ngran_eNB_DU:
+    case ngran_gNB_DU:
+      n_caps = 5;
+      *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
+      AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
+                  n_caps * sizeof(Protocol__FlexBsCapability));
+      (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__LOPHY;
+      (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__HIPHY;
+      (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__LOMAC;
+      (*caps)[3] = PROTOCOL__FLEX_BS_CAPABILITY__HIMAC;
+      (*caps)[4] = PROTOCOL__FLEX_BS_CAPABILITY__RLC;
+      break;
+
+    case ngran_eNB:
+    case ngran_ng_eNB:
+    case ngran_gNB:
+      n_caps = 8;
+      *caps = calloc(n_caps, sizeof(Protocol__FlexBsCapability));
+      AssertFatal(*caps, "could not allocate %zu bytes for Protocol__FlexBsCapability array\n",
+                  n_caps * sizeof(Protocol__FlexBsCapability));
+      (*caps)[0] = PROTOCOL__FLEX_BS_CAPABILITY__LOPHY;
+      (*caps)[1] = PROTOCOL__FLEX_BS_CAPABILITY__HIPHY;
+      (*caps)[2] = PROTOCOL__FLEX_BS_CAPABILITY__LOMAC;
+      (*caps)[3] = PROTOCOL__FLEX_BS_CAPABILITY__HIMAC;
+      (*caps)[4] = PROTOCOL__FLEX_BS_CAPABILITY__RLC;
+      (*caps)[5] = PROTOCOL__FLEX_BS_CAPABILITY__PDCP;
+      (*caps)[6] = PROTOCOL__FLEX_BS_CAPABILITY__SDAP;
+      (*caps)[7] = PROTOCOL__FLEX_BS_CAPABILITY__RRC;
+      break;
   }
+
   return n_caps;
 }
 
-uint16_t flexran_get_capabilities_mask(mid_t mod_id)
-{
+uint16_t flexran_get_capabilities_mask(mid_t mod_id) {
   if (!rrc_is_present(mod_id)) return 0;
+
   uint16_t mask = 0;
+
   switch (RC.rrc[mod_id]->node_type) {
-  case ngran_eNB_CU:
-  case ngran_ng_eNB_CU:
-  case ngran_gNB_CU:
-    mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC);
-    break;
-  case ngran_eNB_DU:
-  case ngran_gNB_DU:
-    mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC);
-    break;
-  case ngran_eNB:
-  case ngran_ng_eNB:
-  case ngran_gNB:
-    mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)
-         | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC);
-    break;
+    case ngran_eNB_CU:
+    case ngran_ng_eNB_CU:
+    case ngran_gNB_CU:
+      mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC);
+      break;
+
+    case ngran_eNB_DU:
+    case ngran_gNB_DU:
+      mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC);
+      break;
+
+    case ngran_eNB:
+    case ngran_ng_eNB:
+    case ngran_gNB:
+      mask = (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOPHY)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIPHY)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__LOMAC)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__HIMAC)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RLC)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__PDCP)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)
+             | (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC);
+      break;
   }
+
   return mask;
 }
diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
index c41b2071cbba0ae4af45655ea2e9473ff18387c5..e1b7e114a448e527fa251164e89ce85381915609 100644
--- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c
+++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
@@ -53,7 +53,7 @@
 // replaces in ie->value.choice.C_RNTI, causing
 // a compile error
 
-#undef C_RNTI 
+#undef C_RNTI
 
 extern f1ap_setup_req_t *f1ap_du_data;
 extern RAN_CONTEXT_t RC;
@@ -67,10 +67,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
                                       uint32_t         stream,
                                       F1AP_F1AP_PDU_t *pdu) {
   LOG_D(F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n");
-  
   F1AP_DLRRCMessageTransfer_t    *container;
   F1AP_DLRRCMessageTransferIEs_t *ie;
-
   uint64_t        cu_ue_f1ap_id;
   uint64_t        du_ue_f1ap_id;
   uint64_t        srb_id;
@@ -78,25 +76,20 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
   sdu_size_t      rrc_dl_sdu_len;
   //uint64_t        subscriberProfileIDforRFP;
   //uint64_t        rAT_FrequencySelectionPriority;
-
   DevAssert(pdu != NULL);
 
   if (stream != 0) {
     LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n",
-               assoc_id, stream);
+          assoc_id, stream);
     return -1;
   }
 
   container = &pdu->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
-
-
   /* GNB_CU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
   cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
   LOG_D(F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
-
-
   /* GNB_DU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
@@ -114,7 +107,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
   /* oldgNB_DU_UE_F1AP_ID */
   if (0) {
     F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
-                             F1AP_ProtocolIE_ID_id_oldgNB_DU_UE_F1AP_ID, true);
+                               F1AP_ProtocolIE_ID_id_oldgNB_DU_UE_F1AP_ID, true);
   }
 
   /* mandatory */
@@ -128,7 +121,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
   /* ExecuteDuplication */
   if (0) {
     F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
-                             F1AP_ProtocolIE_ID_id_ExecuteDuplication, true);
+                               F1AP_ProtocolIE_ID_id_ExecuteDuplication, true);
     executeDuplication = ie->value.choice.ExecuteDuplication;
     LOG_D(F1AP, "ExecuteDuplication %d \n", executeDuplication);
   }
@@ -140,7 +133,6 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
                              F1AP_ProtocolIE_ID_id_RRCContainer, true);
   // BK: need check
   // create an ITTI message and copy SDU
-
   //  message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
   //  memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
   rrc_dl_sdu_len = ie->value.choice.RRCContainer.size;
@@ -156,15 +148,17 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
   /* RAT_FrequencyPriorityInformation */
   if (0) {
     F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
-                             F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation, true);
+                               F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation, true);
 
     switch(ie->value.choice.RAT_FrequencyPriorityInformation.present) {
       case F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP:
         //subscriberProfileIDforRFP = ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP;
         break;
+
       case F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority:
         //rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority;
         break;
+
       default:
         LOG_W(F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n");
         break;
@@ -173,28 +167,26 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
 
   // decode RRC Container and act on the message type
   AssertFatal(srb_id<3,"illegal srb_id\n");
-
   protocol_ctxt_t ctxt;
   ctxt.rnti      = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id);
   ctxt.module_id = instance;
   ctxt.instance  = instance;
   ctxt.enb_flag  = 1;
-
- struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(
-                                                RC.rrc[ctxt.module_id],
-                                                ctxt.rnti);
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(
+        RC.rrc[ctxt.module_id],
+        ctxt.rnti);
 
   if (srb_id == 0) {
-    LTE_DL_CCCH_Message_t* dl_ccch_msg=NULL;
+    LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
     asn_dec_rval_t dec_rval;
     dec_rval = uper_decode(NULL,
-         &asn_DEF_LTE_DL_CCCH_Message,
-         (void**)&dl_ccch_msg,
-         ie->value.choice.RRCContainer.buf,
-         rrc_dl_sdu_len,0,0);
+                           &asn_DEF_LTE_DL_CCCH_Message,
+                           (void **)&dl_ccch_msg,
+                           ie->value.choice.RRCContainer.buf,
+                           rrc_dl_sdu_len,0,0);
     AssertFatal(dec_rval.code == RC_OK, "could not decode F1AP message\n");
-    switch (dl_ccch_msg->message.choice.c1.present) {
 
+    switch (dl_ccch_msg->message.choice.c1.present) {
       case LTE_DL_CCCH_MessageType__c1_PR_NOTHING:
         LOG_I(F1AP, "Received PR_NOTHING on DL-CCCH-Message\n");
         break;
@@ -214,32 +206,29 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
               "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n");
         break;
 
-      case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
-      {
+      case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup: {
         LOG_I(F1AP,
               "Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n",
               du_ue_f1ap_id,
               f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
-          // Get configuration
-
-        LTE_RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
+        // Get configuration
+        LTE_RRCConnectionSetup_t *rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
         AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n");
-        LTE_RadioResourceConfigDedicated_t* radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated;
-
+        LTE_RadioResourceConfigDedicated_t *radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated;
         // get SRB logical channel information
         LTE_SRB_ToAddModList_t *SRB_configList;
         LTE_SRB_ToAddMod_t *SRB1_config;
         LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig = NULL;
         SRB_configList                 = radioResourceConfigDedicated->srb_ToAddModList;
-
         AssertFatal(SRB_configList!=NULL,"SRB_configList is null\n");
+
         for (int cnt = 0; cnt < (SRB_configList)->list.count; cnt++) {
           if ((SRB_configList)->list.array[cnt]->srb_Identity == 1) {
             SRB1_config = (SRB_configList)->list.array[cnt];
 
             if (SRB1_config->logicalChannelConfig) {
               if (SRB1_config->logicalChannelConfig->present ==
-                LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
+                  LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
                 SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
               } else {
                 SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
@@ -249,53 +238,41 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
             }
           }
         } // for
+
         rrc_rlc_config_asn1_req(&ctxt,
-          SRB_configList,
-          (LTE_DRB_ToAddModList_t*) NULL,
-          (LTE_DRB_ToReleaseList_t*) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-          , (LTE_PMCH_InfoList_r9_t *) NULL,
-          0,0
-#   endif
-          );
-
-      // This should be somewhere in the f1ap_cudu_ue_inst_t
-      /*int macrlc_instance = 0; 
-
-      rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[0], du_ue_f1ap_id);
-      struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
-      */  
-      eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; 
-      AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
-
-      memcpy((void*)ue_p->Srb0.Tx_buffer.Payload,
-             (void*)ie->value.choice.RRCContainer.buf,
-             rrc_dl_sdu_len); // ie->value.choice.RRCContainer.size
-
-      ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
-
-      LTE_MAC_MainConfig_t    *mac_MainConfig  = NULL;
-      if (radioResourceConfigDedicated->mac_MainConfig)
-        mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
-
-      rrc_mac_config_req_eNB(
+                                SRB_configList,
+                                (LTE_DRB_ToAddModList_t *) NULL,
+                                (LTE_DRB_ToReleaseList_t *) NULL,
+                                (LTE_PMCH_InfoList_r9_t *) NULL,
+                                0,0
+                               );
+        // This should be somewhere in the f1ap_cudu_ue_inst_t
+        /*int macrlc_instance = 0;
+
+        rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[0], du_ue_f1ap_id);
+        struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
+        */
+        eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
+        AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
+        memcpy((void *)ue_p->Srb0.Tx_buffer.Payload,
+               (void *)ie->value.choice.RRCContainer.buf,
+               rrc_dl_sdu_len); // ie->value.choice.RRCContainer.size
+        ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
+        LTE_MAC_MainConfig_t    *mac_MainConfig  = NULL;
+
+        if (radioResourceConfigDedicated->mac_MainConfig)
+          mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
+
+        rrc_mac_config_req_eNB(
           ctxt.module_id,
           0, //primaryCC_id,
-          0,0,0,0,0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-          0,
-#endif
+          0,0,0,0,0,0,
           ctxt.rnti,
           (LTE_BCCH_BCH_Message_t *) NULL,
           (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
           (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
           radioResourceConfigDedicated->physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
           (LTE_SCellToAddMod_r10_t *)NULL,
-          //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
           (LTE_MeasObjectToAddMod_t **) NULL,
           mac_MainConfig,
           1,
@@ -304,244 +281,220 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
           (LTE_TDD_Config_t *) NULL,
           NULL,
           (LTE_SchedulingInfoList_t *) NULL,
-          0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-          , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-          ,
-          (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-          );
-          break;
+          0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL,
+          0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
+          (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+          0,
+          (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+          (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+          (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+          (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+          (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+        );
+        break;
       } // case
 
       default:
         AssertFatal(1==0,
-        "Unknown message\n");
+                    "Unknown message\n");
         break;
     }// switch case
-    return(0);
-  } else if (srb_id == 1) { 
 
-    LTE_DL_DCCH_Message_t* dl_dcch_msg=NULL;
+    return(0);
+  } else if (srb_id == 1) {
+    LTE_DL_DCCH_Message_t *dl_dcch_msg=NULL;
     asn_dec_rval_t dec_rval;
     dec_rval = uper_decode(NULL,
-         &asn_DEF_LTE_DL_DCCH_Message,
-         (void**)&dl_dcch_msg,
-         &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
-         rrc_dl_sdu_len,0,0);
-    
-    if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) 
+                           &asn_DEF_LTE_DL_DCCH_Message,
+                           (void **)&dl_dcch_msg,
+                           &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
+                           rrc_dl_sdu_len,0,0);
+
+    if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0))
       LOG_E(F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed);
     else
       LOG_D(F1AP, "Received message: present %d and c1 present %d\n",
             dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1.present);
 
     if (dl_dcch_msg->message.present == LTE_DL_DCCH_MessageType_PR_c1) {
-     
       switch (dl_dcch_msg->message.choice.c1.present) {
-	
-      case LTE_DL_DCCH_MessageType__c1_PR_NOTHING:
-        LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n");
-        return 0;
-      case LTE_DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
-        LOG_I(F1AP,"Received NAS DL Information Transfer\n");
-        break;	
-      case LTE_DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
-        LOG_I(F1AP,"Received NAS sfbParametersResponseCDMA2000\n");
-        break;  
-      case LTE_DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
-        LOG_I(F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n");
-        break;  
-      case LTE_DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
-        LOG_I(F1AP,"Received NAS mobilityFromEUTRACommand\n");
-        break;
-      case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
-	     // handle RRCConnectionReconfiguration
-        LOG_I(F1AP,
-              "Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n",
-              du_ue_f1ap_id,
-              f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
-	
-        LTE_RRCConnectionReconfiguration_t* rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
-
-        if (rrcConnectionReconfiguration->criticalExtensions.present == LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
-	        if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.present ==
-	         LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8) {
-	          LTE_RRCConnectionReconfiguration_r8_IEs_t* rrcConnectionReconfiguration_r8 =
-	          &rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8;
-	    
-            if (rrcConnectionReconfiguration_r8->mobilityControlInfo) {
-	            LOG_I(F1AP, "Mobility Control Information is present\n");
-	            AssertFatal(1==0,"Can't handle this yet in DU\n");
-	          }
-	          if (rrcConnectionReconfiguration_r8->measConfig != NULL) {
-	            LOG_I(F1AP, "Measurement Configuration is present\n");
-	          } 
-	    
-      	    if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
-              LOG_I(F1AP, "Radio Resource Configuration is present\n");
-      	      uint8_t DRB2LCHAN[8];
-              long drb_id;
-              int i;
-              LTE_DRB_ToAddModList_t  *DRB_configList  = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToAddModList;
-              LTE_SRB_ToAddModList_t  *SRB_configList  = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
-              LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
-              LTE_MAC_MainConfig_t    *mac_MainConfig  = NULL;
-              for (i = 0; i< 8; i++){
-                DRB2LCHAN[i] = 0;
+        case LTE_DL_DCCH_MessageType__c1_PR_NOTHING:
+          LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n");
+          return 0;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
+          LOG_I(F1AP,"Received NAS DL Information Transfer\n");
+          break;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
+          LOG_I(F1AP,"Received NAS sfbParametersResponseCDMA2000\n");
+          break;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
+          LOG_I(F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n");
+          break;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
+          LOG_I(F1AP,"Received NAS mobilityFromEUTRACommand\n");
+          break;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
+          // handle RRCConnectionReconfiguration
+          LOG_I(F1AP,
+                "Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n",
+                du_ue_f1ap_id,
+                f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
+          LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
+
+          if (rrcConnectionReconfiguration->criticalExtensions.present == LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
+            if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.present ==
+                LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8) {
+              LTE_RRCConnectionReconfiguration_r8_IEs_t *rrcConnectionReconfiguration_r8 =
+                &rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8;
+
+              if (rrcConnectionReconfiguration_r8->mobilityControlInfo) {
+                LOG_I(F1AP, "Mobility Control Information is present\n");
+                AssertFatal(1==0,"Can't handle this yet in DU\n");
               }
-              if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig)
-                mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
-              LTE_MeasGapConfig_t     *measGapConfig   = NULL;
-              struct LTE_PhysicalConfigDedicated* physicalConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->physicalConfigDedicated;
-              rrc_rlc_config_asn1_req(
-                &ctxt,
-                SRB_configList, // NULL,  //LG-RK 14/05/2014 SRB_configList,
-                DRB_configList,
-                DRB_ReleaseList
-      #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                , (LTE_PMCH_InfoList_r9_t *) NULL
-                , 0, 0
-      #endif
+
+              if (rrcConnectionReconfiguration_r8->measConfig != NULL) {
+                LOG_I(F1AP, "Measurement Configuration is present\n");
+              }
+
+              if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
+                LOG_I(F1AP, "Radio Resource Configuration is present\n");
+                uint8_t DRB2LCHAN[8];
+                long drb_id;
+                int i;
+                LTE_DRB_ToAddModList_t  *DRB_configList  = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToAddModList;
+                LTE_SRB_ToAddModList_t  *SRB_configList  = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
+                LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
+                LTE_MAC_MainConfig_t    *mac_MainConfig  = NULL;
+
+                for (i = 0; i< 8; i++) {
+                  DRB2LCHAN[i] = 0;
+                }
+
+                if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig)
+                  mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
+
+                LTE_MeasGapConfig_t     *measGapConfig   = NULL;
+                struct LTE_PhysicalConfigDedicated *physicalConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->physicalConfigDedicated;
+                rrc_rlc_config_asn1_req(
+                  &ctxt,
+                  SRB_configList, // NULL,  //LG-RK 14/05/2014 SRB_configList,
+                  DRB_configList,
+                  DRB_ReleaseList, (LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
                 );
 
-              if (SRB_configList != NULL) {
-                for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) {
-                  if (SRB_configList->list.array[i]->srb_Identity == 1 ){
-                    ue_context_p->ue_context.Srb1.Active=1;
+                if (SRB_configList != NULL) {
+                  for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) {
+                    if (SRB_configList->list.array[i]->srb_Identity == 1 ) {
+                      ue_context_p->ue_context.Srb1.Active=1;
+                    } else if (SRB_configList->list.array[i]->srb_Identity == 2 )  {
+                      ue_context_p->ue_context.Srb2.Active=1;
+                      ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2;
+                      LOG_I(F1AP, "[DU %d] SRB2 is now active\n",ctxt.module_id);
+                    } else {
+                      LOG_W(F1AP, "[DU %d] invalide SRB identity %ld\n",ctxt.module_id,
+                            SRB_configList->list.array[i]->srb_Identity);
+                    }
                   }
-                  else if (SRB_configList->list.array[i]->srb_Identity == 2 )  {
-                    ue_context_p->ue_context.Srb2.Active=1;
-                    ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2;
-                    LOG_I(F1AP, "[DU %d] SRB2 is now active\n",ctxt.module_id);
-                  } else {
-                    LOG_W(F1AP, "[DU %d] invalide SRB identity %ld\n",ctxt.module_id,
-                   SRB_configList->list.array[i]->srb_Identity);
+                }
+
+                if (DRB_configList != NULL) {
+                  for (i = 0; i < DRB_configList->list.count; i++) {  // num max DRB (11-3-8)
+                    if (DRB_configList->list.array[i]) {
+                      drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
+                      LOG_I(F1AP,
+                            "[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n",
+                            ctxt.module_id,
+                            ctxt.rnti,
+                            (int)DRB_configList->list.array[i]->drb_Identity,
+                            (int)*DRB_configList->list.array[i]->logicalChannelIdentity);
+
+                      if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
+                        ue_context_p->ue_context.DRB_active[drb_id] = 1;
+
+                        if (DRB_configList->list.array[i]->logicalChannelIdentity) {
+                          DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
+                        }
+
+                        rrc_mac_config_req_eNB(
+                          ctxt.module_id,
+                          0,0,0,0,0,0, 0,
+                          ue_context_p->ue_context.rnti,
+                          (LTE_BCCH_BCH_Message_t *) NULL,
+                          (LTE_RadioResourceConfigCommonSIB_t *) NULL,
+                          (LTE_RadioResourceConfigCommonSIB_t *) NULL,
+                          physicalConfigDedicated,
+                          (LTE_SCellToAddMod_r10_t *)NULL,
+                          (LTE_MeasObjectToAddMod_t **) NULL,
+                          mac_MainConfig,
+                          DRB2LCHAN[i],
+                          DRB_configList->list.array[i]->logicalChannelConfig,
+                          measGapConfig,
+                          (LTE_TDD_Config_t *) NULL,
+                          NULL,
+                          (LTE_SchedulingInfoList_t *) NULL,
+                          0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL, 0,
+                          (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
+                          (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+                          0,
+                          (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                          (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                          (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                          (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                          (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                        );
+                      }
+                    } else {        // remove LCHAN from MAC/PHY
+                      AssertFatal(1==0,"Can't handle this yet in DU\n");
+                    }
                   }
                 }
               }
+            }
+          }
 
-              if (DRB_configList != NULL) {
-                for (i = 0; i < DRB_configList->list.count; i++) {  // num max DRB (11-3-8)
-                  if (DRB_configList->list.array[i]) {
-                    drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
-                    LOG_I(F1AP,
-                          "[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n",
-                          ctxt.module_id,
-                          ctxt.rnti,
-                          (int)DRB_configList->list.array[i]->drb_Identity,
-                          (int)*DRB_configList->list.array[i]->logicalChannelIdentity);
+          break;
 
-                  if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
-                    ue_context_p->ue_context.DRB_active[drb_id] = 1;
+        case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
+          // handle RRCConnectionRelease
+          LOG_I(F1AP, "Received RRCConnectionRelease\n");
+          break;
 
-                    if (DRB_configList->list.array[i]->logicalChannelIdentity) {
-                      DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
-                    }
+        case LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand:
+          LOG_I(F1AP, "Received securityModeCommand\n");
+          break;
 
-                    rrc_mac_config_req_eNB(
-                      ctxt.module_id,
-                      0,0,0,0,0,0,
-        #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                   0,
-        #endif
-                   ue_context_p->ue_context.rnti,
-                   (LTE_BCCH_BCH_Message_t *) NULL,
-                   (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-        #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                   (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-        #endif
-                   physicalConfigDedicated,
-        #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                   (LTE_SCellToAddMod_r10_t *)NULL,
-                   //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-        #endif
-                   (LTE_MeasObjectToAddMod_t **) NULL,
-                   mac_MainConfig,
-                   DRB2LCHAN[i],
-                   DRB_configList->list.array[i]->logicalChannelConfig,
-                   measGapConfig,
-                   (LTE_TDD_Config_t *) NULL,
-                   NULL,
-                   (LTE_SchedulingInfoList_t *) NULL,
-                   0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
-        #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                   , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
-        #endif
-        #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                   ,
-                   (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-        #endif
-	#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                         ,
-                         0,
-                         (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                         (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                         (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                         (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                         (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-        #endif
-                   );
-                  }
+        case LTE_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
+          LOG_I(F1AP, "Received ueCapabilityEnquiry\n");
+          break;
 
-                } else {        // remove LCHAN from MAC/PHY
-                  AssertFatal(1==0,"Can't handle this yet in DU\n");  
-                } 
-        	     }
-        	   }
-           }
-         }
-       }
-	    break;
-      case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
-  	    // handle RRCConnectionRelease
-        LOG_I(F1AP, "Received RRCConnectionRelease\n");
-  	    break;
-      case LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand:
-        LOG_I(F1AP, "Received securityModeCommand\n");
-          break; 
-      case LTE_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
-        LOG_I(F1AP, "Received ueCapabilityEnquiry\n");
+        case LTE_DL_DCCH_MessageType__c1_PR_counterCheck:
+        case LTE_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
+        case LTE_DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
+        case LTE_DL_DCCH_MessageType__c1_PR_spare1:
+        case LTE_DL_DCCH_MessageType__c1_PR_spare2:
+        case LTE_DL_DCCH_MessageType__c1_PR_spare3:
           break;
-      case LTE_DL_DCCH_MessageType__c1_PR_counterCheck:
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-      case LTE_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
-      case LTE_DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
-  #endif
-      case LTE_DL_DCCH_MessageType__c1_PR_spare1:
-      case LTE_DL_DCCH_MessageType__c1_PR_spare2:
-      case LTE_DL_DCCH_MessageType__c1_PR_spare3:
-  #if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-      case LTE_DL_DCCH_MessageType__c1_PR_spare4:
-  #endif
-  	    break;
-      case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
-        LOG_I(F1AP, "Received ueInformationRequest_r9\n");
-        break;
-      case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13:
-        LOG_I(F1AP, "Received rrcConnectionResume_r13\n");
-	   } 
-	 }	
-  }
-  else if (srb_id == 2) {
-    
+
+        case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
+          LOG_I(F1AP, "Received ueInformationRequest_r9\n");
+          break;
+
+        case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13:
+          LOG_I(F1AP, "Received rrcConnectionResume_r13\n");
+      }
+    }
+  } else if (srb_id == 2) {
   }
 
   LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
   rlc_op_status_t    rlc_status;
   boolean_t          ret             = TRUE;
-  mem_block_t       *pdcp_pdu_p      = NULL; 
+  mem_block_t       *pdcp_pdu_p      = NULL;
   pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
 
   //LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
@@ -552,75 +505,67 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
   //for (int i=0;i<rrc_dl_sdu_len;i++) printf("%2x ",pdcp_pdu_p->data[i]);
   //printf("\n");
 
-
   if (pdcp_pdu_p != NULL) {
     memset(pdcp_pdu_p->data, 0, rrc_dl_sdu_len);
     memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len);
-      rlc_status = rlc_data_req(&ctxt
-                                , 1
-                                , MBMS_FLAG_NO
-                                , srb_id
-                                , 0
-                                , 0
-                                , rrc_dl_sdu_len
-                                , pdcp_pdu_p
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,NULL
-                                ,NULL
-#endif
-                                );
-      switch (rlc_status) {
-        case RLC_OP_STATUS_OK:
-          //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
-          ret=TRUE;
-          break;
+    rlc_status = rlc_data_req(&ctxt
+                              , 1
+                              , MBMS_FLAG_NO
+                              , srb_id
+                              , 0
+                              , 0
+                              , rrc_dl_sdu_len
+                              , pdcp_pdu_p
+                              ,NULL
+                              ,NULL
+                             );
+
+    switch (rlc_status) {
+      case RLC_OP_STATUS_OK:
+        //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
+        ret=TRUE;
+        break;
 
-        case RLC_OP_STATUS_BAD_PARAMETER:
-          LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
-          ret= FALSE;
-          break;
+      case RLC_OP_STATUS_BAD_PARAMETER:
+        LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
+        ret= FALSE;
+        break;
 
-        case RLC_OP_STATUS_INTERNAL_ERROR:
-          LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
-          ret= FALSE;
-          break;
+      case RLC_OP_STATUS_INTERNAL_ERROR:
+        LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
+        ret= FALSE;
+        break;
 
-        case RLC_OP_STATUS_OUT_OF_RESSOURCES:
-          LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
-          ret= FALSE;
-          break;
+      case RLC_OP_STATUS_OUT_OF_RESSOURCES:
+        LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
+        ret= FALSE;
+        break;
+
+      default:
+        LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
+        ret= FALSE;
+        break;
+    } // switch case
+
+    return ret;
+  } // if pdcp_pdu_p
 
-        default:
-          LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
-          ret= FALSE;
-          break;
-      } // switch case
-      return ret; 
-    } // if pdcp_pdu_p
-  
   return 0;
-  
 }
 
 int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg) {
   const rnti_t rnti = msg->rnti;
-
   F1AP_F1AP_PDU_t                pdu;
   F1AP_ULRRCMessageTransfer_t    *out;
   F1AP_ULRRCMessageTransferIEs_t *ie;
-
   uint8_t *buffer = NULL;
   uint32_t len;
-
-
   LOG_I(F1AP, "[DU %d] %s: size %d UE RNTI %x in SRB %d\n",
         instance, __func__, msg->rrc_container_length, rnti, msg->srb_id);
-
   //LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length);
   //for (int i = 0;i < msg->rrc_container_length; i++)
   //  printf("%02x ", msg->rrc_container[i]);
   //printf("\n");
-
   /* Create */
   /* 0. Message Type */
   memset(&pdu, 0, sizeof(pdu));
@@ -630,18 +575,14 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
   pdu.choice.initiatingMessage->criticality   = F1AP_Criticality_ignore;
   pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer;
   out = &pdu.choice.initiatingMessage->value.choice.ULRRCMessageTransfer;
-  
   /* mandatory */
   /* c1. GNB_CU_UE_F1AP_ID */
   ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
   ie->id                             = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
   ie->criticality                    = F1AP_Criticality_reject;
   ie->value.present                  = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
-
   ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
-
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
@@ -650,7 +591,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
   ie->value.present                  = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
   ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c3. SRBID */
   ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t));
@@ -659,7 +599,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
   ie->value.present                 = F1AP_ULRRCMessageTransferIEs__value_PR_SRBID;
   ie->value.choice.SRBID            = msg->srb_id;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   // issue in here
   /* mandatory */
   /* c4. RRCContainer */
@@ -673,95 +612,90 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
   if (msg->srb_id == 1 || msg->srb_id == 2) {
-    struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], rnti);
-
-   
-    LTE_UL_DCCH_Message_t* ul_dcch_msg=NULL;
+    struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], rnti);
+    LTE_UL_DCCH_Message_t *ul_dcch_msg=NULL;
     asn_dec_rval_t dec_rval;
     dec_rval = uper_decode(NULL,
-         &asn_DEF_LTE_UL_DCCH_Message,
-         (void**)&ul_dcch_msg,
-         &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
-         msg->rrc_container_length, 0, 0);
-    
-    if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) 
+                           &asn_DEF_LTE_UL_DCCH_Message,
+                           (void **)&ul_dcch_msg,
+                           &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
+                           msg->rrc_container_length, 0, 0);
+
+    if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0))
       LOG_E(F1AP, " Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed);
     else
       LOG_I(F1AP, "Received message: present %d and c1 present %d\n",
             ul_dcch_msg->message.present, ul_dcch_msg->message.choice.c1.present);
 
     if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) {
-
       switch (ul_dcch_msg->message.choice.c1.present) {
-      case LTE_UL_DCCH_MessageType__c1_PR_NOTHING:   /* No components present */
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_NOTHING:   /* No components present */
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_csfbParametersRequestCDMA2000:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_csfbParametersRequestCDMA2000:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_measurementReport:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_measurementReport:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete:
-        LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n");
-       if(!ue_context_p){
-          LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti);
-        }else {
-          LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti);
-          ue_context_p->ue_context.Status = RRC_CONNECTED;
-        }
+        case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete:
+          LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n");
 
-        break;
-      case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
-        LOG_I(F1AP, "[MSG] RRC securityModeComplete \n");
-        break;
+          if(!ue_context_p) {
+            LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti);
+          } else {
+            LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti);
+            ue_context_p->ue_context.Status = RRC_CONNECTED;
+          }
 
-      case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure:
-        break;
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
-        LOG_I(F1AP, "[MSG] RRC ueCapabilityInformation \n");
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
+          LOG_I(F1AP, "[MSG] RRC securityModeComplete \n");
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
-        LOG_I(F1AP,"[MSG] RRC UL Information Transfer \n");
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
+          LOG_I(F1AP, "[MSG] RRC ueCapabilityInformation \n");
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer:
+          break;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
+        case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
+          LOG_I(F1AP,"[MSG] RRC UL Information Transfer \n");
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
-        break;
-      case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9:
-       break;
-#endif
+        case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse:
+          break;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-      case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
-        break;
+        case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
-       break;
+        case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9:
+          break;
 
-      case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
-       break;
-#endif
+        case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
+          break;
 
+        case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
+          break;
+
+        case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
+          break;
       }
     }
   }
-    /* encode */
+
+  /* encode */
   if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
     LOG_E(F1AP, "Failed to encode F1 setup request\n");
     return -1;
@@ -774,15 +708,14 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
 
 /*  UL RRC Message Transfer */
 int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
-                                            int             CC_idP,
-                                            int             UE_id,
-                                            rnti_t          rntiP,
-                                            const uint8_t   *sduP,
-                                            sdu_size_t      sdu_lenP) {
+    int             CC_idP,
+    int             UE_id,
+    rnti_t          rntiP,
+    const uint8_t   *sduP,
+    sdu_size_t      sdu_lenP) {
   F1AP_F1AP_PDU_t                       pdu;
   F1AP_InitialULRRCMessageTransfer_t    *out;
   F1AP_InitialULRRCMessageTransferIEs_t *ie;
-
   uint8_t  *buffer;
   uint32_t  len;
   int f1ap_uid = f1ap_add_ue (&f1ap_du_inst[module_idP], module_idP, CC_idP,UE_id, rntiP);
@@ -801,8 +734,6 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
   pdu.choice.initiatingMessage->criticality   = F1AP_Criticality_ignore;
   pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer;
   out = &pdu.choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
-  
-
   /* mandatory */
   /* c1. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
@@ -811,23 +742,19 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
   ie->value.present                  = F1AP_InitialULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
   ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_du_inst[module_idP].f1ap_ue[f1ap_uid].du_ue_f1ap_id;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. NRCGI */
   ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
   ie->id                             = F1AP_ProtocolIE_ID_id_NRCGI;
   ie->criticality                    = F1AP_Criticality_reject;
   ie->value.present                  = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
-
   F1AP_NRCGI_t nRCGI;
   memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
   MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[0], f1ap_du_data->mnc[0], f1ap_du_data->mnc_digit_length[0],
-                                         &nRCGI.pLMN_Identity);
+                    &nRCGI.pLMN_Identity);
   NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
   ie->value.choice.NRCGI = nRCGI;
-
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c3. C_RNTI */  // 16
   ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
@@ -836,7 +763,6 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
   ie->value.present                  = F1AP_InitialULRRCMessageTransferIEs__value_PR_C_RNTI;
   C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c4. RRCContainer */
   ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t));
@@ -854,32 +780,36 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
     ie->criticality                    = F1AP_Criticality_reject;
     ie->value.present                  = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
     OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, "dummy_val",
-                       strlen("dummy_val"));
+                         strlen("dummy_val"));
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   }
 
-    /* encode */
+  /* encode */
   if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
     LOG_E(F1AP, "Failed to encode F1 setup request\n");
     return -1;
   }
 
+  struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[module_idP]);
+
+  ue_context_p->ue_id_rnti                    = rntiP;
 
-  struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[module_idP]);
-  ue_context_p->ue_id_rnti                    = rntiP; 
   ue_context_p->ue_context.rnti               = rntiP;
+
   ue_context_p->ue_context.random_ue_identity = rntiP;
+
   ue_context_p->ue_context.Srb0.Active        = 1;
+
   RB_INSERT(rrc_ue_tree_s, &RC.rrc[module_idP]->rrc_ue_head, ue_context_p);
+
   du_f1ap_itti_send_sctp_data_req(module_idP, f1ap_du_data->assoc_id, buffer, len,  f1ap_du_data->default_sctp_stream_id);
 
   return 0;
 }
-    
 
-void init_f1ap_du_ue_inst (void) {
 
-   memset(f1ap_du_inst, 0, sizeof(f1ap_du_inst));
+void init_f1ap_du_ue_inst (void) {
+  memset(f1ap_du_inst, 0, sizeof(f1ap_du_inst));
 }
 
 
diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c
index 2997f553c32b803ead2fe9c3fcb8d2ec5fd48be5..b9c79e1f18ac7c941aa5373639bbf983274539da 100644
--- a/openair2/F1AP/f1ap_du_ue_context_management.c
+++ b/openair2/F1AP/f1ap_du_ue_context_management.c
@@ -44,7 +44,7 @@
 // replaces in ie->value.choice.C_RNTI, causing
 // a compile error
 
-#undef C_RNTI 
+#undef C_RNTI
 
 extern f1ap_setup_req_t *f1ap_du_data;
 extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
@@ -53,32 +53,28 @@ extern RAN_CONTEXT_t RC;
 int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t       instance,
                                        uint32_t         assoc_id,
                                        uint32_t         stream,
-                                       F1AP_F1AP_PDU_t *pdu)
-{
+                                       F1AP_F1AP_PDU_t *pdu) {
   MessageDef                      *msg_p; // message to RRC
   F1AP_UEContextSetupRequest_t    *container;
   F1AP_UEContextSetupRequestIEs_t *ie;
   int i;
-
   DevAssert(pdu);
-
   msg_p = itti_alloc_new_message(TASK_DU_F1, F1AP_UE_CONTEXT_SETUP_REQ);
-	f1ap_ue_context_setup_req_t *f1ap_ue_context_setup_req;
-	f1ap_ue_context_setup_req = &F1AP_UE_CONTEXT_SETUP_REQ(msg_p);
-
+  f1ap_ue_context_setup_req_t *f1ap_ue_context_setup_req;
+  f1ap_ue_context_setup_req = &F1AP_UE_CONTEXT_SETUP_REQ(msg_p);
   container = &pdu->choice.initiatingMessage->value.choice.UEContextSetupRequest;
-
   /* GNB_CU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
   f1ap_ue_context_setup_req->gNB_CU_ue_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
-
   /* optional */
   /* GNB_DU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, false);
+
   if (ie) {
     f1ap_ue_context_setup_req->gNB_DU_ue_id = malloc(sizeof(uint32_t));
+
     if (f1ap_ue_context_setup_req->gNB_DU_ue_id)
       *f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
   } else {
@@ -89,24 +85,23 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t       instance,
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_SpCell_ID, true);
   PLMNID_TO_MCC_MNC(&ie->value.choice.NRCGI.pLMN_Identity,
-										f1ap_ue_context_setup_req->mcc,
-										f1ap_ue_context_setup_req->mnc,
+                    f1ap_ue_context_setup_req->mcc,
+                    f1ap_ue_context_setup_req->mnc,
                     f1ap_ue_context_setup_req->mnc_digit_length);
   BIT_STRING_TO_NR_CELL_IDENTITY(&ie->value.choice.NRCGI.nRCellIdentity, f1ap_ue_context_setup_req->nr_cellid);
-
-
   /* ServCellIndex */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_ServCellndex, true);
   f1ap_ue_context_setup_req->servCellIndex = ie->value.choice.ServCellIndex;
-
   /* optional */
   /* CellULConfigured */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_SpCellULConfigured, false);  // SpCellULConfigured
+
   if (ie) {
     /* correct here */
     f1ap_ue_context_setup_req->cellULConfigured = malloc(sizeof(uint32_t));
+
     if (f1ap_ue_context_setup_req->cellULConfigured)
       *f1ap_ue_context_setup_req->cellULConfigured = ie->value.choice.CellULConfigured;
   } else {
@@ -114,39 +109,28 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t       instance,
   }
 
   /* CUtoDURRCInformation */
-
-
   /* Candidate_SpCell_List */
-
-
   /* optional */
   /* DRXCycle */
-
   /* optional */
   /* ResourceCoordinationTransferContainer */
-
-
   /* SCell_ToBeSetup_List */
-
   /* SRBs_ToBeSetup_List */
-
   /* DRBs_ToBeSetup_List */
-
   /* Decode DRBs_ToBeSetup_List */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true);
   f1ap_ue_context_setup_req->drbs_to_be_setup_length = ie->value.choice.DRBs_ToBeSetup_List.list.count;
   f1ap_ue_context_setup_req->drbs_to_be_setup = calloc(f1ap_ue_context_setup_req->drbs_to_be_setup_length,
-                                                       sizeof(f1ap_drb_to_be_setup_t));
+      sizeof(f1ap_drb_to_be_setup_t));
   AssertFatal(f1ap_ue_context_setup_req->drbs_to_be_setup,
               "could not allocate memory for f1ap_ue_context_setup_req->drbs_to_be_setup\n");
+
   for (i = 0; i < f1ap_ue_context_setup_req->drbs_to_be_setup_length; ++i) {
     f1ap_drb_to_be_setup_t *drb_p = &f1ap_ue_context_setup_req->drbs_to_be_setup[i];
     F1AP_DRBs_ToBeSetup_Item_t *drbs_tobesetup_item_p;
     drbs_tobesetup_item_p = &((F1AP_DRBs_ToBeSetup_ItemIEs_t *)ie->value.choice.DRBs_ToBeSetup_List.list.array[i])->value.choice.DRBs_ToBeSetup_Item;
-
     drb_p->drb_id = drbs_tobesetup_item_p->dRBID;
-
     /* TODO in the following, assume only one UP UL TNL is present.
      * this matches/assumes OAI CU implementation, can be up to 2! */
     drb_p->up_ul_tnl_length = 1;
@@ -158,17 +142,17 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t       instance,
     OCTET_STRING_TO_INT32(&ul_up_tnl0->gTP_TEID, drb_p->up_ul_tnl[0].gtp_teid);
 
     switch (drbs_tobesetup_item_p->rLCMode) {
-    case F1AP_RLCMode_rlc_am:
-      drb_p->rlc_mode = RLC_MODE_AM;
-      break;
-    default:
-      drb_p->rlc_mode = RLC_MODE_TM;
-      break;
+      case F1AP_RLCMode_rlc_am:
+        drb_p->rlc_mode = RLC_MODE_AM;
+        break;
+
+      default:
+        drb_p->rlc_mode = RLC_MODE_TM;
+        break;
     }
   }
 
   AssertFatal(0, "check configuration, send to appropriate handler\n");
-
   return 0;
 }
 
@@ -177,13 +161,10 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   F1AP_F1AP_PDU_t                  pdu;
   F1AP_UEContextSetupResponse_t    *out;
   F1AP_UEContextSetupResponseIEs_t *ie;
-
   uint8_t  *buffer;
   uint32_t  len;
   int       i = 0, j = 0;
-
   rnti_t    rntiP;  // note: need get value
-
   /* Create */
   /* 0. Message Type */
   memset(&pdu, 0, sizeof(pdu));
@@ -193,7 +174,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   pdu.choice.successfulOutcome->criticality   = F1AP_Criticality_reject;
   pdu.choice.successfulOutcome->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextSetupResponse;
   out = &pdu.choice.successfulOutcome->value.choice.UEContextSetupResponse;
-
   /* mandatory */
   /* c1. GNB_CU_UE_F1AP_ID */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -202,7 +182,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   ie->value.present                  = F1AP_UEContextSetupResponseIEs__value_PR_GNB_CU_UE_F1AP_ID;
   ie->value.choice.GNB_CU_UE_F1AP_ID = 126L;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -211,7 +190,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   ie->value.present                  = F1AP_UEContextSetupResponseIEs__value_PR_GNB_DU_UE_F1AP_ID;
   ie->value.choice.GNB_DU_UE_F1AP_ID = 651L;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c3. DUtoCURRCInformation */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -222,12 +200,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
     /* cellGroupConfig */
     OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCInformation.cellGroupConfig, "asdsa",
                          strlen("asdsa"));
+
     /* OPTIONAL */
     /* measGapConfig */
     if (0) {
       ie->value.choice.DUtoCURRCInformation.measGapConfig = (F1AP_MeasGapConfig_t *)calloc(1, sizeof(F1AP_MeasGapConfig_t));
       OCTET_STRING_fromBuf( ie->value.choice.DUtoCURRCInformation.measGapConfig, "asdsa",
-                           strlen("asdsa"));
+                            strlen("asdsa"));
     }
 
     /* OPTIONAL */
@@ -235,7 +214,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
     if (0) {
       ie->value.choice.DUtoCURRCInformation.requestedP_MaxFR1 = (OCTET_STRING_t *)calloc(1, sizeof(OCTET_STRING_t));
       OCTET_STRING_fromBuf( ie->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, "asdsa",
-                           strlen("asdsa"));
+                            strlen("asdsa"));
     }
 
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
@@ -285,56 +264,51 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   for (i=0;
        i<1;
        i++) {
-     //
-     F1AP_DRBs_Setup_ItemIEs_t *drbs_setup_item_ies;
-     drbs_setup_item_ies = (F1AP_DRBs_Setup_ItemIEs_t *)calloc(1, sizeof(F1AP_DRBs_Setup_ItemIEs_t));
-     drbs_setup_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_Setup_Item;
-     drbs_setup_item_ies->criticality   = F1AP_Criticality_ignore;
-     drbs_setup_item_ies->value.present = F1AP_SRBs_FailedToBeSetup_ItemIEs__value_PR_SRBs_FailedToBeSetup_Item;
-
-     /* 7.1 DRBs_Setup_Item */
-     F1AP_DRBs_Setup_Item_t drbs_setup_item;
-     memset((void *)&drbs_setup_item, 0, sizeof(F1AP_DRBs_Setup_Item_t));
-
-     /* dRBID */
-     drbs_setup_item.dRBID = 12;
-     
-     /* OPTIONAL */
-     /* lCID */
-     //drbs_setup_item.lCID = (F1AP_LCID_t *)calloc(1, sizeof(F1AP_LCID_t));
-     //drbs_setup_item.lCID = 1L;
-
-     for (j=0;
-       j<1;
-       j++) {
-
-       F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
-       dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
-       dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
-       
-       /* gTPTunnel */
-       F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
-       {
-         /* transportLayerAddress */
-         TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
-
-         /* gTP_TEID */
-         OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
-                               strlen("1204"));
-         dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
-       }
-       /* ADD */
-       ASN_SEQUENCE_ADD(&drbs_setup_item.dLUPTNLInformation_ToBeSetup_List.list,
-                        dLUPTNLInformation_ToBeSetup_Item);
-     } // for j
-
-     /* ADD */
-     drbs_setup_item_ies->value.choice.DRBs_Setup_Item = drbs_setup_item;
-     ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_Setup_List.list,
+    //
+    F1AP_DRBs_Setup_ItemIEs_t *drbs_setup_item_ies;
+    drbs_setup_item_ies = (F1AP_DRBs_Setup_ItemIEs_t *)calloc(1, sizeof(F1AP_DRBs_Setup_ItemIEs_t));
+    drbs_setup_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_Setup_Item;
+    drbs_setup_item_ies->criticality   = F1AP_Criticality_ignore;
+    drbs_setup_item_ies->value.present = F1AP_SRBs_FailedToBeSetup_ItemIEs__value_PR_SRBs_FailedToBeSetup_Item;
+    /* 7.1 DRBs_Setup_Item */
+    F1AP_DRBs_Setup_Item_t drbs_setup_item;
+    memset((void *)&drbs_setup_item, 0, sizeof(F1AP_DRBs_Setup_Item_t));
+    /* dRBID */
+    drbs_setup_item.dRBID = 12;
+
+    /* OPTIONAL */
+    /* lCID */
+    //drbs_setup_item.lCID = (F1AP_LCID_t *)calloc(1, sizeof(F1AP_LCID_t));
+    //drbs_setup_item.lCID = 1L;
+
+    for (j=0;
+         j<1;
+         j++) {
+      F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
+      dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
+      dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
+      /* gTPTunnel */
+      F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
+      {
+        /* transportLayerAddress */
+        TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
+        /* gTP_TEID */
+        OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
+                             strlen("1204"));
+        dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
+      }
+      /* ADD */
+      ASN_SEQUENCE_ADD(&drbs_setup_item.dLUPTNLInformation_ToBeSetup_List.list,
+                       dLUPTNLInformation_ToBeSetup_Item);
+    } // for j
+
+    /* ADD */
+    drbs_setup_item_ies->value.choice.DRBs_Setup_Item = drbs_setup_item;
+    ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_Setup_List.list,
                      drbs_setup_item_ies);
   } // for i
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c8. SRBs_FailedToBeSetup_List */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -345,52 +319,51 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   for (i=0;
        i<1;
        i++) {
-      //
-      F1AP_SRBs_FailedToBeSetup_ItemIEs_t *srbs_failedToBeSetup_item_ies;
-      srbs_failedToBeSetup_item_ies = (F1AP_SRBs_FailedToBeSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_SRBs_FailedToBeSetup_ItemIEs_t));
-      srbs_failedToBeSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_Item;
-      srbs_failedToBeSetup_item_ies->criticality   = F1AP_Criticality_ignore;
-      srbs_failedToBeSetup_item_ies->value.present = F1AP_SRBs_FailedToBeSetup_ItemIEs__value_PR_SRBs_FailedToBeSetup_Item;
+    //
+    F1AP_SRBs_FailedToBeSetup_ItemIEs_t *srbs_failedToBeSetup_item_ies;
+    srbs_failedToBeSetup_item_ies = (F1AP_SRBs_FailedToBeSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_SRBs_FailedToBeSetup_ItemIEs_t));
+    srbs_failedToBeSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_Item;
+    srbs_failedToBeSetup_item_ies->criticality   = F1AP_Criticality_ignore;
+    srbs_failedToBeSetup_item_ies->value.present = F1AP_SRBs_FailedToBeSetup_ItemIEs__value_PR_SRBs_FailedToBeSetup_Item;
+    /* 8.1 SRBs_Setup_Item */
+    F1AP_SRBs_FailedToBeSetup_Item_t srbs_failedToBeSetup_item;
+    memset((void *)&srbs_failedToBeSetup_item, 0, sizeof(F1AP_SRBs_FailedToBeSetup_Item_t));
+    /* sRBID */
+    srbs_failedToBeSetup_item.sRBID = 13L;
+    /* cause */
+    srbs_failedToBeSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+    // dummy value
+    srbs_failedToBeSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
 
-      /* 8.1 SRBs_Setup_Item */
-      F1AP_SRBs_FailedToBeSetup_Item_t srbs_failedToBeSetup_item;
-      memset((void *)&srbs_failedToBeSetup_item, 0, sizeof(F1AP_SRBs_FailedToBeSetup_Item_t));
+    switch(srbs_failedToBeSetup_item.cause->present) {
+      case F1AP_Cause_PR_radioNetwork:
+        srbs_failedToBeSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
+        break;
 
-      /* sRBID */
-      srbs_failedToBeSetup_item.sRBID = 13L;
+      case F1AP_Cause_PR_transport:
+        srbs_failedToBeSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
+        break;
 
-      /* cause */
-      srbs_failedToBeSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+      case F1AP_Cause_PR_protocol:
+        srbs_failedToBeSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
+        break;
 
-      // dummy value
-      srbs_failedToBeSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
+      case F1AP_Cause_PR_misc:
+        srbs_failedToBeSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
+        break;
 
-      switch(srbs_failedToBeSetup_item.cause->present)
-      {
-        case F1AP_Cause_PR_radioNetwork:
-          srbs_failedToBeSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
-          break;
-        case F1AP_Cause_PR_transport:
-          srbs_failedToBeSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
-          break;
-        case F1AP_Cause_PR_protocol:
-          srbs_failedToBeSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
-          break;
-        case F1AP_Cause_PR_misc:
-          srbs_failedToBeSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
-          break;
-        case F1AP_Cause_PR_NOTHING:
-        default:
-          break;
-      } // switch
+      case F1AP_Cause_PR_NOTHING:
+      default:
+        break;
+    } // switch
 
-      /* ADD */
-      srbs_failedToBeSetup_item_ies->value.choice.SRBs_FailedToBeSetup_Item = srbs_failedToBeSetup_item;
-      ASN_SEQUENCE_ADD(&ie->value.choice.SRBs_FailedToBeSetup_List.list,
-                       srbs_failedToBeSetup_item_ies);
+    /* ADD */
+    srbs_failedToBeSetup_item_ies->value.choice.SRBs_FailedToBeSetup_Item = srbs_failedToBeSetup_item;
+    ASN_SEQUENCE_ADD(&ie->value.choice.SRBs_FailedToBeSetup_List.list,
+                     srbs_failedToBeSetup_item_ies);
   } // for i
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /*  */
   /* c9. DRBs_FailedToBeSetup_List */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -401,52 +374,51 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   for (i=0;
        i<1;
        i++) {
-      //
-      F1AP_DRBs_FailedToBeSetup_ItemIEs_t *drbs_failedToBeSetup_item_ies;
-      drbs_failedToBeSetup_item_ies = (F1AP_DRBs_FailedToBeSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_DRBs_FailedToBeSetup_ItemIEs_t));
-      drbs_failedToBeSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_Item;
-      drbs_failedToBeSetup_item_ies->criticality   = F1AP_Criticality_ignore;
-      drbs_failedToBeSetup_item_ies->value.present = F1AP_DRBs_FailedToBeSetup_ItemIEs__value_PR_DRBs_FailedToBeSetup_Item;
+    //
+    F1AP_DRBs_FailedToBeSetup_ItemIEs_t *drbs_failedToBeSetup_item_ies;
+    drbs_failedToBeSetup_item_ies = (F1AP_DRBs_FailedToBeSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_DRBs_FailedToBeSetup_ItemIEs_t));
+    drbs_failedToBeSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_Item;
+    drbs_failedToBeSetup_item_ies->criticality   = F1AP_Criticality_ignore;
+    drbs_failedToBeSetup_item_ies->value.present = F1AP_DRBs_FailedToBeSetup_ItemIEs__value_PR_DRBs_FailedToBeSetup_Item;
+    /* 9.1 DRBs_Setup_Item */
+    F1AP_DRBs_FailedToBeSetup_Item_t drbs_failedToBeSetup_item;
+    memset((void *)&drbs_failedToBeSetup_item, 0, sizeof(F1AP_DRBs_FailedToBeSetup_Item_t));
+    /* dRBID */
+    drbs_failedToBeSetup_item.dRBID = 14;
+    /* cause */
+    drbs_failedToBeSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+    // dummy value
+    drbs_failedToBeSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
 
-      /* 9.1 DRBs_Setup_Item */
-      F1AP_DRBs_FailedToBeSetup_Item_t drbs_failedToBeSetup_item;
-      memset((void *)&drbs_failedToBeSetup_item, 0, sizeof(F1AP_DRBs_FailedToBeSetup_Item_t));
+    switch(drbs_failedToBeSetup_item.cause->present) {
+      case F1AP_Cause_PR_radioNetwork:
+        drbs_failedToBeSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
+        break;
 
-      /* dRBID */
-      drbs_failedToBeSetup_item.dRBID = 14;
+      case F1AP_Cause_PR_transport:
+        drbs_failedToBeSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
+        break;
 
-      /* cause */
-      drbs_failedToBeSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+      case F1AP_Cause_PR_protocol:
+        drbs_failedToBeSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
+        break;
 
-      // dummy value
-      drbs_failedToBeSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
+      case F1AP_Cause_PR_misc:
+        drbs_failedToBeSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
+        break;
 
-      switch(drbs_failedToBeSetup_item.cause->present)
-      {
-        case F1AP_Cause_PR_radioNetwork:
-          drbs_failedToBeSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
-          break;
-        case F1AP_Cause_PR_transport:
-          drbs_failedToBeSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
-          break;
-        case F1AP_Cause_PR_protocol:
-          drbs_failedToBeSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
-          break;
-        case F1AP_Cause_PR_misc:
-          drbs_failedToBeSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
-          break;
-        case F1AP_Cause_PR_NOTHING:
-        default:
-          break;
-      } // switch
+      case F1AP_Cause_PR_NOTHING:
+      default:
+        break;
+    } // switch
 
-      /* ADD */
-      drbs_failedToBeSetup_item_ies->value.choice.DRBs_FailedToBeSetup_Item = drbs_failedToBeSetup_item;
-      ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeSetup_List.list,
+    /* ADD */
+    drbs_failedToBeSetup_item_ies->value.choice.DRBs_FailedToBeSetup_Item = drbs_failedToBeSetup_item;
+    ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeSetup_List.list,
                      drbs_failedToBeSetup_item_ies);
   } // for i
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   // /*  */
   /* c10. SCell_FailedtoSetup_List */
   ie = (F1AP_UEContextSetupResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupResponseIEs_t));
@@ -457,58 +429,55 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
   for (i=0;
        i<1;
        i++) {
-      //
-      F1AP_SCell_FailedtoSetup_ItemIEs_t *sCell_FailedtoSetup_item_ies;
-      sCell_FailedtoSetup_item_ies = (F1AP_SCell_FailedtoSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_SCell_FailedtoSetup_ItemIEs_t));
-      sCell_FailedtoSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_Item;
-      sCell_FailedtoSetup_item_ies->criticality   = F1AP_Criticality_ignore;
-      sCell_FailedtoSetup_item_ies->value.present = F1AP_SCell_FailedtoSetup_ItemIEs__value_PR_SCell_FailedtoSetup_Item;
-
-      /* 10.1 DRBs_Setup_Item */
-      F1AP_SCell_FailedtoSetup_Item_t sCell_FailedtoSetup_item;
-      memset((void *)&sCell_FailedtoSetup_item, 0, sizeof(F1AP_SCell_FailedtoSetup_Item_t));
-
-      /* sCell_ID */
-      F1AP_NRCGI_t nRCGI;  // issue here
-      memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
-      MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
+    //
+    F1AP_SCell_FailedtoSetup_ItemIEs_t *sCell_FailedtoSetup_item_ies;
+    sCell_FailedtoSetup_item_ies = (F1AP_SCell_FailedtoSetup_ItemIEs_t *)calloc(1, sizeof(F1AP_SCell_FailedtoSetup_ItemIEs_t));
+    sCell_FailedtoSetup_item_ies->id            = F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_Item;
+    sCell_FailedtoSetup_item_ies->criticality   = F1AP_Criticality_ignore;
+    sCell_FailedtoSetup_item_ies->value.present = F1AP_SCell_FailedtoSetup_ItemIEs__value_PR_SCell_FailedtoSetup_Item;
+    /* 10.1 DRBs_Setup_Item */
+    F1AP_SCell_FailedtoSetup_Item_t sCell_FailedtoSetup_item;
+    memset((void *)&sCell_FailedtoSetup_item, 0, sizeof(F1AP_SCell_FailedtoSetup_Item_t));
+    /* sCell_ID */
+    F1AP_NRCGI_t nRCGI;  // issue here
+    memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
+    MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
+    NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
+    sCell_FailedtoSetup_item.sCell_ID = nRCGI;
+    /* cause */
+    sCell_FailedtoSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+    // dummy value
+    sCell_FailedtoSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
 
-      NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
+    switch(sCell_FailedtoSetup_item.cause->present) {
+      case F1AP_Cause_PR_radioNetwork:
+        sCell_FailedtoSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
+        break;
 
-      sCell_FailedtoSetup_item.sCell_ID = nRCGI;
+      case F1AP_Cause_PR_transport:
+        sCell_FailedtoSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
+        break;
 
-      /* cause */
-      sCell_FailedtoSetup_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+      case F1AP_Cause_PR_protocol:
+        sCell_FailedtoSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
+        break;
 
-      // dummy value
-      sCell_FailedtoSetup_item.cause->present = F1AP_Cause_PR_radioNetwork;
+      case F1AP_Cause_PR_misc:
+        sCell_FailedtoSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
+        break;
 
-      switch(sCell_FailedtoSetup_item.cause->present)
-      {
-        case F1AP_Cause_PR_radioNetwork:
-          sCell_FailedtoSetup_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unspecified;
-          break;
-        case F1AP_Cause_PR_transport:
-          sCell_FailedtoSetup_item.cause->choice.transport = F1AP_CauseTransport_unspecified;
-          break;
-        case F1AP_Cause_PR_protocol:
-          sCell_FailedtoSetup_item.cause->choice.protocol = F1AP_CauseProtocol_unspecified;
-          break;
-        case F1AP_Cause_PR_misc:
-          sCell_FailedtoSetup_item.cause->choice.misc = F1AP_CauseMisc_unspecified;
-          break;
-        case F1AP_Cause_PR_NOTHING:
-        default:
-          break;
-      } // switch
+      case F1AP_Cause_PR_NOTHING:
+      default:
+        break;
+    } // switch
 
-      /* ADD */
-      sCell_FailedtoSetup_item_ies->value.choice.SCell_FailedtoSetup_Item = sCell_FailedtoSetup_item;
-      ASN_SEQUENCE_ADD(&ie->value.choice.SCell_FailedtoSetup_List.list,
-                      sCell_FailedtoSetup_item_ies);
+    /* ADD */
+    sCell_FailedtoSetup_item_ies->value.choice.SCell_FailedtoSetup_Item = sCell_FailedtoSetup_item;
+    ASN_SEQUENCE_ADD(&ie->value.choice.SCell_FailedtoSetup_List.list,
+                     sCell_FailedtoSetup_item_ies);
   } // for i
+
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
- 
 
   /* Optional */
   /* c11. InactivityMonitoringResponse */
@@ -521,7 +490,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   }
 
-
   /* Optional */
   /* c12. CriticalityDiagnostics */
   if (0) {
@@ -529,23 +497,17 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
     ie->id                             = F1AP_ProtocolIE_ID_id_CriticalityDiagnostics;
     ie->criticality                    = F1AP_Criticality_ignore;
     ie->value.present                  = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics;
-    
     ie->value.choice.CriticalityDiagnostics.procedureCode = (F1AP_ProcedureCode_t *)calloc(1, sizeof(F1AP_ProcedureCode_t));
     *ie->value.choice.CriticalityDiagnostics.procedureCode = F1AP_ProcedureCode_id_UEContextSetup;
-    
     ie->value.choice.CriticalityDiagnostics.triggeringMessage = (F1AP_TriggeringMessage_t *)calloc(1, sizeof(F1AP_TriggeringMessage_t));
     *ie->value.choice.CriticalityDiagnostics.triggeringMessage = F1AP_TriggeringMessage_initiating_message;
-    
     ie->value.choice.CriticalityDiagnostics.procedureCriticality = (F1AP_Criticality_t *)calloc(1, sizeof(F1AP_Criticality_t));
     *ie->value.choice.CriticalityDiagnostics.procedureCriticality = F1AP_Criticality_reject;
-    
     ie->value.choice.CriticalityDiagnostics.transactionID = (F1AP_TransactionID_t *)calloc(1, sizeof(F1AP_TransactionID_t));
     *ie->value.choice.CriticalityDiagnostics.transactionID = 0;
-    
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   }
 
-
   /* encode */
   if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
     LOG_E(F1AP, "Failed to encode F1 setup request\n");
@@ -565,11 +527,9 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   F1AP_F1AP_PDU_t                   pdu;
   F1AP_UEContextReleaseRequest_t    *out;
   F1AP_UEContextReleaseRequestIEs_t *ie;
-
   uint8_t  *buffer;
   uint32_t  len;
   //int       i = 0, j = 0;
-
   /* Create */
   /* 0. Message Type */
   memset(&pdu, 0, sizeof(pdu));
@@ -579,7 +539,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   pdu.choice.initiatingMessage->criticality   = F1AP_Criticality_reject;
   pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest;
   out = &pdu.choice.initiatingMessage->value.choice.UEContextReleaseRequest;
-  
   /* mandatory */
   /* c1. GNB_CU_UE_F1AP_ID */
   ie = (F1AP_UEContextReleaseRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextReleaseRequestIEs_t));
@@ -588,7 +547,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   ie->value.present                  = F1AP_UEContextReleaseRequestIEs__value_PR_GNB_CU_UE_F1AP_ID;
   ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], req->rnti);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_UEContextReleaseRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextReleaseRequestIEs_t));
@@ -597,7 +555,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   ie->value.present                  = F1AP_UEContextReleaseRequestIEs__value_PR_GNB_DU_UE_F1AP_ID;
   ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], req->rnti);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c3. Cause */
   ie = (F1AP_UEContextReleaseRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextReleaseRequestIEs_t));
@@ -605,29 +562,33 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   ie->criticality                    = F1AP_Criticality_ignore;
   ie->value.present                  = F1AP_UEContextReleaseRequestIEs__value_PR_Cause;
 
-  switch (req->cause)
-  {
+  switch (req->cause) {
     case F1AP_CAUSE_RADIO_NETWORK:
       ie->value.choice.Cause.present = F1AP_Cause_PR_radioNetwork;
       ie->value.choice.Cause.choice.radioNetwork = req->cause_value;
       break;
+
     case F1AP_CAUSE_TRANSPORT:
       ie->value.choice.Cause.present = F1AP_Cause_PR_transport;
       ie->value.choice.Cause.choice.transport = req->cause_value;
       break;
+
     case F1AP_CAUSE_PROTOCOL:
       ie->value.choice.Cause.present = F1AP_Cause_PR_protocol;
       ie->value.choice.Cause.choice.protocol = req->cause_value;
       break;
+
     case F1AP_CAUSE_MISC:
       ie->value.choice.Cause.present = F1AP_Cause_PR_misc;
       ie->value.choice.Cause.choice.misc = req->cause_value;
       break;
+
     case F1AP_CAUSE_NOTHING:
     default:
       ie->value.choice.Cause.present = F1AP_Cause_PR_NOTHING;
       break;
   }
+
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
   /* encode */
@@ -637,28 +598,23 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
   }
 
   du_f1ap_itti_send_sctp_data_req(instance,
-      f1ap_du_data->assoc_id,
-      buffer,
-      len,
-      f1ap_du_data->default_sctp_stream_id);
-
+                                  f1ap_du_data->assoc_id,
+                                  buffer,
+                                  len,
+                                  f1ap_du_data->default_sctp_stream_id);
   return 0;
 }
 
 
 int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
-                                         uint32_t         assoc_id,
-                                         uint32_t         stream,
-                                         F1AP_F1AP_PDU_t *pdu) {
-
+    uint32_t         assoc_id,
+    uint32_t         stream,
+    F1AP_F1AP_PDU_t *pdu) {
   F1AP_UEContextReleaseCommand_t *container;
   F1AP_UEContextReleaseCommandIEs_t *ie;
   protocol_ctxt_t ctxt;
-
   DevAssert(pdu);
-
   container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
-
   /* GNB_CU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
@@ -666,17 +622,16 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
   ctxt.module_id = instance;
   ctxt.instance  = instance;
   ctxt.enb_flag  = 1;
-
   /* GNB_DU_UE_F1AP_ID */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
   const rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance],
-                                             ie->value.choice.GNB_DU_UE_F1AP_ID);
+                      ie->value.choice.GNB_DU_UE_F1AP_ID);
   AssertFatal(ctxt.rnti == rnti,
               "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
               rnti, ctxt.rnti);
-
   int UE_out_of_sync = 0;
+
   for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
     if (RC.mac[instance]->UE_list.active[n] == TRUE
         && rnti == UE_RNTI(instance, n)) {
@@ -686,10 +641,10 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
   }
 
   /* We don't need the Cause */
-
   /* Optional RRC Container: if present, send to UE */
   F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
                              F1AP_ProtocolIE_ID_id_RRCContainer, false);
+
   if (ie && !UE_out_of_sync) {
     /* RRC message and UE is reachable, send message */
     const sdu_size_t sdu_len = ie->value.choice.RRCContainer.size;
@@ -697,30 +652,33 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
     pdu_p = get_free_mem_block(sdu_len, __func__);
     memcpy(&pdu_p->data[0], ie->value.choice.RRCContainer.buf, sdu_len);
     rlc_op_status_t rlc_status = rlc_data_req(&ctxt
-                                              , 1
-                                              , MBMS_FLAG_NO
-                                              , 1 // SRB 1 correct?
-                                              , 0
-                                              , 0
-                                              , sdu_len
-                                              , pdu_p
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                              ,NULL
-                                              ,NULL
-#endif
-                                              );
+                                 , 1
+                                 , MBMS_FLAG_NO
+                                 , 1 // SRB 1 correct?
+                                 , 0
+                                 , 0
+                                 , sdu_len
+                                 , pdu_p
+                                 ,NULL
+                                 ,NULL
+                                             );
+
     switch (rlc_status) {
       case RLC_OP_STATUS_OK:
         break;
+
       case RLC_OP_STATUS_BAD_PARAMETER:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
         break;
+
       case RLC_OP_STATUS_INTERNAL_ERROR:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
         break;
+
       case RLC_OP_STATUS_OUT_OF_RESSOURCES:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
         break;
+
       default:
         LOG_W(F1AP, "RLC returned an unknown status code after F1AP placed "
               "the order to send some data (Status Code:%d)\n", rlc_status);
@@ -728,18 +686,22 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
     }
   }
 
-  struct rrc_eNB_ue_context_s* ue_context_p;
+  struct rrc_eNB_ue_context_s *ue_context_p;
+
   ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
+
   if (ue_context_p && !UE_out_of_sync) {
     /* UE exists and is in sync so we start a timer before releasing the
      * connection */
     pthread_mutex_lock(&rrc_release_freelist);
+
     for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
       if (rrc_release_info.RRC_release_ctrl[release_num].flag == 0) {
         if (ue_context_p->ue_context.ue_release_timer_s1 > 0)
           rrc_release_info.RRC_release_ctrl[release_num].flag = 1;
         else
           rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
+
         rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rnti;
         LOG_D(F1AP, "add rrc_release_info RNTI %x\n", ctxt.rnti);
         // TODO: how to provide the correct MUI?
@@ -750,6 +712,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
         break;
       }
     }
+
     pthread_mutex_unlock(&rrc_release_freelist);
     ue_context_p->ue_context.ue_release_timer_s1 = 0;
   } else if (ue_context_p && UE_out_of_sync) {
@@ -758,12 +721,11 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
   } else {
     LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti);
   }
-  
+
   /* TODO send this once the connection has really been released */
   f1ap_ue_context_release_cplt_t cplt;
   cplt.rnti = ctxt.rnti;
   DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
-
   return 0;
 }
 
@@ -773,7 +735,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   F1AP_F1AP_PDU_t                     pdu;
   F1AP_UEContextReleaseComplete_t    *out;
   F1AP_UEContextReleaseCompleteIEs_t *ie;
-
   /* Create */
   /* 0. Message Type */
   memset(&pdu, 0, sizeof(pdu));
@@ -783,7 +744,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   pdu.choice.successfulOutcome->criticality   = F1AP_Criticality_reject;
   pdu.choice.successfulOutcome->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete;
   out = &pdu.choice.successfulOutcome->value.choice.UEContextReleaseComplete;
-  
   /* mandatory */
   /* c1. GNB_CU_UE_F1AP_ID */
   ie = (F1AP_UEContextReleaseCompleteIEs_t *)calloc(1, sizeof(F1AP_UEContextReleaseCompleteIEs_t));
@@ -792,7 +752,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   ie->value.present                  = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_CU_UE_F1AP_ID;
   ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], cplt->rnti);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_UEContextReleaseCompleteIEs_t *)calloc(1, sizeof(F1AP_UEContextReleaseCompleteIEs_t));
@@ -801,7 +760,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   ie->value.present                  = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_DU_UE_F1AP_ID;
   ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], cplt->rnti);
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* optional -> currently not used */
   /* c3. CriticalityDiagnostics */
   //if (0) {
@@ -809,7 +767,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   //  ie->id                             = F1AP_ProtocolIE_ID_id_CriticalityDiagnostics;
   //  ie->criticality                    = F1AP_Criticality_ignore;
   //  ie->value.present                  = F1AP_UEContextReleaseCompleteIEs__value_PR_CriticalityDiagnostics;
-
   //  // dummy value
   //  /* optional */
   //  /* procedureCode */
@@ -817,70 +774,63 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
   //    ie->value.choice.CriticalityDiagnostics.procedureCode = (F1AP_ProcedureCode_t *)calloc(1, sizeof(F1AP_ProcedureCode_t));
   //    ie->value.choice.CriticalityDiagnostics.procedureCode = 0L;
   //  }
-
   //  /* optional */
   //  /* triggeringMessage */
   //  if (0) {
   //    ie->value.choice.CriticalityDiagnostics.triggeringMessage = (F1AP_TriggeringMessage_t *)calloc(1, sizeof(F1AP_TriggeringMessage_t));
   //    ie->value.choice.CriticalityDiagnostics.triggeringMessage = (F1AP_TriggeringMessage_t *)F1AP_TriggeringMessage_successful_outcome;
   //  }
-
   //  /* optional */
   //  /* procedureCriticality */
   //  if (0) {
   //    ie->value.choice.CriticalityDiagnostics.procedureCriticality = (F1AP_Criticality_t *)calloc(1, sizeof(F1AP_Criticality_t));
   //    ie->value.choice.CriticalityDiagnostics.procedureCriticality = F1AP_Criticality_reject;
   //  }
-
   //  /* optional */
   //  /* transactionID */
   //  if (0) {
   //    ie->value.choice.CriticalityDiagnostics.transactionID = (F1AP_TransactionID_t *)calloc(1, sizeof(F1AP_TransactionID_t));
   //    ie->value.choice.CriticalityDiagnostics.transactionID = 0L;
   //  }
-
   //  /* optional */
   //  /* F1AP_CriticalityDiagnostics_IE_List */
   //  if (0) {
   //    for (i=0;
   //         i<0;
   //         i++) {
-
   //        F1AP_CriticalityDiagnostics_IE_Item_t *criticalityDiagnostics_ie_item = (F1AP_CriticalityDiagnostics_IE_Item_t *)calloc(1, sizeof(F1AP_CriticalityDiagnostics_IE_Item_t));;
   //        criticalityDiagnostics_ie_item->iECriticality = F1AP_Criticality_reject;
   //        criticalityDiagnostics_ie_item->iE_ID         = 0L;
   //        criticalityDiagnostics_ie_item->typeOfError   = F1AP_TypeOfError_not_understood;
-
   //        ASN_SEQUENCE_ADD(&ie->value.choice.CriticalityDiagnostics.iEsCriticalityDiagnostics->list,
   //                    criticalityDiagnostics_ie_item);
   //    }
   //  }
   //  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   //}
-
   /* encode */
   uint8_t  *buffer;
   uint32_t  len;
+
   if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
     LOG_E(F1AP, "Failed to encode F1 context release complete\n");
     return -1;
   }
 
   du_f1ap_itti_send_sctp_data_req(instance,
-      f1ap_du_data->assoc_id,
-      buffer,
-      len,
-      f1ap_du_data->default_sctp_stream_id);
-
+                                  f1ap_du_data->assoc_id,
+                                  buffer,
+                                  len,
+                                  f1ap_du_data->default_sctp_stream_id);
   f1ap_remove_ue(&f1ap_du_inst[instance], cplt->rnti);
   return 0;
 }
 
 
 int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t       instance,
-                                              uint32_t         assoc_id,
-                                              uint32_t         stream,
-                                              F1AP_F1AP_PDU_t *pdu) {
+    uint32_t         assoc_id,
+    uint32_t         stream,
+    F1AP_F1AP_PDU_t *pdu) {
   AssertFatal(1==0,"Not implemented yet\n");
 }
 
@@ -889,11 +839,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
   F1AP_F1AP_PDU_t                        pdu;
   F1AP_UEContextModificationResponse_t    *out;
   F1AP_UEContextModificationResponseIEs_t *ie;
-
   uint8_t  *buffer;
   uint32_t  len;
   int       i = 0;
-
   /* Create */
   /* 0. Message Type */
   memset(&pdu, 0, sizeof(pdu));
@@ -903,7 +851,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
   pdu.choice.successfulOutcome->criticality   = F1AP_Criticality_reject;
   pdu.choice.successfulOutcome->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse;
   out = &pdu.choice.successfulOutcome->value.choice.UEContextModificationResponse;
-  
   /* mandatory */
   /* c1. GNB_CU_UE_F1AP_ID */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -912,7 +859,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
   ie->value.present                  = F1AP_UEContextModificationResponseIEs__value_PR_GNB_CU_UE_F1AP_ID;
   ie->value.choice.GNB_CU_UE_F1AP_ID = 126L;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
   /* mandatory */
   /* c2. GNB_DU_UE_F1AP_ID */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -941,19 +887,18 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     ie->id                             = F1AP_ProtocolIE_ID_id_DUtoCURRCInformation;
     ie->criticality                    = F1AP_Criticality_reject;
     ie->value.present                  = F1AP_UEContextModificationResponseIEs__value_PR_DUtoCURRCInformation;
-
     OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCInformation.cellGroupConfig, "asdsa1d32sa1d31asd31as",
-                       strlen("asdsa1d32sa1d31asd31as"));
+                         strlen("asdsa1d32sa1d31asd31as"));
+
     /* OPTIONAL */
     if (1) {
       ie->value.choice.DUtoCURRCInformation.measGapConfig = (F1AP_MeasGapConfig_t *)calloc(1, sizeof(F1AP_MeasGapConfig_t));
       OCTET_STRING_fromBuf( ie->value.choice.DUtoCURRCInformation.measGapConfig, "asdsa1d32sa1d31asd31as",
-                           strlen("asdsa1d32sa1d31asd31as"));
+                            strlen("asdsa1d32sa1d31asd31as"));
       ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     }
   }
 
-
   /* mandatory */
   /* c5. DRBs_SetupMod_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -970,44 +915,37 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     drbs_setupMod_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_SetupMod_Item;
     drbs_setupMod_item_ies->criticality   = F1AP_Criticality_reject;
     drbs_setupMod_item_ies->value.present = F1AP_DRBs_SetupMod_ItemIEs__value_PR_DRBs_SetupMod_Item;
-
     /* 10.1 DRBs_SetupMod_Item */
     F1AP_DRBs_SetupMod_Item_t drbs_setupMod_item;
     memset((void *)&drbs_setupMod_item, 0, sizeof(F1AP_DRBs_SetupMod_Item_t));
-
     /* dRBID */
     drbs_setupMod_item.dRBID = 30L;
-
     /* DLTunnels_SetupMod_List */
     int j = 0;
     int maxnoofDLUPTNLInformation = 1; // 2;
-    for (j=0;
-        j<maxnoofDLUPTNLInformation;
-        j++) {
-        /*  DLTunnels_ToBeSetup_Item */
-        F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
-        dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
-        dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
-        F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
 
-        TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
-
-        OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
-                             strlen("1204"));
-
-        dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
-
-        ASN_SEQUENCE_ADD(&drbs_setupMod_item.dLUPTNLInformation_ToBeSetup_List.list, dLUPTNLInformation_ToBeSetup_Item);
+    for (j=0;
+         j<maxnoofDLUPTNLInformation;
+         j++) {
+      /*  DLTunnels_ToBeSetup_Item */
+      F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
+      dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
+      dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
+      F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
+      TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
+      OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
+                           strlen("1204"));
+      dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
+      ASN_SEQUENCE_ADD(&drbs_setupMod_item.dLUPTNLInformation_ToBeSetup_List.list, dLUPTNLInformation_ToBeSetup_Item);
     }
 
     /* ADD */
     drbs_setupMod_item_ies->value.choice.DRBs_SetupMod_Item = drbs_setupMod_item;
     ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_SetupMod_List.list,
-                   drbs_setupMod_item_ies);
+                     drbs_setupMod_item_ies);
   }
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c6. DRBs_Modified_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -1024,43 +962,37 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     drbs_modified_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_Modified_Item;
     drbs_modified_item_ies->criticality   = F1AP_Criticality_reject;
     drbs_modified_item_ies->value.present = F1AP_DRBs_Modified_ItemIEs__value_PR_DRBs_Modified_Item;
-
     /* 13.1 SRBs_modified_Item */
     F1AP_DRBs_Modified_Item_t drbs_modified_item;
     memset((void *)&drbs_modified_item, 0, sizeof(F1AP_DRBs_Modified_Item_t));
-
     /* dRBID */
     drbs_modified_item.dRBID = 25L;
-
     /* ULTunnels_Modified_List */
     int maxnoofULTunnels = 1; // 2;
     int j = 0;
+
     for (j=0;
          j<maxnoofULTunnels;
          j++) {
       /*  DLTunnels_Modified_Item */
-        F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
-        dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
-        dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
-        F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
-
-        TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
-
-        OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
-                              strlen("1204"));
-
-        dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
-
-        ASN_SEQUENCE_ADD(&drbs_modified_item.dLUPTNLInformation_ToBeSetup_List.list, dLUPTNLInformation_ToBeSetup_Item);
+      F1AP_DLUPTNLInformation_ToBeSetup_Item_t *dLUPTNLInformation_ToBeSetup_Item;
+      dLUPTNLInformation_ToBeSetup_Item = (F1AP_DLUPTNLInformation_ToBeSetup_Item_t *)calloc(1, sizeof(F1AP_DLUPTNLInformation_ToBeSetup_Item_t));
+      dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
+      F1AP_GTPTunnel_t *gTPTunnel = (F1AP_GTPTunnel_t *)calloc(1, sizeof(F1AP_GTPTunnel_t));
+      TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
+      OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
+                           strlen("1204"));
+      dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel = gTPTunnel;
+      ASN_SEQUENCE_ADD(&drbs_modified_item.dLUPTNLInformation_ToBeSetup_List.list, dLUPTNLInformation_ToBeSetup_Item);
     }
 
     /* ADD */
     drbs_modified_item_ies->value.choice.DRBs_Modified_Item = drbs_modified_item;
     ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_Modified_List.list,
-                    drbs_modified_item_ies);
+                     drbs_modified_item_ies);
   }
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c7. SRBs_FailedToBeSetupMod_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -1077,25 +1009,21 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     srbs_failedToBeSetupMod_item_ies->id            = F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetupMod_Item;
     srbs_failedToBeSetupMod_item_ies->criticality   = F1AP_Criticality_ignore;
     srbs_failedToBeSetupMod_item_ies->value.present = F1AP_SRBs_FailedToBeSetupMod_ItemIEs__value_PR_SRBs_FailedToBeSetupMod_Item;
-
     /* 9.1 SRBs_FailedToBeSetupMod_Item */
     F1AP_SRBs_FailedToBeSetupMod_Item_t srbs_failedToBeSetupMod_item;
     memset((void *)&srbs_failedToBeSetupMod_item, 0, sizeof(F1AP_SRBs_FailedToBeSetupMod_Item_t));
-
     /* - sRBID */
     srbs_failedToBeSetupMod_item.sRBID = 50L;
-
     srbs_failedToBeSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
     srbs_failedToBeSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork;
     srbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id;
-
     /* ADD */
     srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item = srbs_failedToBeSetupMod_item;
     ASN_SEQUENCE_ADD(&ie->value.choice.SRBs_FailedToBeSetupMod_List.list,
                      srbs_failedToBeSetupMod_item_ies);
   }
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c8. DRBs_FailedToBeSetupMod_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -1112,27 +1040,21 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     drbs_failedToBeSetupMod_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetupMod_Item;
     drbs_failedToBeSetupMod_item_ies->criticality   = F1AP_Criticality_reject;
     drbs_failedToBeSetupMod_item_ies->value.present = F1AP_DRBs_FailedToBeSetupMod_ItemIEs__value_PR_DRBs_FailedToBeSetupMod_Item;
-
     /* 10.1 DRBs_ToBeSetupMod_Item */
     F1AP_DRBs_FailedToBeSetupMod_Item_t drbs_failedToBeSetupMod_item;
     memset((void *)&drbs_failedToBeSetupMod_item, 0, sizeof(F1AP_DRBs_FailedToBeSetupMod_Item_t));
-
     /* dRBID */
     drbs_failedToBeSetupMod_item.dRBID = 30L;
-
     drbs_failedToBeSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
     drbs_failedToBeSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork;
     drbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id;
-
     /* ADD */
     drbs_failedToBeSetupMod_item_ies->value.choice.DRBs_FailedToBeSetupMod_Item = drbs_failedToBeSetupMod_item;
     ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeSetupMod_List.list,
                      drbs_failedToBeSetupMod_item_ies);
-
   }
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c9. SCell_FailedtoSetupMod_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -1143,38 +1065,32 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
   for (i=0;
        i<1;
        i++) {
-     //
-     F1AP_SCell_FailedtoSetupMod_ItemIEs_t *scell_failedtoSetupMod_item_ies;
-     scell_failedtoSetupMod_item_ies = (F1AP_SCell_FailedtoSetupMod_ItemIEs_t *)calloc(1, sizeof(F1AP_SCell_FailedtoSetupMod_ItemIEs_t));
-     scell_failedtoSetupMod_item_ies->id            = F1AP_ProtocolIE_ID_id_SCell_FailedtoSetupMod_Item;
-     scell_failedtoSetupMod_item_ies->criticality   = F1AP_Criticality_ignore;
-     scell_failedtoSetupMod_item_ies->value.present = F1AP_SCell_FailedtoSetupMod_ItemIEs__value_PR_SCell_FailedtoSetupMod_Item;
-
-     /* 8.1 SCell_ToBeSetup_Item */
-     F1AP_SCell_FailedtoSetupMod_Item_t scell_failedtoSetupMod_item;
-     memset((void *)&scell_failedtoSetupMod_item, 0, sizeof(F1AP_SCell_FailedtoSetupMod_Item_t));
-
-     /* - sCell_ID */
-     F1AP_NRCGI_t nRCGI;
-     memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
-     MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
-                                        &nRCGI.pLMN_Identity);
-
-     NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
-
-     scell_failedtoSetupMod_item.sCell_ID = nRCGI;
-
-     scell_failedtoSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
-     scell_failedtoSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork;
-     scell_failedtoSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id;
-
-        /* ADD */
-     scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item = scell_failedtoSetupMod_item;
-     ASN_SEQUENCE_ADD(&ie->value.choice.SCell_FailedtoSetupMod_List.list,
-                      scell_failedtoSetupMod_item_ies);
+    //
+    F1AP_SCell_FailedtoSetupMod_ItemIEs_t *scell_failedtoSetupMod_item_ies;
+    scell_failedtoSetupMod_item_ies = (F1AP_SCell_FailedtoSetupMod_ItemIEs_t *)calloc(1, sizeof(F1AP_SCell_FailedtoSetupMod_ItemIEs_t));
+    scell_failedtoSetupMod_item_ies->id            = F1AP_ProtocolIE_ID_id_SCell_FailedtoSetupMod_Item;
+    scell_failedtoSetupMod_item_ies->criticality   = F1AP_Criticality_ignore;
+    scell_failedtoSetupMod_item_ies->value.present = F1AP_SCell_FailedtoSetupMod_ItemIEs__value_PR_SCell_FailedtoSetupMod_Item;
+    /* 8.1 SCell_ToBeSetup_Item */
+    F1AP_SCell_FailedtoSetupMod_Item_t scell_failedtoSetupMod_item;
+    memset((void *)&scell_failedtoSetupMod_item, 0, sizeof(F1AP_SCell_FailedtoSetupMod_Item_t));
+    /* - sCell_ID */
+    F1AP_NRCGI_t nRCGI;
+    memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
+    MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
+                      &nRCGI.pLMN_Identity);
+    NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
+    scell_failedtoSetupMod_item.sCell_ID = nRCGI;
+    scell_failedtoSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
+    scell_failedtoSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork;
+    scell_failedtoSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id;
+    /* ADD */
+    scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item = scell_failedtoSetupMod_item;
+    ASN_SEQUENCE_ADD(&ie->value.choice.SCell_FailedtoSetupMod_List.list,
+                     scell_failedtoSetupMod_item_ies);
   }
-  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
+  ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   /* mandatory */
   /* c10. DRBs_FailedToBeModified_List */
   ie = (F1AP_UEContextModificationResponseIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationResponseIEs_t));
@@ -1191,24 +1107,20 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
     drbs_failedToBeModified_item_ies->id            = F1AP_ProtocolIE_ID_id_DRBs_FailedToBeModified_Item;
     drbs_failedToBeModified_item_ies->criticality   = F1AP_Criticality_reject;
     drbs_failedToBeModified_item_ies->value.present = F1AP_DRBs_FailedToBeModified_ItemIEs__value_PR_DRBs_FailedToBeModified_Item;
-
     /* 13.1 DRBs_FailedToBeModified_Item */
     F1AP_DRBs_FailedToBeModified_Item_t drbs_failedToBeModified_item;
     memset((void *)&drbs_failedToBeModified_item, 0, sizeof(F1AP_DRBs_FailedToBeModified_Item_t));
-
     /* dRBID */
     drbs_failedToBeModified_item.dRBID = 30L;
-
     drbs_failedToBeModified_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t));
     drbs_failedToBeModified_item.cause->present = F1AP_Cause_PR_radioNetwork;
     drbs_failedToBeModified_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id;
-
     /* ADD */
     drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item = drbs_failedToBeModified_item;
     ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeModified_List.list,
                      drbs_failedToBeModified_item_ies);
-
   }
+
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
   // /*  */
@@ -1254,16 +1166,15 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
       for (i=0;
            i<0;
            i++) {
-
-          F1AP_CriticalityDiagnostics_IE_Item_t *criticalityDiagnostics_ie_item = (F1AP_CriticalityDiagnostics_IE_Item_t *)calloc(1, sizeof(F1AP_CriticalityDiagnostics_IE_Item_t));;
-          criticalityDiagnostics_ie_item->iECriticality = F1AP_Criticality_reject;
-          criticalityDiagnostics_ie_item->iE_ID         = 0L;
-          criticalityDiagnostics_ie_item->typeOfError   = F1AP_TypeOfError_not_understood;
-
-          ASN_SEQUENCE_ADD(&ie->value.choice.CriticalityDiagnostics.iEsCriticalityDiagnostics->list,
-                      criticalityDiagnostics_ie_item);
+        F1AP_CriticalityDiagnostics_IE_Item_t *criticalityDiagnostics_ie_item = (F1AP_CriticalityDiagnostics_IE_Item_t *)calloc(1, sizeof(F1AP_CriticalityDiagnostics_IE_Item_t));;
+        criticalityDiagnostics_ie_item->iECriticality = F1AP_Criticality_reject;
+        criticalityDiagnostics_ie_item->iE_ID         = 0L;
+        criticalityDiagnostics_ie_item->typeOfError   = F1AP_TypeOfError_not_understood;
+        ASN_SEQUENCE_ADD(&ie->value.choice.CriticalityDiagnostics.iEsCriticalityDiagnostics->list,
+                         criticalityDiagnostics_ie_item);
       }
     }
+
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   }
 
@@ -1275,7 +1186,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
 
   //du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
   return 0;
-
 }
 
 int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance) {
@@ -1287,8 +1197,8 @@ int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance) {
 }
 
 int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t       instance,
-                                              uint32_t         assoc_id,
-                                              uint32_t         stream,
-                                              F1AP_F1AP_PDU_t *pdu) {
+    uint32_t         assoc_id,
+    uint32_t         stream,
+    F1AP_F1AP_PDU_t *pdu) {
   AssertFatal(1==0,"Not implemented yet\n");
 }
diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c
index c1a58c723d30f3b612dc9a2f5681a2ddf56080b8..97f1839d507592bd41a8928f1d1b161ff67fb02c 100644
--- a/openair2/GNB_APP/gnb_config.c
+++ b/openair2/GNB_APP/gnb_config.c
@@ -2030,17 +2030,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
             }            
             
             if (strcmp(RateMatchPattern_mode , "dynamic") == 0){
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
               NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] =  NR_RateMatchPattern__dummy_dynamic;
-#else
-              NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] =  NR_RateMatchPattern__mode_dynamic;
-#endif
             }else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
               NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] =  NR_RateMatchPattern__dummy_semiStatic;
-#else
-              NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] =  NR_RateMatchPattern__mode_semiStatic;
-#endif
             }else {
               AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n",
                            RC.config_file_name, i, RateMatchPattern_mode);
@@ -2498,86 +2490,41 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
 
             switch(Common_dci_Format2_3_monitoringPeriodicity){
               case 1:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1;
-#endif
                 break;
               case 2:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2;
-#endif
                 break;
               case 4:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4;
-#endif
                 break;
               case 5:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5;
-#endif
                 break;
               case 8:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8;
-#endif
                 break;
               case 10:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10;
-#endif
                 break;
               case 16:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16;
-#endif
                 break;
               case 20:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20;
-#endif
                 break;
               default:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n",
                              RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
-#else
-                AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n",
-                             RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
-#endif
                 break;
             }
 
             switch(Common_dci_Format2_3_nrofPDCCH_Candidates){
               case 1:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1;
-#endif
                 break;
               case 2:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                 NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2;
-#else
-                NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] =  NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2;
-#endif
                 break;
               default:
                 AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n",
@@ -2701,17 +2648,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
             }
 
             if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
               NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] =  NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame;
-#else
-              NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] =  NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
-#endif
             }else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
               NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] =  NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames;
-#else
-              NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] =  NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
-#endif
             }else {
               AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n",
                            RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice);
diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c
index 26cbf8688d1600bbb8e8cd14dd879459f90533dc..d503a37d8255de55e7206bc66c39b8fc23585f5b 100644
--- a/openair2/LAYER2/MAC/config.c
+++ b/openair2/LAYER2/MAC/config.c
@@ -33,9 +33,7 @@
 #include "LTE_SystemInformationBlockType2.h"
 //#include "RadioResourceConfigCommonSIB.h"
 #include "LTE_RadioResourceConfigDedicated.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-  #include "LTE_PRACH-ConfigSIB-v1310.h"
-#endif
+#include "LTE_PRACH-ConfigSIB-v1310.h"
 #include "LTE_MeasGapConfig.h"
 #include "LTE_MeasObjectToAddModList.h"
 #include "LTE_TDD-Config.h"
@@ -142,7 +140,6 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) {
   for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
 
   AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
-
   AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min,
               "Band %d, bw %u : DL carrier frequency %u Hz < %u\n",
               eutra_bandP, bw, dl_CarrierFreq,
@@ -207,20 +204,17 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
   for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
 
   AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
-
   return (eutra_bandtable[i].dl_min +
           (dl_earfcn - (eutra_bandtable[i].N_OFFs_DL / 10))) * 100000;
 }
 
 
-int32_t get_uldl_offset(int eutra_bandP)
-{
+int32_t get_uldl_offset(int eutra_bandP) {
   int i;
 
   for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
 
   AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
-
   return (eutra_bandtable[i].dl_min - eutra_bandtable[i].ul_min);
 }
 
@@ -235,11 +229,8 @@ void config_mib(int                 Mod_idP,
                 int                 NcpP,
                 int                 p_eNBP,
                 uint32_t            dl_CarrierFreqP,
-                uint32_t            ul_CarrierFreqP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,
-  uint32_t            pbch_repetitionP
-#endif
+                uint32_t            ul_CarrierFreqP,
+                uint32_t            pbch_repetitionP
                ) {
   nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
   cfg->num_tlv=0;
@@ -290,16 +281,12 @@ void config_mib(int                 Mod_idP,
   cfg->sch_config.physical_cell_id.value                             = Nid_cellP;
   cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
   cfg->num_tlv++;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   cfg->emtc_config.pbch_repetitions_enable_r13.value                 = pbch_repetitionP;
   cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
   cfg->num_tlv++;
-#endif
   LOG_I(MAC,
         "%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
         " PBCH repetition %d"
-#endif
         "\n"
         ,__FUNCTION__
         ,cfg->num_tlv
@@ -314,9 +301,7 @@ void config_mib(int                 Mod_idP,
         ,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
         ,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
         ,cfg->sch_config.physical_cell_id.value
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
         ,cfg->emtc_config.pbch_repetitions_enable_r13.value
-#endif
        );
 }
 
@@ -347,9 +332,7 @@ void
 config_sib2(int Mod_idP,
             int CC_idP,
             LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommonP,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
-#endif
+            LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
             LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
             long *ul_BandwidthP,
             LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmissionP,
@@ -440,8 +423,6 @@ config_sib2(int Mod_idP,
     cfg->num_tlv++;
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
     AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
     AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
@@ -627,8 +608,6 @@ config_sib2(int Mod_idP,
       }
     }
   }
-
-#endif
 }
 
 void
@@ -650,23 +629,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
                            int physCellId,
                            int p_eNB,
                            int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  int pbch_repetition,
-#endif
+                           int pbch_repetition,
                            rnti_t rntiP,
                            LTE_BCCH_BCH_Message_t *mib,
                            LTE_RadioResourceConfigCommonSIB_t *
                            radioResourceConfigCommon,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  LTE_RadioResourceConfigCommonSIB_t *
-  radioResourceConfigCommon_BR,
-#endif
+                           LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR,
                            struct LTE_PhysicalConfigDedicated
                            *physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
-  //struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
+                           LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
                            LTE_MeasObjectToAddMod_t **measObj,
                            LTE_MAC_MainConfig_t *mac_MainConfig,
                            long logicalChannelIdentity,
@@ -680,28 +651,18 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
                            LTE_AdditionalSpectrumEmission_t *
                            additionalSpectrumEmission,
                            struct LTE_MBSFN_SubframeConfigList
-                           *mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  , uint8_t MBMS_Flag,
-  LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
-  LTE_PMCH_InfoList_r9_t *pmch_InfoList
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-  ,
-  LTE_SystemInformationBlockType1_v1310_IEs_t *
-  sib1_v13ext
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                       ,
-                       uint8_t FeMBMS_Flag,
-                       LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
-                       LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
-                       struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
-                       LTE_SystemInformationBlockType1_MBMS_r14_t *  sib1_mbms_r14_fembms,
-                       LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
-#endif
-			   ) {
-  
+                           *mbsfn_SubframeConfigList,
+                           uint8_t MBMS_Flag,
+                           LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
+                           LTE_PMCH_InfoList_r9_t *pmch_InfoList,
+                           LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext,
+                           uint8_t FeMBMS_Flag,
+                           LTE_BCCH_DL_SCH_Message_MBMS_t *mib_fembms,
+                           LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
+                           struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
+                           LTE_SystemInformationBlockType1_MBMS_r14_t   *sib1_mbms_r14_fembms,
+                           LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
+                          ) {
   int i;
   int UE_id = -1;
   eNB_MAC_INST *eNB = RC.mac[Mod_idP];
@@ -739,10 +700,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
                Ncp,
                p_eNB,
                dl_CarrierFreq,
-               ul_CarrierFreq
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               , pbch_repetition
-#endif
+               ul_CarrierFreq,
+               pbch_repetition
               );
     mac_init_cell_params(Mod_idP,CC_idP);
 
@@ -752,20 +711,16 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
       config_sib1(Mod_idP,CC_idP,tdd_Config);
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
+    //TODO MBMS this must be passed through function
     /*if (schedulingInfoList_MBMS!=NULL)  {
-      RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;    
+      RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
       config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
     }*/
-#endif
-    
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 
     if (sib1_v13ext != NULL) {
       RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
     }
 
-#endif
     AssertFatal(radioResourceConfigCommon != NULL, "radioResourceConfigCommon is null\n");
     LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
     LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
@@ -796,20 +751,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
     else RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth = RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.dl_Bandwidth;
 
     config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                 radioResourceConfigCommon_BR,
-#endif
                 NULL, ul_Bandwidth, additionalSpectrumEmission,
                 mbsfn_SubframeConfigList);
   } // mib != NULL
 
   if (mobilityControlInfo !=NULL) {
     if ((UE_id = add_new_ue(Mod_idP, CC_idP,
-                            rntiP, -1
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                            ,
+                            rntiP, -1,
                             0
-#endif
                            )) == -1) {
       LOG_E(MAC, "%s:%d: fatal\n", __FILE__, __LINE__);
       abort();
@@ -843,8 +793,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
     LOG_I(MAC,"Added physicalConfigDedicated %p for %d.%d\n",physicalConfigDedicated,CC_idP,UE_id);
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (sCellToAddMod_r10 != NULL) {
     if (UE_id<0) {
       LOG_E(MAC,"Configuration received for unknown UE (%x), shouldn't happen\n",rntiP);
@@ -855,8 +803,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
     config_dedicated_scell(Mod_idP, rntiP, sCellToAddMod_r10);
   }
 
-#endif
-
   if (mbsfn_SubframeConfigList != NULL) {
     LOG_I(MAC,
           "[eNB %d][CONFIG] Received %d subframe allocation pattern for MBSFN\n",
@@ -873,45 +819,32 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
             subframeAllocation.choice.oneFrame.buf[0]);
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
-#endif
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
- if (nonMBSFN_SubframeConfig != NULL){
-         LOG_D(MAC,
+  if (nonMBSFN_SubframeConfig != NULL) {
+    LOG_D(MAC,
           "[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n",
-          Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
-         //RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
-         RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
-
-        nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
-        cfg->fembms_config.non_mbsfn_config_flag.value   = 1;
-        cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
-        cfg->num_tlv++;
-
-        cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
-        cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
-        cfg->num_tlv++;
-
-        cfg->fembms_config.radioframe_allocation_period.value   = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
-        cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
-        cfg->num_tlv++;
-
-        cfg->fembms_config.radioframe_allocation_offset.value   = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
-        cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
-        cfg->num_tlv++;
-
-
-
-        //We need to reuse current MCH scheduler 
-        //TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
+          Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],
+          nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
+    //RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
+    RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
+    nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
+    cfg->fembms_config.non_mbsfn_config_flag.value   = 1;
+    cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
+    cfg->num_tlv++;
+    cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
+    cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
+    cfg->num_tlv++;
+    cfg->fembms_config.radioframe_allocation_period.value   = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
+    cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
+    cfg->num_tlv++;
+    cfg->fembms_config.radioframe_allocation_offset.value   = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
+    cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
+    cfg->num_tlv++;
+    //We need to reuse current MCH scheduler
+    //TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
   }
-#endif
-
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   if (mbsfn_AreaInfoList != NULL) {
     // One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
@@ -955,7 +888,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
     }
   }
 
-#endif
   LOG_D(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
 
   // if in nFAPI mode
@@ -1000,17 +932,15 @@ void eNB_Config_Local_DRX(
   UE_list_t *UE_list_mac = NULL;
   int UE_id = -1;
   UE_sched_ctrl_t *UE_scheduling_control = NULL;
-
   UE_list_mac = &(RC.mac[Mod_id]->UE_list);
-
   UE_id = find_UE_id(Mod_id, rnti);
 
   /* Check UE_id */
   if (UE_id == -1) {
     LOG_E(MAC, "%s:%d:%s: ERROR, UE_id == -1\n",
-      __FILE__,
-      __LINE__,
-      __FUNCTION__);
+          __FILE__,
+          __LINE__,
+          __FUNCTION__);
     return;
   }
 
@@ -1020,7 +950,6 @@ void eNB_Config_Local_DRX(
   /* Check drx_Configuration */
   if (drx_Configuration == NULL) {
     LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
-
     UE_scheduling_control->cdrx_configured = FALSE;
     return;
   }
@@ -1028,7 +957,6 @@ void eNB_Config_Local_DRX(
   /* Check if drx config present */
   if (drx_Configuration->present != LTE_DRX_Config_PR_setup) {
     LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n");
-
     UE_scheduling_control->cdrx_configured = FALSE;
     return;
   }
@@ -1038,133 +966,173 @@ void eNB_Config_Local_DRX(
   UE_scheduling_control->cdrx_waiting_ack = TRUE; // set to true first, waiting for the UE to configure CDRX on its side
   UE_scheduling_control->in_active_time = FALSE;
   UE_scheduling_control->dci0_ongoing_timer = 0;
-
   UE_scheduling_control->on_duration_timer = 0;
+
   switch (drx_Configuration->choice.setup.onDurationTimer) {
     case 0:
       UE_scheduling_control->on_duration_timer_thres = 1;
       break;
+
     case 1:
       UE_scheduling_control->on_duration_timer_thres = 2;
       break;
+
     case 2:
       UE_scheduling_control->on_duration_timer_thres = 3;
       break;
+
     case 3:
       UE_scheduling_control->on_duration_timer_thres = 4;
       break;
+
     case 4:
       UE_scheduling_control->on_duration_timer_thres = 5;
       break;
+
     case 5:
       UE_scheduling_control->on_duration_timer_thres = 6;
       break;
+
     case 6:
       UE_scheduling_control->on_duration_timer_thres = 8;
       break;
+
     case 7:
       UE_scheduling_control->on_duration_timer_thres = 10;
       break;
+
     case 8:
       UE_scheduling_control->on_duration_timer_thres = 20;
       break;
+
     case 9:
       UE_scheduling_control->on_duration_timer_thres = 30;
       break;
+
     case 10:
       UE_scheduling_control->on_duration_timer_thres = 40;
       break;
+
     case 11:
       UE_scheduling_control->on_duration_timer_thres = 50;
       break;
+
     case 12:
       UE_scheduling_control->on_duration_timer_thres = 60;
       break;
+
     case 13:
       UE_scheduling_control->on_duration_timer_thres = 80;
       break;
+
     case 14:
       UE_scheduling_control->on_duration_timer_thres = 100;
       break;
+
     case 15:
       UE_scheduling_control->on_duration_timer_thres = 200;
       break;
+
     default:
       LOG_E(MAC, "Error in local DRX configuration, the on duration timer value specified is unknown\n");
       break;
   }
 
   UE_scheduling_control->drx_inactivity_timer = 0;
+
   switch (drx_Configuration->choice.setup.drx_InactivityTimer) {
     case 0:
       UE_scheduling_control->drx_inactivity_timer_thres = 1;
       break;
+
     case 1:
       UE_scheduling_control->drx_inactivity_timer_thres = 2;
       break;
+
     case 2:
       UE_scheduling_control->drx_inactivity_timer_thres = 3;
       break;
+
     case 3:
       UE_scheduling_control->drx_inactivity_timer_thres = 4;
       break;
+
     case 4:
       UE_scheduling_control->drx_inactivity_timer_thres = 5;
       break;
+
     case 5:
       UE_scheduling_control->drx_inactivity_timer_thres = 6;
       break;
+
     case 6:
       UE_scheduling_control->drx_inactivity_timer_thres = 8;
       break;
+
     case 7:
       UE_scheduling_control->drx_inactivity_timer_thres = 10;
       break;
+
     case 8:
       UE_scheduling_control->drx_inactivity_timer_thres = 20;
       break;
+
     case 9:
       UE_scheduling_control->drx_inactivity_timer_thres = 30;
       break;
+
     case 10:
       UE_scheduling_control->drx_inactivity_timer_thres = 40;
       break;
+
     case 11:
       UE_scheduling_control->drx_inactivity_timer_thres = 50;
       break;
+
     case 12:
       UE_scheduling_control->drx_inactivity_timer_thres = 60;
       break;
+
     case 13:
       UE_scheduling_control->drx_inactivity_timer_thres = 80;
       break;
+
     case 14:
       UE_scheduling_control->drx_inactivity_timer_thres = 100;
       break;
+
     case 15:
       UE_scheduling_control->drx_inactivity_timer_thres = 200;
       break;
+
     case 16:
       UE_scheduling_control->drx_inactivity_timer_thres = 300;
       break;
+
     case 17:
       UE_scheduling_control->drx_inactivity_timer_thres = 500;
       break;
+
     case 18:
       UE_scheduling_control->drx_inactivity_timer_thres = 750;
       break;
+
     case 19:
       UE_scheduling_control->drx_inactivity_timer_thres = 1280;
       break;
+
     case 20:
       UE_scheduling_control->drx_inactivity_timer_thres = 1920;
       break;
+
     case 21:
       UE_scheduling_control->drx_inactivity_timer_thres = 2560;
       break;
+
     case 22:
       UE_scheduling_control->drx_inactivity_timer_thres = 0;
       break;
+
     default:
       LOG_E(MAC, "Error in local DRX configuration, the drx inactivity timer value specified is unknown\n");
       break;
@@ -1179,55 +1147,72 @@ void eNB_Config_Local_DRX(
   } else {
     UE_scheduling_control->in_short_drx_cycle = FALSE;
     UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) drx_Configuration->choice.setup.shortDRX->drxShortCycleTimer;
+
     switch (drx_Configuration->choice.setup.shortDRX->shortDRX_Cycle) {
       case 0:
         UE_scheduling_control->short_drx_cycle_duration = 2;
         break;
+
       case 1:
         UE_scheduling_control->short_drx_cycle_duration = 5;
         break;
+
       case 2:
         UE_scheduling_control->short_drx_cycle_duration = 8;
         break;
+
       case 3:
         UE_scheduling_control->short_drx_cycle_duration = 10;
         break;
+
       case 4:
         UE_scheduling_control->short_drx_cycle_duration = 16;
         break;
+
       case 5:
         UE_scheduling_control->short_drx_cycle_duration = 20;
         break;
+
       case 6:
         UE_scheduling_control->short_drx_cycle_duration = 32;
         break;
+
       case 7:
         UE_scheduling_control->short_drx_cycle_duration = 40;
         break;
+
       case 8:
         UE_scheduling_control->short_drx_cycle_duration = 64;
         break;
+
       case 9:
         UE_scheduling_control->short_drx_cycle_duration = 80;
         break;
+
       case 10:
         UE_scheduling_control->short_drx_cycle_duration = 128;
         break;
+
       case 11:
         UE_scheduling_control->short_drx_cycle_duration = 160;
         break;
+
       case 12:
         UE_scheduling_control->short_drx_cycle_duration = 256;
         break;
+
       case 13:
         UE_scheduling_control->short_drx_cycle_duration = 320;
         break;
+
       case 14:
         UE_scheduling_control->short_drx_cycle_duration = 512;
         break;
+
       case 15:
         UE_scheduling_control->short_drx_cycle_duration = 640;
         break;
+
       default:
         LOG_E(MAC, "Error in local DRX configuration, the short drx timer value specified is unknown\n");
         break;
@@ -1239,102 +1224,128 @@ void eNB_Config_Local_DRX(
 
   UE_scheduling_control->in_long_drx_cycle = FALSE;
   UE_scheduling_control->drx_longCycle_timer = 0;
+
   switch (drx_Configuration->choice.setup.longDRX_CycleStartOffset.present) {
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
       UE_scheduling_control->drx_longCycle_timer_thres = 10;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf10;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
       UE_scheduling_control->drx_longCycle_timer_thres = 20;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf20;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
       UE_scheduling_control->drx_longCycle_timer_thres = 32;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf32;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
       UE_scheduling_control->drx_longCycle_timer_thres = 40;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf40;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
       UE_scheduling_control->drx_longCycle_timer_thres = 64;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf64;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
       UE_scheduling_control->drx_longCycle_timer_thres = 80;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf80;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
       UE_scheduling_control->drx_longCycle_timer_thres = 128;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf128;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
       UE_scheduling_control->drx_longCycle_timer_thres = 160;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf160;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
       UE_scheduling_control->drx_longCycle_timer_thres = 256;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf256;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
       UE_scheduling_control->drx_longCycle_timer_thres = 320;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf320;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
       UE_scheduling_control->drx_longCycle_timer_thres = 512;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf512;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
       UE_scheduling_control->drx_longCycle_timer_thres = 640;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf640;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
       UE_scheduling_control->drx_longCycle_timer_thres = 1024;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1024;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
       UE_scheduling_control->drx_longCycle_timer_thres = 1280;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1280;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
       UE_scheduling_control->drx_longCycle_timer_thres = 2048;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2048;
       break;
-    case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
+
+    case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
       UE_scheduling_control->drx_longCycle_timer_thres = 2560;
       UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2560;
       break;
+
     default:
       LOG_E(MAC, "Invalid long_DRX value in DRX local configuration\n");
       break;
   }
 
   memset(UE_scheduling_control->drx_retransmission_timer, 0, sizeof(UE_scheduling_control->drx_retransmission_timer));
+
   switch (drx_Configuration->choice.setup.drx_RetransmissionTimer) {
     case 0:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 1, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 1:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 2, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 2:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 4, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 3:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 6, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 4:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 8, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 5:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 16, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 6:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 24, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     case 7:
       memset(UE_scheduling_control->drx_retransmission_timer_thres, 33, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
       break;
+
     default:
       LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
       break;
diff --git a/openair2/LAYER2/MAC/config_ue.c b/openair2/LAYER2/MAC/config_ue.c
index 7792a1effae5f5fb6f77f749362ff571fd753974..a0233a5e428f0ea5f223fb30093f293e39ef2f79 100644
--- a/openair2/LAYER2/MAC/config_ue.c
+++ b/openair2/LAYER2/MAC/config_ue.c
@@ -38,9 +38,7 @@
 #include "SCHED_UE/sched_UE.h"
 #include "LTE_SystemInformationBlockType2.h"
 #include "LTE_RadioResourceConfigDedicated.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-  #include "LTE_PRACH-ConfigSIB-v1310.h"
-#endif
+#include "LTE_PRACH-ConfigSIB-v1310.h"
 #include "LTE_MeasGapConfig.h"
 #include "LTE_MeasObjectToAddModList.h"
 #include "LTE_TDD-Config.h"
@@ -53,12 +51,11 @@
 #include "PHY/INIT/phy_init.h"
 
 #include "common/ran_context.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  #include "LTE_MBSFN-AreaInfoList-r9.h"
-  #include "LTE_MBSFN-AreaInfo-r9.h"
-  #include "LTE_MBSFN-SubframeConfigList.h"
-  #include "LTE_PMCH-InfoList-r9.h"
-#endif
+#include "LTE_MBSFN-AreaInfoList-r9.h"
+#include "LTE_MBSFN-AreaInfo-r9.h"
+#include "LTE_MBSFN-SubframeConfigList.h"
+#include "LTE_PMCH-InfoList-r9.h"
+
 
 extern void mac_init_cell_params(int Mod_idP,int CC_idP);
 extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
@@ -96,14 +93,9 @@ int
 rrc_mac_config_req_ue(module_id_t Mod_idP,
                       int CC_idP,
                       uint8_t eNB_index,
-                      LTE_RadioResourceConfigCommonSIB_t *
-                      radioResourceConfigCommon,
-                      struct LTE_PhysicalConfigDedicated
-                      *physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
-  //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
+                      LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
+                      struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
+                      LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
                       LTE_MeasObjectToAddMod_t **measObj,
                       LTE_MAC_MainConfig_t *mac_MainConfig,
                       long logicalChannelIdentity,
@@ -115,32 +107,18 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
                       uint16_t *SIperiod,
                       LTE_ARFCN_ValueEUTRA_t *ul_CarrierFreq,
                       long *ul_Bandwidth,
-                      LTE_AdditionalSpectrumEmission_t *
-                      additionalSpectrumEmission,
-                      struct LTE_MBSFN_SubframeConfigList
-                      *mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  , uint8_t MBMS_Flag,
-  LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
-  LTE_PMCH_InfoList_r9_t *pmch_InfoList
-#endif
-#ifdef CBA
-  , uint8_t num_active_cba_groups, uint16_t cba_rnti
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,config_action_t  config_action
-  ,const uint32_t *const sourceL2Id
-  ,const uint32_t *const destinationL2Id
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           ,
-                           uint8_t FeMBMS_Flag,
-                           struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
-                           LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
-#endif
-		      )
-{
-
+                      LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
+                      struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
+                      uint8_t MBMS_Flag,
+                      LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
+                      LTE_PMCH_InfoList_r9_t *pmch_InfoList,
+                      config_action_t  config_action,
+                      const uint32_t *const sourceL2Id,
+                      const uint32_t *const destinationL2Id,
+                      uint8_t FeMBMS_Flag,
+                      struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
+                      LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
+                     ) {
   int i;
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
   (VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
@@ -212,14 +190,8 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
           (uint16_t) *
           mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
       } else {
-        UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
-#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
-          (uint16_t)
-          LTE_MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
-#else
-          (uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
-#endif
-          ;
+        UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
+        ;
       }
 
       if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx) {
@@ -239,19 +211,10 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
           (uint16_t) mac_MainConfig->ul_SCH_Config->
           retxBSR_Timer;
       } else {
-#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
-        UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
-          (uint16_t)
-          LTE_MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
-#else
-        UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
-          (uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
-#endif
+        UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
       }
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
     if (mac_MainConfig->ext1
         && mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
       UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer =
@@ -291,7 +254,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
         (uint16_t) 0;
     }
 
-#endif
     UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_SF =
       MAC_UE_BSR_TIMER_NOT_RUNNING;
     UE_mac_inst[Mod_idP].scheduling_info.retxBSR_SF =
@@ -356,16 +318,12 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
     UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (sCellToAddMod_r10 != NULL) {
     phy_config_dedicated_scell_ue(Mod_idP, eNB_index,
                                   sCellToAddMod_r10, 1);
     UE_mac_inst[Mod_idP].physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; // using SCell index 0
   }
 
-#endif
-
   if (measObj != NULL) {
     if (measObj[0] != NULL &&
         measObj[0]->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA &&
@@ -528,8 +486,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
     }
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (mbsfn_AreaInfoList != NULL) {
     LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
           Mod_idP, mbsfn_AreaInfoList->list.count);
@@ -567,35 +523,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
     UE_mac_inst[Mod_idP].mcch_status = 1;
   }
 
-#endif
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if(nonMBSFN_SubframeConfig!=NULL) {
-    	LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
-	  Mod_idP);
-	phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
-  }
-#endif
-
-#ifdef CBA
-
-  if (cba_rnti) {
-    UE_mac_inst[Mod_idP].cba_rnti[num_active_cba_groups - 1] =
-      cba_rnti;
-    LOG_D(MAC,
-          "[UE %d] configure CBA group %d RNTI %x for eNB %d (total active cba group %d)\n",
-          Mod_idP, Mod_idP % num_active_cba_groups, cba_rnti,
-          eNB_index, num_active_cba_groups);
-    phy_config_cba_rnti(Mod_idP, CC_idP, eNB_flagP, eNB_index,
-                        cba_rnti, num_active_cba_groups - 1,
-                        num_active_cba_groups);
+    LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
+          Mod_idP);
+    phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
   }
 
-#endif
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
   (VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
   //for D2D
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   switch (config_action) {
     case CONFIG_ACTION_ADD:
@@ -630,6 +566,5 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
       break;
   }
 
-#endif
   return (0);
 }
diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h
index 45b46aae549a2b737b1f83dba3009dd5e4006535..2fa88dcde669d90d6009f419d1c4ea99523dbc48 100644
--- a/openair2/LAYER2/MAC/defs.h
+++ b/openair2/LAYER2/MAC/defs.h
@@ -40,9 +40,9 @@
 
 
 #ifdef USER_MODE
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+  #include <stdio.h>
+  #include <stdlib.h>
+  #include <string.h>
 #endif
 
 //#include "COMMON/openair_defs.h"
@@ -61,15 +61,12 @@
 #include "RACH-ConfigCommon.h"
 #include "MeasObjectToAddModList.h"
 #include "MobilityControlInfo.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 #include "MBSFN-AreaInfoList-r9.h"
 #include "MBSFN-SubframeConfigList.h"
 #include "PMCH-InfoList-r9.h"
 #include "SCellToAddMod-r10.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #include "SystemInformationBlockType1-v1310-IEs.h"
-#endif
+
 
 #include "nfapi_interface.h"
 #include "PHY_INTERFACE/IF_Module.h"
@@ -87,7 +84,6 @@
 #define SCH_PAYLOAD_SIZE_MAX 4096
 /// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
 // Mask for identifying subframe for MBMS
 #define MBSFN_TDD_SF3 0x80// for TDD
@@ -106,11 +102,10 @@
 #define MAX_PMCH_perMBSFN 15
 /*!\brief MAX MCCH payload size  */
 #define MCCH_PAYLOAD_SIZE_MAX 128
-//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
-#endif
+
 
 #ifdef USER_MODE
-#define printk printf
+  #define printk printf
 #endif //USER_MODE
 
 /*!\brief Maximum number of logical channl group IDs */
@@ -283,7 +278,6 @@ typedef struct {
   uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
 } __attribute__((__packed__))PCCH_PDU;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 /*! \brief MCCH payload */
 typedef struct {
   uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;
@@ -305,7 +299,6 @@ typedef struct {
   uint8_t lcid:5;        // octet 2 MSB
   uint8_t stop_sf_LSB:8;
 } __attribute__((__packed__))MSI_ELEMENT;
-#endif
 /*! \brief Values of CCCH LCID for DLSCH */
 #define CCCH_LCHANID 0
 /*!\brief Values of BCCH logical channel (fake)*/
@@ -340,7 +333,6 @@ typedef struct {
 /*!\brief LCID of padding LCID for DLSCH */
 #define SHORT_PADDING 31
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 // MCH LCHAN IDs (table6.2.1-4 TS36.321)
 /*!\brief LCID of MCCH for DL */
 #define MCCH_LCHANID 0
@@ -348,7 +340,6 @@ typedef struct {
 #define MCH_SCHDL_INFO 3
 /*!\brief LCID of Carrier component activation/deactivation */
 #define CC_ACT_DEACT 27
-#endif
 
 // ULSCH LCHAN IDs
 /*!\brief LCID of extended power headroom for ULSCH */
@@ -364,10 +355,10 @@ typedef struct {
 /*!\brief LCID of long BSR for ULSCH */
 #define LONG_BSR 30
 /*!\bitmaps for BSR Triggers */
-#define	BSR_TRIGGER_NONE		(0)			/* No BSR Trigger */
-#define	BSR_TRIGGER_REGULAR		(1)			/* For Regular and ReTxBSR Expiry Triggers */
-#define	BSR_TRIGGER_PERIODIC	(2)			/* For BSR Periodic Timer Expiry Trigger */
-#define	BSR_TRIGGER_PADDING		(4)			/* For Padding BSR Trigger */
+#define BSR_TRIGGER_NONE    (0)     /* No BSR Trigger */
+#define BSR_TRIGGER_REGULAR   (1)     /* For Regular and ReTxBSR Expiry Triggers */
+#define BSR_TRIGGER_PERIODIC  (2)     /* For BSR Periodic Timer Expiry Trigger */
+#define BSR_TRIGGER_PADDING   (4)     /* For Padding BSR Trigger */
 
 
 /*! \brief Downlink SCH PDU Structure */
@@ -459,7 +450,7 @@ typedef struct {
   /// BCCH MCS
   uint32_t ccch_mcs;
 
-/// num active users
+  /// num active users
   uint16_t num_dlactive_UEs;
   ///  available number of PRBs for a give SF
   uint16_t available_prbs;
@@ -537,7 +528,7 @@ typedef struct {
   //  total rb used for retransmission
   uint32_t total_rbs_used_retx;
 
-   /// TX
+  /// TX
   /// Num pkt
   uint32_t num_pdu_tx[NB_RB_MAX];
   /// num bytes
@@ -596,13 +587,13 @@ typedef struct {
   uint32_t num_retransmission_rx;
   ///  total rb used for a new uplink transmission
   uint32_t rbs_used_rx;
-   ///  total rb used for a new uplink retransmission
+  ///  total rb used for a new uplink retransmission
   uint32_t rbs_used_retx_rx;
   ///  total rb used for a new uplink transmission
   uint32_t total_rbs_used_rx;
   /// snr
   int32_t      snr;
-   /// target snr
+  /// target snr
   int32_t    target_snr;
 
   /// num rx pdu
@@ -619,7 +610,7 @@ typedef struct {
   uint64_t total_overhead_bytes_rx;
   /// headers+ CE +  padding bytes for a MAC PDU
   uint64_t avg_overhead_bytes_rx;
- //
+  //
   uint32_t  ulsch_bitrate;
   //total
   uint32_t  total_ulsch_bitrate;
@@ -762,14 +753,14 @@ typedef struct {
   eNB_UE_estimated_distances distance;
 #endif
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
   uint8_t rach_resource_type;
 
- uint16_t mpdcch_repetition_cnt;
+  uint16_t mpdcch_repetition_cnt;
   struct PhysicalConfigDedicated  *physicalConfigDedicated;
   frame_t Msg2_frame;
   sub_frame_t Msg2_subframe;
-#endif
+
 } UE_TEMPLATE;
 
 /*! \brief scheduling control information set through an API (not used)*/
@@ -925,8 +916,6 @@ typedef struct {
   /// size off piggybacked RRC SDU
   uint8_t msg4_rrc_sdu_length;
   uint32_t msg4_delay;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t rach_resource_type;
   uint8_t msg2_mpdcch_repetition_cnt;
   uint8_t msg2_mpdcch_done;
@@ -934,7 +923,6 @@ typedef struct {
   uint8_t msg4_mpdcch_done;
   uint8_t msg2_narrowband;
   uint32_t msg34_narrowband;
-#endif
 } RA_TEMPLATE;
 
 
@@ -988,9 +976,7 @@ typedef struct {
   uint32_t                         dl_CarrierFreq;
   BCCH_BCH_Message_t               *mib;
   RadioResourceConfigCommonSIB_t   *radioResourceConfigCommon;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   RadioResourceConfigCommonSIB_t   *radioResourceConfigCommon_BR;
-#endif
   TDD_Config_t                     *tdd_Config;
   SchedulingInfoList_t             *schedulingInfoList;
   ARFCN_ValueEUTRA_t               ul_CarrierFreq;
@@ -1015,7 +1001,6 @@ typedef struct {
   struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
   /// number of subframe allocation pattern available for MBSFN sync area
   uint8_t num_sf_allocation_pattern;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   /// MBMS Flag
   uint8_t MBMS_flag;
   /// Outgoing MCCH pdu for PHY
@@ -1036,15 +1021,12 @@ typedef struct {
   struct MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
   /// Outgoing MCH pdu for PHY
   MCH_PDU MCH_pdu;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// Rel13 parameters from SIB1
   SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
   /// Counter for SIB1-BR scheduling
   int SIB1_BR_cnt;
   /// Outgoing BCCH-BR pdu for PHY
   BCCH_PDU BCCH_BR_pdu[20];
-#endif
 } COMMON_channels_t;
 /*! \brief top level eNB MAC structure */
 typedef struct eNB_MAC_INST_s {
@@ -1225,10 +1207,8 @@ typedef struct {
   struct RACH_ConfigDedicated *rach_ConfigDedicated;
   /// pointer to RRC PHY configuration
   struct PhysicalConfigDedicated *physicalConfigDedicated;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   /// pointer to RRC PHY configuration SCEll
   struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
-#endif
   /// pointer to TDD Configuration (NULL for FDD)
   TDD_Config_t *tdd_Config;
   /// Number of adjacent cells to measure
@@ -1301,7 +1281,6 @@ typedef struct {
   struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
   /// number of subframe allocation pattern available for MBSFN sync area
   uint8_t num_sf_allocation_pattern;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   /// number of active MBSFN area
   uint8_t num_active_mbsfn_area;
   /// MBSFN Area Info
@@ -1312,13 +1291,10 @@ typedef struct {
   uint8_t mcch_status;
   /// MSI status
   uint8_t msi_status;// could be an array if there are >1 MCH in one MBSFN area
-#endif
-  //#ifdef CBA
   /// CBA RNTI for each group
   uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
   /// last SFN for CBA channel access
   uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
-  //#endif
   /// total UE scheduler processing time
   time_stats_t ue_scheduler; // total
   /// UE ULSCH tx  processing time inlcuding RLC interface (rlc_data_req) and mac header generation
diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c
index bb2cb0bc11acdd4c2d7a0656eb68c5a35751a62b..e6484aba3efd40eebb1b00cd4f53d4fcc91c01c0 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler.c
@@ -128,11 +128,11 @@ void schedule_SRS(module_id_t module_idP,
             continue;
           }
 
-	      if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
-	        LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
-	        printf("physicalConfigDedicated is null for UE %d\n",UE_id);
-	        return;
-	      }
+          if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
+            LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
+            printf("physicalConfigDedicated is null for UE %d\n",UE_id);
+            return;
+          }
 
           /* CDRX condition on Active Time and SRS type-0 report (36.321 5.7) */
           UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
@@ -170,7 +170,6 @@ void schedule_SRS(module_id_t module_idP,
                 ul_config_pdu->srs_pdu.srs_pdu_rel8.transmission_comb = soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
                 ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs = soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
                 ul_config_pdu->srs_pdu.srs_pdu_rel8.sounding_reference_cyclic_shift = soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
-
                 eNB->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
                 eNB->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
                 ul_req->number_of_pdus++;
@@ -259,32 +258,26 @@ void schedule_CSI(module_id_t module_idP,
 
             if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) {  // CQI periodic opportunity
               UE_scheduling_control->feedback_cnt[CC_id] = (((frameP * 10) + subframeP) / Npd) % H;
-
               // Program CQI
               nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
               memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
-
               ul_config_pdu->pdu_type                                                          = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
               ul_config_pdu->pdu_size                                                          = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
               ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag             = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
               ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti               = UE_list->UE_template[CC_id][UE_id].rnti;
               ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag           = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
               ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index      = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
-              ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size  = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id), cqi_ReportPeriodic);
+              ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size  = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id),
+                  cqi_ReportPeriodic);
               ul_req->number_of_pdus++;
               ul_req->tl.tag                                                                   = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
               // PUT rel10-13 UCI options here
-#endif
             } else if (cqi_ReportPeriodic->choice.setup.ri_ConfigIndex != NULL) {
               if ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) ==
                   N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161)) {  // RI opportunity
-
                 // Program RI
                 nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
                 memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
-
                 ul_config_pdu->pdu_type                                                          = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
                 ul_config_pdu->pdu_size                                                          = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
                 ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag             = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
@@ -388,22 +381,16 @@ schedule_SR (module_id_t module_idP,
             is_harq);
 
       /* Check Rel10 or Rel8 SR */
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
       if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2) &&
           (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020) &&
           (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
         sr.sr_information_rel10.tl.tag                    = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG;
         sr.sr_information_rel10.number_of_pucch_resources = 1;
         sr.sr_information_rel10.pucch_index_p1            = *UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
-
         LOG_D(MAC, "REL10 PUCCH INDEX P1:%d \n", sr.sr_information_rel10.pucch_index_p1);
-
-      } else
-#endif
-      {
+      } else {
         sr.sr_information_rel8.tl.tag      = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG;
         sr.sr_information_rel8.pucch_index = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
-
         LOG_D(MAC, "REL8 PUCCH INDEX:%d\n", sr.sr_information_rel8.pucch_index);
       }
 
@@ -424,7 +411,6 @@ schedule_SR (module_id_t module_idP,
       }  // if (is_harq)
 
       ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
-
     }  // for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++)
   }  // for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
 }
@@ -511,12 +497,13 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
       UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync   = 1;
     }
   }       // ul_failure_timer>0
-  
+
   UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
-  if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))){
-     LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti); 
-     mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
-     UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer  = 0;
+
+  if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))) {
+    LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
+    mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
+    UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer  = 0;
   }// time > 60s
 }
 
@@ -573,8 +560,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
 void
 eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
                           frame_t frameP,
-                          sub_frame_t subframeP)
-{
+                          sub_frame_t subframeP) {
   int               mbsfn_status[MAX_NUM_CCs];
   protocol_ctxt_t   ctxt;
   rnti_t            rnti  = 0;
@@ -584,24 +570,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   UE_list_t         *UE_list                = &(eNB->UE_list);
   COMMON_channels_t *cc                     = eNB->common_channels;
   UE_sched_ctrl_t     *UE_scheduling_control  = NULL;
-
   start_meas(&(eNB->eNB_scheduler));
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_IN);
-
   eNB->frame    = frameP;
   eNB->subframe = subframeP;
 
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     mbsfn_status[CC_id] = 0;
-
     /* Clear vrb_maps */
     memset(cc[CC_id].vrb_map, 0, 100);
     memset(cc[CC_id].vrb_map_UL, 0, 100);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     cc[CC_id].mcch_active = 0;
-#endif
     clear_nfapi_information(RC.mac[module_idP], CC_id, frameP, subframeP);
   }
 
@@ -610,7 +589,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
     if (UE_list->active[UE_id]) {
       rnti = UE_RNTI(module_idP, UE_id);
       CC_id = UE_PCCID(module_idP, UE_id);
-
       UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
 
       if (((frameP & 127) == 0) && (subframeP == 0)) {
@@ -633,7 +611,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
       if (UE_scheduling_control->cdrx_configured == TRUE) {
         boolean_t harq_active_time_condition = FALSE;
         UE_TEMPLATE *UE_template = NULL;
-
         unsigned long active_time_condition = 0; // variable used only for tracing purpose
 
         /* (UL and DL) HARQ RTT timers and DRX retransmission timers */
@@ -662,7 +639,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
             UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id]++;
 
             if (UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id] > 4) {
-              /* 
+              /*
                * TODO: implement the handling of UL asynchronous HARQ
                * drx_ULRetransmissionTimer should be (re)started here
                */
@@ -746,13 +723,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
         if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
           if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
               (UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
-
             UE_scheduling_control->on_duration_timer = 1;
           }
         } else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
           if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
               (UE_scheduling_control->drx_start_offset)) {
-
             UE_scheduling_control->on_duration_timer = 1;
           }
         }
@@ -763,6 +738,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
          * ONLY here. The variable can then be used for testing the actual state of the UE for scheduling purpose.
          */
         UE_template = &(UE_list->UE_template[CC_id][UE_id]);
+
         /* (a)synchronous HARQ processes handling for Active Time */
         for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
           if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
@@ -777,9 +753,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
             UE_scheduling_control->drx_inactivity_timer > 1 ||
             harq_active_time_condition ||
             UE_template->ul_SR > 0) {
-
           UE_scheduling_control->in_active_time = TRUE;
-
         } else {
           UE_scheduling_control->in_active_time = FALSE;
         }
@@ -804,17 +778,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 
           VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME_CONDITION, (unsigned long) active_time_condition);
         }
+
         /* END VCD */
 
         /* DCI0 ongoing timer */
         if (UE_scheduling_control->dci0_ongoing_timer > 0) {
-            if (UE_scheduling_control->dci0_ongoing_timer > 7) {
-              UE_scheduling_control->dci0_ongoing_timer = 0;
-            } else {
-              UE_scheduling_control->dci0_ongoing_timer++;
-            }
+          if (UE_scheduling_control->dci0_ongoing_timer > 7) {
+            UE_scheduling_control->dci0_ongoing_timer = 0;
+          } else {
+            UE_scheduling_control->dci0_ongoing_timer++;
+          }
         }
-
       } else { // else: CDRX not configured
         /* Note: (UL) HARQ RTT timers processing is done here and can be used by other features than CDRX */
         /* HARQ RTT timers */
@@ -840,13 +814,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
       /* Increment these timers, they are cleared when we receive an sdu */
       UE_scheduling_control->ul_inactivity_timer++;
       UE_scheduling_control->cqi_req_timer++;
-      
       LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n",
             UE_id,
             rnti,
             UE_scheduling_control->ul_inactivity_timer,
             UE_scheduling_control->cqi_req_timer);
-
       check_ul_failure(module_idP, CC_id, UE_id, frameP, subframeP);
 
       if (UE_scheduling_control->ue_reestablishment_reject_timer > 0) {
@@ -877,9 +849,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 
             if((ulsch != NULL) && (ulsch->rnti == rnti)) {
               void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
-
               LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
-
               clean_eNb_ulsch(ulsch);
             }
           }
@@ -889,9 +859,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 
             if((dlsch != NULL) && (dlsch->rnti == rnti)) {
               void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
-
               LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
-
               clean_eNb_dlsch(dlsch);
             }
           }
@@ -913,7 +881,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
                   if (pdu_index < pdu_number -1) {
                     memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index],
                            &ul_req_tmp->ul_config_pdu_list[pdu_index+1],
-                          (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
+                           (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
                   }
 
                   ul_req_tmp->number_of_pdus--;
@@ -923,20 +891,16 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
           } // end for j
 
           rrc_mac_remove_ue(module_idP,rnti);
-
         } // end if (UE_scheduling_control->ue_reestablishment_reject_timer >= UE_scheduling_control->ue_reestablishment_reject_timer_thres)
       } // end if (UE_scheduling_control->ue_reestablishment_reject_timer > 0)
     } // end if UE active
   } // end for loop on UE_id
 
 #if (!defined(PRE_SCD_THREAD))
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP, module_idP);
   pdcp_run(&ctxt);
   rrc_rx_tx(&ctxt, CC_id);
-
 #endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     if (cc[CC_id].MBMS_flag > 0) {
@@ -946,8 +910,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
     }
   }
 
-#endif
-
   static int debug_flag = 0;
   void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe) = NULL;
   void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag) = NULL;
@@ -961,13 +923,13 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
     schedule_ue_spec_p = schedule_ue_spec_fairRR;
   }
 
-  if(debug_flag == 0){
+  if(debug_flag == 0) {
     LOG_E(MAC,"SCHED_MODE = %d\n", eNB->scheduler_mode);
     debug_flag = 1;
   }
 
   /* This schedules MIB */
-  if ((subframeP == 0) && (frameP & 3) == 0) 
+  if ((subframeP == 0) && (frameP & 3) == 0)
     schedule_mib(module_idP, frameP, subframeP);
 
   if (get_softmodem_params()->phy_test == 0) {
@@ -995,10 +957,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
     schedule_SR(module_idP, frameP, subframeP);
     /* This schedules UCI_CSI in subframeP */
     schedule_CSI(module_idP, frameP, subframeP);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     /* This schedules DLSCH in subframeP for BR UE*/
     schedule_ue_spec_br(module_idP, frameP, subframeP);
-#endif
+
     /* This schedules DLSCH in subframeP */
     if (schedule_ue_spec_p != NULL) {
       schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
@@ -1007,7 +968,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
             __FILE__,
             __LINE__);
     }
-
   } else {
     schedule_ulsch_phy_test(module_idP,frameP,subframeP);
     schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
@@ -1025,6 +985,5 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   }
 
   stop_meas(&(eNB->eNB_scheduler));
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_OUT);
 }
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
index 24b6e74bf0dd4de589f54e4039e23d8276f36fa6..879d0da6e0fdda25fd26e6763e866fef3826ea11 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
@@ -112,7 +112,6 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
   ul_req_body = &ul_req->ul_config_request_body;
   AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
               ra->rnti);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
   if (ra->rach_resource_type > 0) {
     LOG_D (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
@@ -145,9 +144,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
     ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
     ul_req_body->number_of_pdus++;
   }                             //  if (ra->rach_resource_type>0) {
-  else
-#endif
-  {
+  else {
     LOG_D(MAC,
           "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n",
           module_idP, frameP, subframeP, CC_id, ra->Msg3_frame,
@@ -249,7 +246,6 @@ void generate_Msg2(module_id_t module_idP,
   dl_req_body = &mac->DL_req[CC_idP].dl_config_request_body;
   dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
   N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int             rmax = 0;
   int             rep = 0;
   int             reps = 0;
@@ -329,9 +325,7 @@ void generate_Msg2(module_id_t module_idP,
       dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1;   // imposed (9.1.5 in 213) for Type 2 Common search space
       AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
       dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
-
       LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
-
       dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0;        // Note: this should be dynamic
       dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24;        // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
       dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
@@ -462,9 +456,7 @@ void generate_Msg2(module_id_t module_idP,
         mac->TX_req[CC_idP].tx_request_body.number_of_pdus++;
       }
     }
-  } else
-#endif
-  {
+  } else {
     if ((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
       LOG_D(MAC,
             "[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, state %d\n",
@@ -594,7 +586,6 @@ generate_Msg4(module_id_t module_idP,
   nfapi_dl_config_request_t      *dl_req = NULL;
   nfapi_dl_config_request_body_t *dl_req_body = NULL;
   nfapi_ul_config_request_body_t *ul_req_body = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int             rmax = 0;
   int             rep = 0;
   int             reps = 0;
@@ -648,7 +639,6 @@ generate_Msg4(module_id_t module_idP,
     }
   }
 
-#endif
   vrb_map = cc[CC_idP].vrb_map;
   dl_req        = &mac->DL_req[CC_idP];
   dl_req_body   = &dl_req->dl_config_request_body;
@@ -679,7 +669,6 @@ generate_Msg4(module_id_t module_idP,
    LOG_D(MAC,
    "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
    module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
   if (ra->rach_resource_type > 0) {
     ra->harq_pid = 0;
@@ -900,9 +889,7 @@ generate_Msg4(module_id_t module_idP,
       }
     }                           // Msg4 frame/subframe
   }                             // rach_resource_type > 0
-  else
-#endif
-  {
+  else {
     // This is normal LTE case
     LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d,  frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
 
@@ -959,12 +946,10 @@ generate_Msg4(module_id_t module_idP,
                              1, // tpc, none
                              getRIV(N_RB_DL, first_rb, 4),  // resource_block_coding
                              ra->msg4_mcs,  // mcs
-				 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
+                             1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
                              0, // rv
                              0);  // vrb_flag
-    	
-    	UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
-
+        UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
         LOG_D(MAC,
               "Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
               frameP, subframeP, dl_req_body->number_pdu,
@@ -1054,7 +1039,7 @@ generate_Msg4(module_id_t module_idP,
           mac->TX_req[CC_idP].sfn_sf =
             fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
                               (frameP * 10) + subframeP,
-				      rrc_sdu_length+offset,
+                              rrc_sdu_length+offset,
                               mac->pdu_index[CC_idP],
                               mac->UE_list.
                               DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
@@ -1126,39 +1111,6 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
   nfapi_dl_config_request_t *dl_req;
   nfapi_dl_config_request_body_t *dl_req_body;
   int round;
-  /*
-     #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-     COMMON_channels_t               *cc  = mac->common_channels;
-
-     int rmax            = 0;
-     int rep             = 0;
-     int reps            = 0;
-
-     first_rb        = 0;
-     struct PRACH_ConfigSIB_v1310 *ext4_prach;
-     PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
-     PRACH_ParametersCE_r13_t *p[4];
-
-     if (cc[CC_idP].radioResourceConfigCommon_BR) {
-
-     ext4_prach                 = cc[CC_idP].radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
-     prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
-
-     switch (prach_ParametersListCE_r13->list.count) {
-     case 4:
-     p[3]=prach_ParametersListCE_r13->list.array[3];
-     case 3:
-     p[2]=prach_ParametersListCE_r13->list.array[2];
-     case 2:
-     p[1]=prach_ParametersListCE_r13->list.array[1];
-     case 1:
-     p[0]=prach_ParametersListCE_r13->list.array[0];
-     default:
-     AssertFatal(1==0,"Illegal count for prach_ParametersListCE_r13 %d\n",prach_ParametersListCE_r13->list.count);
-     }
-     }
-     #endif
-   */
   // check HARQ status and retransmit if necessary
   UE_id = find_UE_id(module_idP, ra->rnti);
   AssertFatal(UE_id >= 0, "Can't find UE for t-crnti\n");
@@ -1173,15 +1125,11 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
         module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
 
   if (round != 8) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
     if (ra->rach_resource_type > 0 && round > 0) {
       AssertFatal(1 == 0,
                   "Msg4 Retransmissions not handled yet for BL/CE UEs, Frame %d, subframeP %d harq_pid %d round %d, UE_id: %d \n",
                   frameP, subframeP, ra->harq_pid, round, UE_id);
-    } else
-#endif
-    {
+    } else {
       if ((ra->Msg4_frame == frameP)
           && (ra->Msg4_subframe == subframeP)) {
         //ra->wait_ack_Msg4++;
@@ -1199,7 +1147,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
                              1, // tpc, none
                              getRIV(N_RB_DL, first_rb, 4),  // resource_block_coding
                              ra->msg4_mcs,  // mcs
-				     UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
+                             UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
                              round & 3, // rv
                              0);  // vrb_flag
 
@@ -1313,15 +1261,12 @@ initiate_ra_proc(module_id_t module_idP,
                  sub_frame_t subframeP,
                  uint16_t preamble_index,
                  int16_t timing_offset,
-				 uint16_t ra_rnti
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                ,uint8_t rach_resource_type
-#endif
+                 uint16_t ra_rnti,
+                 uint8_t rach_resource_type
                 ) {
   uint8_t i;
   COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
   RA_t *ra = &cc->ra[0];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
   LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
 
@@ -1333,20 +1278,16 @@ initiate_ra_proc(module_id_t module_idP,
     prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
   }
 
-#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
   LOG_D(MAC,
         "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d  Initiating RA procedure for preamble index %d\n",
         module_idP, CC_id, frameP, subframeP, preamble_index);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LOG_D(MAC,
         "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d  PRACH resource type %d\n",
         module_idP, CC_id, frameP, subframeP, rach_resource_type);
-#endif
   uint16_t msg2_frame = frameP;
   uint16_t msg2_subframe = subframeP;
   int offset;
   static uint8_t failure_cnt = 0 ;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 
   if (prach_ParametersListCE_r13 &&
       prach_ParametersListCE_r13->list.count < rach_resource_type) {
@@ -1357,7 +1298,6 @@ initiate_ra_proc(module_id_t module_idP,
     return;
   }
 
-#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
 
@@ -1370,11 +1310,9 @@ initiate_ra_proc(module_id_t module_idP,
       ra[i].Msg4_delay_cnt=0;
       ra[i].timing_offset = timing_offset;
       ra[i].preamble_subframe = subframeP;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       ra[i].rach_resource_type = rach_resource_type;
       ra[i].msg2_mpdcch_repetition_cnt = 0;
       ra[i].msg4_mpdcch_repetition_cnt = 0;
-#endif
 
       //TODO Fill in other TDD config. What about nfapi_mode?
       if(cc->tdd_Config!=NULL) {
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c
index d523fb4e17b6f7aa031b6b7849a4a9b51430f756..c69d533558da974bde888e11bfb76fb9bd0be447 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c
@@ -46,7 +46,7 @@
 #include "pdcp.h"
 
 #if defined(ENABLE_ITTI)
-#include "intertask_interface.h"
+  #include "intertask_interface.h"
 #endif
 
 #define ENABLE_MAC_PAYLOAD_DEBUG
@@ -59,7 +59,6 @@ extern RAN_CONTEXT_t RC;
 // NEED TO ADD schedule_SI_BR for SIB1_BR and SIB23_BR
 // CCE_allocation_infeasible to be done for EPDCCH/MPDCCH
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
 #define size_Sj25 2
 int Sj25[size_Sj25] = { 0, 3 };
@@ -78,228 +77,229 @@ int SIB1_BR_TBS_table[6] = { 208, 256, 328, 504, 712, 936 };
 //------------------------------------------------------------------------------
 void
 schedule_SIB1_MBMS(module_id_t module_idP,
-		 frame_t frameP, sub_frame_t subframeP)
+                   frame_t frameP, sub_frame_t subframeP)
 //------------------------------------------------------------------------------
 {
 #ifdef SCHEDULE_SIB1_MBMS
-    int8_t bcch_sdu_length;
-    int CC_id;
-    eNB_MAC_INST *eNB = RC.mac[module_idP];
-    COMMON_channels_t *cc;
-    uint8_t *vrb_map;
-    int first_rb = -1;
-    int N_RB_DL;
-    nfapi_dl_config_request_pdu_t *dl_config_pdu;
-    nfapi_tx_request_pdu_t *TX_req;
-    nfapi_dl_config_request_body_t *dl_req;
-    int m, i, N_S_NB;
-    int *Sj;
-    int n_NB = 0;
-    int TBS;
-    int k = 0, rvidx;
-    uint16_t sfn_sf = frameP<<4|subframeP;
+  int8_t bcch_sdu_length;
+  int CC_id;
+  eNB_MAC_INST *eNB = RC.mac[module_idP];
+  COMMON_channels_t *cc;
+  uint8_t *vrb_map;
+  int first_rb = -1;
+  int N_RB_DL;
+  nfapi_dl_config_request_pdu_t *dl_config_pdu;
+  nfapi_tx_request_pdu_t *TX_req;
+  nfapi_dl_config_request_body_t *dl_req;
+  int m, i, N_S_NB;
+  int *Sj;
+  int n_NB = 0;
+  int TBS;
+  int k = 0, rvidx;
+  uint16_t sfn_sf = frameP<<4|subframeP;
+
+  for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+    cc = &eNB->common_channels[CC_id];
+    vrb_map = (void *) &cc->vrb_map;
+    N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
+    dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
+    int foffset = cc->physCellId & 1;
+    int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
 
-    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+    // Time-domain scheduling
+    if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
+      continue;
+    else
+      switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
+        case 0:   // repetition 4
+          k = (frameP >> 1) & 3;
+
+          if ((subframeP != (4 + sfoffset))
+              || ((frameP & 1) != foffset))
+            continue;
+
+          break;
+
+        case 1:   // repetition 8
+          k = frameP & 3;
+          AssertFatal(N_RB_DL > 15,
+                      "SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
+                      N_RB_DL);
+
+          if ((foffset == 0) && (subframeP != (4 + sfoffset)))
+            continue;
+          else if ((foffset == 1)
+                   && (subframeP != ((9 + sfoffset) % 10)))
+            continue;
+
+          break;
+
+        case 2:   // repetition 16
+          k = ((10 * frameP) + subframeP) & 3;
+          AssertFatal(N_RB_DL > 15,
+                      "SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
+                      N_RB_DL);
+
+          if ((sfoffset == 1)
+              && ((subframeP != 0) || (subframeP != 5)))
+            continue;
+          else if ((sfoffset == 0) && (foffset == 0)
+                   && (subframeP != 4) && (subframeP != 9))
+            continue;
+          else if ((sfoffset == 0) && (foffset == 1)
+                   && (subframeP != 0) && (subframeP != 9))
+            continue;
+
+          break;
+      }
+
+    // if we get here we have to schedule SIB1_BR in this frame/subframe
+
+    // keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
+    if ((frameP & 7) == 0)
+      cc->SIB1_BR_cnt = 0;
+    else
+      cc->SIB1_BR_cnt++;
+
+    // Frequency-domain scheduling
+    switch (N_RB_DL) {
+      case 6:
+      case 15:
+      default:
+        m = 1;
+        n_NB = 0;
+        N_S_NB = 0;
+        Sj = NULL;
+        break;
+
+      case 25:
+        m = 2;
+        N_S_NB = 2;
+        Sj = Sj25;
+        break;
+
+      case 50:
+        m = 2;
+        N_S_NB = 6;
+        Sj = Sj50;
+        break;
+
+      case 75:
+        m = 4;
+        N_S_NB = 10;
+        Sj = Sj75;
+        break;
+
+      case 100:
+        m = 4;
+        N_S_NB = 14;
+        Sj = Sj100;
+        break;
+    }
+
+    // Note: definition of k above and rvidx from 36.321 section 5.3.1
+    rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
+    i = cc->SIB1_BR_cnt & (m - 1);
+    n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
+    bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0);  // not used in this case
+    AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
+                "schedulingInfoSIB1_BR_r13 %d > 18\n",
+                (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
+    AssertFatal(bcch_sdu_length > 0,
+                "RRC returned 0 bytes for SIB1-BR\n");
+    TBS =
+      SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
+                         1) / 3] >> 3;
+    AssertFatal(bcch_sdu_length <= TBS,
+                "length returned by RRC %d is not compatible with the TBS %d from MIB\n",
+                bcch_sdu_length, TBS);
+
+    if ((frameP & 1023) < 200)
+      LOG_D(MAC,
+            "[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d)  rvidx %d\n",
+            module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
+            n_NB, i, m, N_S_NB, rvidx);
+
+    // allocate all 6 PRBs in narrowband for SIB1_BR
+    first_rb = narrowband_to_first_rb(cc, n_NB);
+    vrb_map[first_rb] = 1;
+    vrb_map[first_rb + 1] = 1;
+    vrb_map[first_rb + 2] = 1;
+    vrb_map[first_rb + 3] = 1;
+    vrb_map[first_rb + 4] = 1;
+    vrb_map[first_rb + 5] = 1;
+    dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+    memset((void *) dl_config_pdu, 0,
+           sizeof(nfapi_dl_config_request_pdu_t));
+    dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
+    dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
+    //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth);  // ignored
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
+    // Rel10 fields
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
+    // Rel13 fields
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0;  // SIB1-BR
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SFx
+    //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
+    dl_req->number_pdu++;
+    dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
+    // Program TX Request
+    TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
+    TX_req->pdu_length = bcch_sdu_length;
+    TX_req->pdu_index = eNB->pdu_index[CC_id]++;
+    TX_req->num_segments = 1;
+    TX_req->segments[0].segment_length = bcch_sdu_length;
+    TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
+    eNB->TX_req[CC_id].sfn_sf = sfn_sf;
+    eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+    eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
+    eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
+
+    if (opt_enabled == 1) {
+      trace_pdu(DIRECTION_DOWNLINK,
+                &cc->BCCH_BR_pdu[0].payload[0],
+                bcch_sdu_length,
+                0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
+      LOG_D(OPT,
+            "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+            module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
+    }
 
-	cc = &eNB->common_channels[CC_id];
-	vrb_map = (void *) &cc->vrb_map;
-	N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
-	dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
-
-	int foffset = cc->physCellId & 1;
-	int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
-
-	// Time-domain scheduling
-	if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
-	    continue;
-	else
-	    switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
-	    case 0:		// repetition 4
-		k = (frameP >> 1) & 3;
-		if ((subframeP != (4 + sfoffset))
-		    || ((frameP & 1) != foffset))
-		    continue;
-		break;
-	    case 1:		// repetition 8
-		k = frameP & 3;
-		AssertFatal(N_RB_DL > 15,
-			    "SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
-			    N_RB_DL);
-		if ((foffset == 0) && (subframeP != (4 + sfoffset)))
-		    continue;
-		else if ((foffset == 1)
-			 && (subframeP != ((9 + sfoffset) % 10)))
-		    continue;
-		break;
-	    case 2:		// repetition 16
-		k = ((10 * frameP) + subframeP) & 3;
-		AssertFatal(N_RB_DL > 15,
-			    "SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
-			    N_RB_DL);
-		if ((sfoffset == 1)
-		    && ((subframeP != 0) || (subframeP != 5)))
-		    continue;
-		else if ((sfoffset == 0) && (foffset == 0)
-			 && (subframeP != 4) && (subframeP != 9))
-		    continue;
-		else if ((sfoffset == 0) && (foffset == 1)
-			 && (subframeP != 0) && (subframeP != 9))
-		    continue;
-		break;
-	    }
-	// if we get here we have to schedule SIB1_BR in this frame/subframe
-
-	// keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
-	if ((frameP & 7) == 0)
-	    cc->SIB1_BR_cnt = 0;
-	else
-	    cc->SIB1_BR_cnt++;
-
-	// Frequency-domain scheduling
-	switch (N_RB_DL) {
-	case 6:
-	case 15:
-	default:
-	    m = 1;
-	    n_NB = 0;
-	    N_S_NB = 0;
-	    Sj = NULL;
-	    break;
-	case 25:
-	    m = 2;
-	    N_S_NB = 2;
-	    Sj = Sj25;
-	    break;
-	case 50:
-	    m = 2;
-	    N_S_NB = 6;
-	    Sj = Sj50;
-	    break;
-	case 75:
-	    m = 4;
-	    N_S_NB = 10;
-	    Sj = Sj75;
-	    break;
-	case 100:
-	    m = 4;
-	    N_S_NB = 14;
-	    Sj = Sj100;
-	    break;
-	}
-	// Note: definition of k above and rvidx from 36.321 section 5.3.1
-	rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
-
-	i = cc->SIB1_BR_cnt & (m - 1);
-
-	n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
-
-
-	bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0);	// not used in this case
-
-	AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
-		    "schedulingInfoSIB1_BR_r13 %d > 18\n",
-		    (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
-
-	AssertFatal(bcch_sdu_length > 0,
-		    "RRC returned 0 bytes for SIB1-BR\n");
-
-	TBS =
-	    SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
-			       1) / 3] >> 3;
-
-	AssertFatal(bcch_sdu_length <= TBS,
-		    "length returned by RRC %d is not compatible with the TBS %d from MIB\n",
-		    bcch_sdu_length, TBS);
-
-	if ((frameP & 1023) < 200)
-	    LOG_D(MAC,
-		  "[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d)  rvidx %d\n",
-		  module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
-		  n_NB, i, m, N_S_NB, rvidx);
-
-	// allocate all 6 PRBs in narrowband for SIB1_BR
-
-	first_rb = narrowband_to_first_rb(cc, n_NB);
-
-	vrb_map[first_rb] = 1;
-	vrb_map[first_rb + 1] = 1;
-	vrb_map[first_rb + 2] = 1;
-	vrb_map[first_rb + 3] = 1;
-	vrb_map[first_rb + 4] = 1;
-	vrb_map[first_rb + 5] = 1;
-
-	dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-	memset((void *) dl_config_pdu, 0,
-	       sizeof(nfapi_dl_config_request_pdu_t));
-	dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
-	dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2;	// format 1A/1B/1D
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0;	// localized
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2;	//QPSK
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1;	// first block
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
-	//  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4;	// 0 dB
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth);	// ignored
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
-	// Rel10 fields
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
-	// Rel13 fields
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1;	// CEModeA UE
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0;	// SIB1-BR
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;	// absolute SFx
-
-	//  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ; 
-	dl_req->number_pdu++;
-        dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-
-	// Program TX Request
-	TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
-	TX_req->pdu_length = bcch_sdu_length;
-	TX_req->pdu_index = eNB->pdu_index[CC_id]++;
-	TX_req->num_segments = 1;
-	TX_req->segments[0].segment_length = bcch_sdu_length;
-	TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
-        eNB->TX_req[CC_id].sfn_sf = sfn_sf;
-        eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
-        eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
-        eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
-
-	if (opt_enabled == 1) {
-	    trace_pdu(DIRECTION_DOWNLINK,
-		      &cc->BCCH_BR_pdu[0].payload[0],
-		      bcch_sdu_length,
-		      0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
-	    LOG_D(OPT,
-		  "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-		  module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
-	}
-	if (cc->tdd_Config != NULL) {	//TDD
-	    LOG_D(MAC,
-		  "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
-		  frameP, CC_id, bcch_sdu_length);
-	} else {
-	    LOG_D(MAC,
-		  "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
-		  frameP, CC_id, bcch_sdu_length);
-	}
+    if (cc->tdd_Config != NULL) { //TDD
+      LOG_D(MAC,
+            "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
+            frameP, CC_id, bcch_sdu_length);
+    } else {
+      LOG_D(MAC,
+            "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
+            frameP, CC_id, bcch_sdu_length);
     }
+  }
+
 #endif
 }
 
@@ -307,227 +307,227 @@ schedule_SIB1_MBMS(module_id_t module_idP,
 //------------------------------------------------------------------------------
 void
 schedule_SIB1_BR(module_id_t module_idP,
-		 frame_t frameP, sub_frame_t subframeP)
+                 frame_t frameP, sub_frame_t subframeP)
 //------------------------------------------------------------------------------
 {
-    int8_t bcch_sdu_length;
-    int CC_id;
-    eNB_MAC_INST *eNB = RC.mac[module_idP];
-    COMMON_channels_t *cc;
-    uint8_t *vrb_map;
-    int first_rb = -1;
-    int N_RB_DL;
-    nfapi_dl_config_request_pdu_t *dl_config_pdu;
-    nfapi_tx_request_pdu_t *TX_req;
-    nfapi_dl_config_request_body_t *dl_req;
-    int m, i, N_S_NB;
-    int *Sj;
-    int n_NB = 0;
-    int TBS;
-    int k = 0, rvidx;
-    uint16_t sfn_sf = frameP<<4|subframeP;
+  int8_t bcch_sdu_length;
+  int CC_id;
+  eNB_MAC_INST *eNB = RC.mac[module_idP];
+  COMMON_channels_t *cc;
+  uint8_t *vrb_map;
+  int first_rb = -1;
+  int N_RB_DL;
+  nfapi_dl_config_request_pdu_t *dl_config_pdu;
+  nfapi_tx_request_pdu_t *TX_req;
+  nfapi_dl_config_request_body_t *dl_req;
+  int m, i, N_S_NB;
+  int *Sj;
+  int n_NB = 0;
+  int TBS;
+  int k = 0, rvidx;
+  uint16_t sfn_sf = frameP<<4|subframeP;
+
+  for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+    cc = &eNB->common_channels[CC_id];
+    vrb_map = (void *) &cc->vrb_map;
+    N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
+    dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
+    int foffset = cc->physCellId & 1;
+    int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
 
-    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+    // Time-domain scheduling
+    if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
+      continue;
+    else
+      switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
+        case 0:   // repetition 4
+          k = (frameP >> 1) & 3;
+
+          if ((subframeP != (4 + sfoffset))
+              || ((frameP & 1) != foffset))
+            continue;
+
+          break;
+
+        case 1:   // repetition 8
+          k = frameP & 3;
+          AssertFatal(N_RB_DL > 15,
+                      "SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
+                      N_RB_DL);
+
+          if ((foffset == 0) && (subframeP != (4 + sfoffset)))
+            continue;
+          else if ((foffset == 1)
+                   && (subframeP != ((9 + sfoffset) % 10)))
+            continue;
+
+          break;
+
+        case 2:   // repetition 16
+          k = ((10 * frameP) + subframeP) & 3;
+          AssertFatal(N_RB_DL > 15,
+                      "SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
+                      N_RB_DL);
+
+          if ((sfoffset == 1)
+              && ((subframeP != 0) || (subframeP != 5)))
+            continue;
+          else if ((sfoffset == 0) && (foffset == 0)
+                   && (subframeP != 4) && (subframeP != 9))
+            continue;
+          else if ((sfoffset == 0) && (foffset == 1)
+                   && (subframeP != 0) && (subframeP != 9))
+            continue;
+
+          break;
+      }
+
+    // if we get here we have to schedule SIB1_BR in this frame/subframe
+
+    // keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
+    if ((frameP & 7) == 0)
+      cc->SIB1_BR_cnt = 0;
+    else
+      cc->SIB1_BR_cnt++;
+
+    // Frequency-domain scheduling
+    switch (N_RB_DL) {
+      case 6:
+      case 15:
+      default:
+        m = 1;
+        n_NB = 0;
+        N_S_NB = 0;
+        Sj = NULL;
+        break;
+
+      case 25:
+        m = 2;
+        N_S_NB = 2;
+        Sj = Sj25;
+        break;
+
+      case 50:
+        m = 2;
+        N_S_NB = 6;
+        Sj = Sj50;
+        break;
+
+      case 75:
+        m = 4;
+        N_S_NB = 10;
+        Sj = Sj75;
+        break;
+
+      case 100:
+        m = 4;
+        N_S_NB = 14;
+        Sj = Sj100;
+        break;
+    }
 
-	cc = &eNB->common_channels[CC_id];
-	vrb_map = (void *) &cc->vrb_map;
-	N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
-	dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
-
-	int foffset = cc->physCellId & 1;
-	int sfoffset = (cc->tdd_Config == NULL) ? 0 : 1;
-
-	// Time-domain scheduling
-	if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
-	    continue;
-	else
-	    switch ((cc->mib->message.schedulingInfoSIB1_BR_r13 - 1) % 3) {
-	    case 0:		// repetition 4
-		k = (frameP >> 1) & 3;
-		if ((subframeP != (4 + sfoffset))
-		    || ((frameP & 1) != foffset))
-		    continue;
-		break;
-	    case 1:		// repetition 8
-		k = frameP & 3;
-		AssertFatal(N_RB_DL > 15,
-			    "SIB1-BR repetition 8 not allowed for N_RB_DL= %d\n",
-			    N_RB_DL);
-		if ((foffset == 0) && (subframeP != (4 + sfoffset)))
-		    continue;
-		else if ((foffset == 1)
-			 && (subframeP != ((9 + sfoffset) % 10)))
-		    continue;
-		break;
-	    case 2:		// repetition 16
-		k = ((10 * frameP) + subframeP) & 3;
-		AssertFatal(N_RB_DL > 15,
-			    "SIB1-BR repetition 16 not allowed for N_RB_DL= %d\n",
-			    N_RB_DL);
-		if ((sfoffset == 1)
-		    && ((subframeP != 0) || (subframeP != 5)))
-		    continue;
-		else if ((sfoffset == 0) && (foffset == 0)
-			 && (subframeP != 4) && (subframeP != 9))
-		    continue;
-		else if ((sfoffset == 0) && (foffset == 1)
-			 && (subframeP != 0) && (subframeP != 9))
-		    continue;
-		break;
-	    }
-	// if we get here we have to schedule SIB1_BR in this frame/subframe
-
-	// keep counter of SIB1_BR repetitions in 8 frame period to choose narrowband on which to transmit
-	if ((frameP & 7) == 0)
-	    cc->SIB1_BR_cnt = 0;
-	else
-	    cc->SIB1_BR_cnt++;
-
-	// Frequency-domain scheduling
-	switch (N_RB_DL) {
-	case 6:
-	case 15:
-	default:
-	    m = 1;
-	    n_NB = 0;
-	    N_S_NB = 0;
-	    Sj = NULL;
-	    break;
-	case 25:
-	    m = 2;
-	    N_S_NB = 2;
-	    Sj = Sj25;
-	    break;
-	case 50:
-	    m = 2;
-	    N_S_NB = 6;
-	    Sj = Sj50;
-	    break;
-	case 75:
-	    m = 4;
-	    N_S_NB = 10;
-	    Sj = Sj75;
-	    break;
-	case 100:
-	    m = 4;
-	    N_S_NB = 14;
-	    Sj = Sj100;
-	    break;
-	}
-	// Note: definition of k above and rvidx from 36.321 section 5.3.1
-	rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
-
-	i = cc->SIB1_BR_cnt & (m - 1);
-
-	n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
-
-
-	bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 0xFFFF, 1, &cc->BCCH_BR_pdu[0].payload[0], 0);	// not used in this case
-
-	AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
-		    "schedulingInfoSIB1_BR_r13 %d > 18\n",
-		    (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
-
-	AssertFatal(bcch_sdu_length > 0,
-		    "RRC returned 0 bytes for SIB1-BR\n");
-
-	TBS =
-	    SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
-			       1) / 3] >> 3;
-
-	AssertFatal(bcch_sdu_length <= TBS,
-		    "length returned by RRC %d is not compatible with the TBS %d from MIB\n",
-		    bcch_sdu_length, TBS);
-
-	if ((frameP & 1023) < 200)
-	    LOG_D(MAC,
-		  "[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d)  rvidx %d\n",
-		  module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
-		  n_NB, i, m, N_S_NB, rvidx);
-
-	// allocate all 6 PRBs in narrowband for SIB1_BR
-
-	first_rb = narrowband_to_first_rb(cc, n_NB);
-
-	vrb_map[first_rb] = 1;
-	vrb_map[first_rb + 1] = 1;
-	vrb_map[first_rb + 2] = 1;
-	vrb_map[first_rb + 3] = 1;
-	vrb_map[first_rb + 4] = 1;
-	vrb_map[first_rb + 5] = 1;
-
-	dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-	memset((void *) dl_config_pdu, 0,
-	       sizeof(nfapi_dl_config_request_pdu_t));
-	dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
-	dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2;	// format 1A/1B/1D
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0;	// localized
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2;	//QPSK
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1;	// first block
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
-	//  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4;	// 0 dB
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth);	// ignored
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
-	// Rel10 fields
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
-	// Rel13 fields
-        dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1;	// CEModeA UE
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0;	// SIB1-BR
-	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;	// absolute SFx
-
-	//  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ; 
-	dl_req->number_pdu++;
-        dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-
-	// Program TX Request
-	TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
-	TX_req->pdu_length = bcch_sdu_length;
-	TX_req->pdu_index = eNB->pdu_index[CC_id]++;
-	TX_req->num_segments = 1;
-	TX_req->segments[0].segment_length = bcch_sdu_length;
-	TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
-        eNB->TX_req[CC_id].sfn_sf = sfn_sf;
-        eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
-        eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
-        eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
-
-	if (opt_enabled == 1) {
-	    trace_pdu(DIRECTION_DOWNLINK,
-		      &cc->BCCH_BR_pdu[0].payload[0],
-		      bcch_sdu_length,
-		      0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
-	    LOG_D(OPT,
-		  "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-		  module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
-	}
-	if (cc->tdd_Config != NULL) {	//TDD
-	    LOG_D(MAC,
-		  "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
-		  frameP, CC_id, bcch_sdu_length);
-	} else {
-	    LOG_D(MAC,
-		  "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
-		  frameP, CC_id, bcch_sdu_length);
-	}
+    // Note: definition of k above and rvidx from 36.321 section 5.3.1
+    rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
+    i = cc->SIB1_BR_cnt & (m - 1);
+    n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
+    bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 0xFFFF, 1, &cc->BCCH_BR_pdu[0].payload[0], 0);  // not used in this case
+    AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
+                "schedulingInfoSIB1_BR_r13 %d > 18\n",
+                (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
+    AssertFatal(bcch_sdu_length > 0,
+                "RRC returned 0 bytes for SIB1-BR\n");
+    TBS =
+      SIB1_BR_TBS_table[(cc->mib->message.schedulingInfoSIB1_BR_r13 -
+                         1) / 3] >> 3;
+    AssertFatal(bcch_sdu_length <= TBS,
+                "length returned by RRC %d is not compatible with the TBS %d from MIB\n",
+                bcch_sdu_length, TBS);
+
+    if ((frameP & 1023) < 200)
+      LOG_D(MAC,
+            "[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d)  rvidx %d\n",
+            module_idP, frameP, subframeP, CC_id, bcch_sdu_length,
+            n_NB, i, m, N_S_NB, rvidx);
+
+    // allocate all 6 PRBs in narrowband for SIB1_BR
+    first_rb = narrowband_to_first_rb(cc, n_NB);
+    vrb_map[first_rb] = 1;
+    vrb_map[first_rb + 1] = 1;
+    vrb_map[first_rb + 2] = 1;
+    vrb_map[first_rb + 3] = 1;
+    vrb_map[first_rb + 4] = 1;
+    vrb_map[first_rb + 5] = 1;
+    dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+    memset((void *) dl_config_pdu, 0,
+           sizeof(nfapi_dl_config_request_pdu_t));
+    dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
+    dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
+    //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth);  // ignored
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
+    // Rel10 fields
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
+    // Rel13 fields
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 0;  // SIB1-BR
+    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; // absolute SFx
+    //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
+    dl_req->number_pdu++;
+    dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
+    // Program TX Request
+    TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
+    TX_req->pdu_length = bcch_sdu_length;
+    TX_req->pdu_index = eNB->pdu_index[CC_id]++;
+    TX_req->num_segments = 1;
+    TX_req->segments[0].segment_length = bcch_sdu_length;
+    TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[0].payload;
+    eNB->TX_req[CC_id].sfn_sf = sfn_sf;
+    eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+    eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
+    eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
+
+    if (opt_enabled == 1) {
+      trace_pdu(DIRECTION_DOWNLINK,
+                &cc->BCCH_BR_pdu[0].payload[0],
+                bcch_sdu_length,
+                0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
+      LOG_D(OPT,
+            "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+            module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
     }
+
+    if (cc->tdd_Config != NULL) { //TDD
+      LOG_D(MAC,
+            "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
+            frameP, CC_id, bcch_sdu_length);
+    } else {
+      LOG_D(MAC,
+            "[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes\n",
+            frameP, CC_id, bcch_sdu_length);
+    }
+  }
 }
 
 int si_WindowLength_BR_r13tab[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
@@ -538,7 +538,7 @@ int si_WindowLength_MBMS_r14tab[8] = { 1, 2, 5, 10, 15, 20, 40, 80 };
 //------------------------------------------------------------------------------
 void
 schedule_SI_BR(module_id_t module_idP, frame_t frameP,
-	       sub_frame_t subframeP)
+               sub_frame_t subframeP)
 //------------------------------------------------------------------------------
 {
   int8_t                                  bcch_sdu_length;
@@ -555,55 +555,48 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
   int                                     rvidx;
   int                                     absSF = (frameP*10)+subframeP;
 
-
   for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
-
     cc              = &eNB->common_channels[CC_id];
-    vrb_map         = (void*)&cc->vrb_map;
+    vrb_map         = (void *)&cc->vrb_map;
     N_RB_DL         = to_prb(cc->mib->message.dl_Bandwidth);
     dl_req          = &eNB->DL_req[CC_id].dl_config_request_body;
 
     // Time-domain scheduling
     if (cc->mib->message.schedulingInfoSIB1_BR_r13==0) continue;
     else  {
-
-
       AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13!=NULL,
-		  "sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
-
+                  "sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
       LTE_SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
       AssertFatal(schedulingInfoList_BR_r13!=NULL,
-		  "sib_v13ext->schedulingInfoList_BR_r13 is null\n");
-
+                  "sib_v13ext->schedulingInfoList_BR_r13 is null\n");
       LTE_SchedulingInfoList_t *schedulingInfoList = cc->schedulingInfoList;
       AssertFatal(schedulingInfoList_BR_r13->list.count==schedulingInfoList->list.count,
-		  "schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
-		  schedulingInfoList_BR_r13->list.count,schedulingInfoList->list.count);
-
-      AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
-		  "si_WindowLength_BR_r13 %d > %d\n",
-		  (int)cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
-		  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
-
+                  "schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
+                  schedulingInfoList_BR_r13->list.count,schedulingInfoList->list.count);
+      AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=
+                  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
+                  "si_WindowLength_BR_r13 %d > %d\n",
+                  (int)cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
+                  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
       // check that SI frequency-hopping is disabled
-      AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13==LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
-		  "Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
+      AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13==
+                  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
+                  "Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
       long si_WindowLength_BR_r13   = si_WindowLength_BR_r13tab[cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
-
       long si_RepetitionPattern_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
       AssertFatal(si_RepetitionPattern_r13<=LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
-		  "si_RepetitionPattern_r13 %d > %d\n",
-		  (int)si_RepetitionPattern_r13,
-		  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
+                  "si_RepetitionPattern_r13 %d > %d\n",
+                  (int)si_RepetitionPattern_r13,
+                  LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
       // cycle through SIB list
 
-      for (i=0;i<schedulingInfoList_BR_r13->list.count;i++) {
+      for (i=0; i<schedulingInfoList_BR_r13->list.count; i++) {
         long si_Periodicity = schedulingInfoList->list.array[i]->si_Periodicity;
         long si_Narrowband_r13 = schedulingInfoList_BR_r13->list.array[i]->si_Narrowband_r13;
         long si_TBS_r13 = si_TBS_r13tab[schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13];
-
         // check if the SI is to be scheduled now
         int period_in_sf;
+
         if ((si_Periodicity >= 0) && (si_Periodicity < 25)) {
           // 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
           period_in_sf = 80 << ((int) si_Periodicity);
@@ -612,19 +605,17 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
         } else if (si_Periodicity > 24) {
           period_in_sf = 80 << 24;
         }
+
         int sf_mod_period = absSF % period_in_sf;
         int k = sf_mod_period & 3;
         // Note: definition of k and rvidx from 36.321 section 5.3.1
         rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
 
         if ((sf_mod_period < si_WindowLength_BR_r13)
-            && ((frameP & (((1 << si_RepetitionPattern_r13) - 1))) == 0)) {	// this SIB is to be scheduled
-
-          bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_BR + i, 0xFFFF, 1, &cc->BCCH_BR_pdu[i + 1].payload[0], 0);	// not used in this case
-
-
+            && ((frameP & (((1 << si_RepetitionPattern_r13) - 1))) == 0)) { // this SIB is to be scheduled
+          bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_BR + i, 0xFFFF, 1, &cc->BCCH_BR_pdu[i + 1].payload[0], 0);  // not used in this case
           AssertFatal(bcch_sdu_length > 0,
-          "RRC returned 0 bytes for SI-BR %d\n", i);
+                      "RRC returned 0 bytes for SI-BR %d\n", i);
 
           if (bcch_sdu_length > 0) {
             AssertFatal(bcch_sdu_length <= (si_TBS_r13 >> 3),
@@ -647,23 +638,20 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
 
             if ((frameP&1023) < 200)
               LOG_D(MAC,"[eNB %d] Frame %d Subframe %d: SI_BR->DLSCH CC_id %d, Narrowband %d rvidx %d (sf_mod_period %d : si_WindowLength_BR_r13 %d : si_RepetitionPattern_r13 %d) bcch_sdu_length %d\n",
-                   module_idP,frameP,subframeP,CC_id,(int)si_Narrowband_r13-1,rvidx,
-                   sf_mod_period,(int)si_WindowLength_BR_r13,(int)si_RepetitionPattern_r13,
-                   bcch_sdu_length);
-
+                    module_idP,frameP,subframeP,CC_id,(int)si_Narrowband_r13-1,rvidx,
+                    sf_mod_period,(int)si_WindowLength_BR_r13,(int)si_RepetitionPattern_r13,
+                    bcch_sdu_length);
 
             //// Rel10 fields (for PDSCH starting symbol)
             //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = cc[CC_id].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
             //// Rel13 fields
             //                  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
-            //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1;	// CEModeA UE
-            //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1;	// SI-BR
+            //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
+            //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1;  // SI-BR
             //dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = absSF - sf_mod_period;
-
             ////  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
             //dl_req->number_pdu++;
             //                  dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-
             dl_config_pdu                                                                  = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
             memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
             dl_config_pdu->pdu_type                                                        = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
@@ -681,7 +669,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB==1 ) ? 0 : 1;
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
-            //	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
+            //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4; // 0 dB
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
@@ -696,10 +684,8 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 1; // CEModeA UE
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 1; // SI-BR
             dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = absSF - sf_mod_period;
-
-            //	dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
+            //  dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
             dl_req->number_pdu++;
-
             // Program TX Request
             TX_req                                                                = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
             TX_req->pdu_length                                                    = bcch_sdu_length;
@@ -710,28 +696,30 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
             eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
 
             if (opt_enabled == 1) {
-                trace_pdu(DIRECTION_DOWNLINK,
-                    &cc->BCCH_BR_pdu[i + 1].payload[0],
-                    bcch_sdu_length,
-                    0xffff,
-                    WS_SI_RNTI,
-                    0xffff, eNB->frame, eNB->subframe, 0,
-                    0);
-                LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-                      module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
+              trace_pdu(DIRECTION_DOWNLINK,
+                        &cc->BCCH_BR_pdu[i + 1].payload[0],
+                        bcch_sdu_length,
+                        0xffff,
+                        WS_SI_RNTI,
+                        0xffff, eNB->frame, eNB->subframe, 0,
+                        0);
+              LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+                    module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
             }
-            if (cc->tdd_Config != NULL) {	//TDD
-                LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
-                      frameP, i, CC_id, bcch_sdu_length);
+
+            if (cc->tdd_Config != NULL) { //TDD
+              LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
+                    frameP, i, CC_id, bcch_sdu_length);
             } else {
-                LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (FDD) for CC_id %d SI-BR %d bytes\n",
-                      frameP, i, CC_id, bcch_sdu_length);
+              LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (FDD) for CC_id %d SI-BR %d bytes\n",
+                    frameP, i, CC_id, bcch_sdu_length);
             }
           }
-        }		// scheduling in current frame/subframe
-	    }			//for SI List
-    }			// eMTC is activated
-  }				// CC_id
+        }   // scheduling in current frame/subframe
+      }     //for SI List
+    }     // eMTC is activated
+  }       // CC_id
+
   return;
 }
 
@@ -739,300 +727,273 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
 //------------------------------------------------------------------------------
 void
 schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
-	       sub_frame_t subframeP)
+                 sub_frame_t subframeP)
 //------------------------------------------------------------------------------
 {
-    int8_t bcch_sdu_length;
-    int mcs = -1;
-    int CC_id;
-    eNB_MAC_INST *eNB = RC.mac[module_idP];
-    COMMON_channels_t *cc;
-    uint8_t *vrb_map;
-    int first_rb = -1;
-    int N_RB_DL;
-    nfapi_dl_config_request_t      *dl_config_request;
-    nfapi_dl_config_request_pdu_t  *dl_config_pdu;
-    nfapi_tx_request_pdu_t *TX_req;
-    nfapi_dl_config_request_body_t *dl_req;
-    uint16_t sfn_sf = frameP << 4 | subframeP;
-
-    start_meas(&eNB->schedule_si_mbms);
-
-    // Only schedule LTE System Information in subframe 0
-    if (subframeP == 0) {
-
-	for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-
-	    cc = &eNB->common_channels[CC_id];
-	    vrb_map = (void *) &cc->vrb_map;
-	    N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
-            dl_config_request = &eNB->DL_req[CC_id];
-	    dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
-
-
-	    bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_MBMS,0xFFFF, 1, &cc->BCCH_MBMS_pdu.payload[0], 0);	// not used in this case
-
-	    if (bcch_sdu_length > 0) {
-		LOG_D(MAC, "[eNB %d] Frame %d : BCCH-MBMS->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
-
-		// Allocate 4 PRBs in a random location
-		/*
-		   while (1) {
-		   first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
-		   if ((vrb_map[first_rb] != 1) && 
-		   (vrb_map[first_rb+1] != 1) && 
-		   (vrb_map[first_rb+2] != 1) && 
-		   (vrb_map[first_rb+3] != 1))
-		   break;
-		   }
-		 */
-		switch (N_RB_DL) {
-		case 6:
-		    first_rb = 0;
-		    break;
-		case 15:
-		    first_rb = 6;
-		    break;
-		case 25:
-		    first_rb = 11;
-		    break;
-		case 50:
-		    first_rb = 23;
-		    break;
-		case 100:
-		    first_rb = 48;
-		    break;
-		}
-
-		vrb_map[first_rb] = 1;
-		vrb_map[first_rb + 1] = 1;
-		vrb_map[first_rb + 2] = 1;
-		vrb_map[first_rb + 3] = 1;
-
-		// Get MCS for length of SI, 3 PRBs
-		if (bcch_sdu_length <= 7) {
-		    mcs = 0;
-		} else if (bcch_sdu_length <= 11) {
-		    mcs = 1;
-		} else if (bcch_sdu_length <= 18) {
-		    mcs = 2;
-		} else if (bcch_sdu_length <= 22) {
-		    mcs = 3;
-		} else if (bcch_sdu_length <= 26) {
-		    mcs = 4;
-		} else if (bcch_sdu_length <= 28) {
-		    mcs = 5;
-		} else if (bcch_sdu_length <= 32) {
-		    mcs = 6;
-		} else if (bcch_sdu_length <= 41) {
-		    mcs = 7;
-		} else if (bcch_sdu_length <= 49) {
-		    mcs = 8;
-		}
-
-
-		dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-		memset((void *) dl_config_pdu, 0,
-		       sizeof(nfapi_dl_config_request_pdu_t));
-		dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
-		dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
-                dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag                = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format            = NFAPI_DL_DCI_FORMAT_1A;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level     = 4;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti                  = 0xFFFF;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type             = 2;	// S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power    = 6000;	// equal to RS power
-
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process          = 0;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                   = 1;	// no TPC
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1  = 0;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1                 = mcs;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1  = 0;
-
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
-                dl_config_request->sfn_sf = sfn_sf;
-
-		if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
-		    LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI MBMS\n", frameP, subframeP);
-		    dl_req->number_dci++;
-		    dl_req->number_pdu++;
-		    dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-		    memset((void *) dl_config_pdu, 0,
-			   sizeof(nfapi_dl_config_request_pdu_t));
-		    dl_config_pdu->pdu_type                                                        = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
-		    dl_config_pdu->pdu_size                                                        = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index                              = eNB->pdu_index[CC_id];
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag                                 = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length                                 = bcch_sdu_length;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti                                   = 0xFFFF;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type               = 2;	// format 1A/1B/1D
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0;	// localized
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding                  = getRIV(N_RB_DL, first_rb, 4);
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation                             = 2;	//QPSK
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version                     = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks                       = 1;	// first block
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag  = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB == 1) ? 0 : 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
-		    //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4;	// 0 dB
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap                                   = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb                                   = get_subbandsize(cc->mib->message.dl_Bandwidth);	// ignored
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode                      = (cc->p_eNB == 1) ? 1 : 2;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband                 = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector                          = 1;
-		    //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ; 
-		    dl_req->number_pdu++;
-
-                    // Rel10 fields
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start                           = 3;
-                    // Rel13 fields
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 0;   // regular UE
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 2;        // not BR
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = 0xFFFF;   // absolute SF
-
-                    dl_config_request->header.message_id                                           = NFAPI_DL_CONFIG_REQUEST;
-                    dl_config_request->sfn_sf                                                      = sfn_sf;
-
-		    // Program TX Request
-		    TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
-		    TX_req->pdu_length = bcch_sdu_length;
-		    TX_req->pdu_index = eNB->pdu_index[CC_id]++;
-		    TX_req->num_segments = 1;
-		    TX_req->segments[0].segment_length = bcch_sdu_length;
-		    TX_req->segments[0].segment_data = cc->BCCH_MBMS_pdu.payload;
-		    eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
-                    eNB->TX_req[CC_id].sfn_sf = sfn_sf;
-                    eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
-                    eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
-
-		} else {
-		    LOG_E(MAC,
-			  "[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI MBMS\n",
-			  module_idP, CC_id, frameP, subframeP);
-		}
-
-                T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
-                  T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
-
-		if (opt_enabled == 1) {
-		    trace_pdu(DIRECTION_DOWNLINK,
-			      &cc->BCCH_MBMS_pdu.payload[0],
-			      bcch_sdu_length,
-			      0xffff,
-			     WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
-		    LOG_D(OPT,
-			  "[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-			  module_idP, frameP, CC_id, 0xffff,
-			  bcch_sdu_length);
-		}
-		if (0/*cc->tdd_Config != NULL*/) {	//TDD not for FeMBMS
-		    LOG_D(MAC,
-			  "[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
-			  frameP, CC_id, bcch_sdu_length, mcs);
-		} else {
-		    LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-MBMS->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
-		}
-
-
-		eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
-		eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
-		eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
-		eNB->eNB_stats[CC_id].bcch_mcs = mcs;
-//printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
-	    } else {
-
-		//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
-	    }
-	}
-    }
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    //schedule_SIB1_BR(module_idP, frameP, subframeP);
-    //schedule_SI_BR(module_idP, frameP, subframeP);
-#endif
-
-  stop_meas(&eNB->schedule_si_mbms);
-
-
-}
-#endif
+  int8_t bcch_sdu_length;
+  int mcs = -1;
+  int CC_id;
+  eNB_MAC_INST *eNB = RC.mac[module_idP];
+  COMMON_channels_t *cc;
+  uint8_t *vrb_map;
+  int first_rb = -1;
+  int N_RB_DL;
+  nfapi_dl_config_request_t      *dl_config_request;
+  nfapi_dl_config_request_pdu_t  *dl_config_pdu;
+  nfapi_tx_request_pdu_t *TX_req;
+  nfapi_dl_config_request_body_t *dl_req;
+  uint16_t sfn_sf = frameP << 4 | subframeP;
+  start_meas(&eNB->schedule_si_mbms);
+
+  // Only schedule LTE System Information in subframe 0
+  if (subframeP == 0) {
+    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+      cc = &eNB->common_channels[CC_id];
+      vrb_map = (void *) &cc->vrb_map;
+      N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
+      dl_config_request = &eNB->DL_req[CC_id];
+      dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
+      bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_MBMS,0xFFFF, 1, &cc->BCCH_MBMS_pdu.payload[0], 0);  // not used in this case
+
+      if (bcch_sdu_length > 0) {
+        LOG_D(MAC, "[eNB %d] Frame %d : BCCH-MBMS->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
+
+        // Allocate 4 PRBs in a random location
+        /*
+           while (1) {
+           first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
+           if ((vrb_map[first_rb] != 1) &&
+           (vrb_map[first_rb+1] != 1) &&
+           (vrb_map[first_rb+2] != 1) &&
+           (vrb_map[first_rb+3] != 1))
+           break;
+           }
+         */
+        switch (N_RB_DL) {
+          case 6:
+            first_rb = 0;
+            break;
+
+          case 15:
+            first_rb = 6;
+            break;
+
+          case 25:
+            first_rb = 11;
+            break;
+
+          case 50:
+            first_rb = 23;
+            break;
+
+          case 100:
+            first_rb = 48;
+            break;
+        }
 
-void
-schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
-{
-    eNB_MAC_INST *eNB = RC.mac[module_idP];
-    COMMON_channels_t *cc;
-    nfapi_dl_config_request_pdu_t *dl_config_pdu;
-    nfapi_tx_request_pdu_t *TX_req;
-    int mib_sdu_length;
-    int CC_id;
-    nfapi_dl_config_request_t *dl_config_request;
-    nfapi_dl_config_request_body_t *dl_req;
-    uint16_t sfn_sf = frameP << 4 | subframeP;
-
-    AssertFatal(subframeP == 0, "Subframe must be 0\n");
-    AssertFatal((frameP & 3) == 0, "Frame must be a multiple of 4\n");
+        vrb_map[first_rb] = 1;
+        vrb_map[first_rb + 1] = 1;
+        vrb_map[first_rb + 2] = 1;
+        vrb_map[first_rb + 3] = 1;
+
+        // Get MCS for length of SI, 3 PRBs
+        if (bcch_sdu_length <= 7) {
+          mcs = 0;
+        } else if (bcch_sdu_length <= 11) {
+          mcs = 1;
+        } else if (bcch_sdu_length <= 18) {
+          mcs = 2;
+        } else if (bcch_sdu_length <= 22) {
+          mcs = 3;
+        } else if (bcch_sdu_length <= 26) {
+          mcs = 4;
+        } else if (bcch_sdu_length <= 28) {
+          mcs = 5;
+        } else if (bcch_sdu_length <= 32) {
+          mcs = 6;
+        } else if (bcch_sdu_length <= 41) {
+          mcs = 7;
+        } else if (bcch_sdu_length <= 49) {
+          mcs = 8;
+        }
 
-    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+        dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+        memset((void *) dl_config_pdu, 0,
+               sizeof(nfapi_dl_config_request_pdu_t));
+        dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
+        dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag                = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format            = NFAPI_DL_DCI_FORMAT_1A;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level     = 4;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti                  = 0xFFFF;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type             = 2;  // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power    = 6000; // equal to RS power
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process          = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                   = 1;  // no TPC
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1  = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1                 = mcs;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1  = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
+        dl_config_request->sfn_sf = sfn_sf;
+
+        if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
+          LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI MBMS\n", frameP, subframeP);
+          dl_req->number_dci++;
+          dl_req->number_pdu++;
+          dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+          memset((void *) dl_config_pdu, 0,
+                 sizeof(nfapi_dl_config_request_pdu_t));
+          dl_config_pdu->pdu_type                                                        = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
+          dl_config_pdu->pdu_size                                                        = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index                              = eNB->pdu_index[CC_id];
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag                                 = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length                                 = bcch_sdu_length;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti                                   = 0xFFFF;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type               = 2; // format 1A/1B/1D
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding                  = getRIV(N_RB_DL, first_rb, 4);
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation                             = 2; //QPSK
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version                     = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks                       = 1; // first block
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag  = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB == 1) ? 0 : 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
+          //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4; // 0 dB
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap                                   = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb                                   = get_subbandsize(cc->mib->message.dl_Bandwidth);  // ignored
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode                      = (cc->p_eNB == 1) ? 1 : 2;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband                 = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector                          = 1;
+          //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
+          dl_req->number_pdu++;
+          // Rel10 fields
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start                           = 3;
+          // Rel13 fields
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 0;   // regular UE
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 2;        // not BR
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = 0xFFFF;   // absolute SF
+          dl_config_request->header.message_id                                           = NFAPI_DL_CONFIG_REQUEST;
+          dl_config_request->sfn_sf                                                      = sfn_sf;
+          // Program TX Request
+          TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
+          TX_req->pdu_length = bcch_sdu_length;
+          TX_req->pdu_index = eNB->pdu_index[CC_id]++;
+          TX_req->num_segments = 1;
+          TX_req->segments[0].segment_length = bcch_sdu_length;
+          TX_req->segments[0].segment_data = cc->BCCH_MBMS_pdu.payload;
+          eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
+          eNB->TX_req[CC_id].sfn_sf = sfn_sf;
+          eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+          eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
+        } else {
+          LOG_E(MAC,
+                "[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI MBMS\n",
+                module_idP, CC_id, frameP, subframeP);
+        }
 
-	dl_config_request = &eNB->DL_req[CC_id];
-	dl_req = &dl_config_request->dl_config_request_body;
-	cc = &eNB->common_channels[CC_id];
+        T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
+          T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
 
-	mib_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MIBCH, 0xFFFF, 1, &cc->MIB_pdu.payload[0], 0);	// not used in this case
+        if (opt_enabled == 1) {
+          trace_pdu(DIRECTION_DOWNLINK,
+                    &cc->BCCH_MBMS_pdu.payload[0],
+                    bcch_sdu_length,
+                    0xffff,
+                    WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
+          LOG_D(OPT,
+                "[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+                module_idP, frameP, CC_id, 0xffff,
+                bcch_sdu_length);
+        }
 
-	LOG_D(MAC, "Frame %d, subframe %d: BCH PDU length %d\n", frameP, subframeP, mib_sdu_length);
+        if (0/*cc->tdd_Config != NULL*/) {  //TDD not for FeMBMS
+          LOG_D(MAC,
+                "[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
+                frameP, CC_id, bcch_sdu_length, mcs);
+        } else {
+          LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-MBMS->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
+        }
 
-	if (mib_sdu_length > 0) {
+        eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
+        eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
+        eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
+        eNB->eNB_stats[CC_id].bcch_mcs = mcs;
+        //printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
+      } else {
+        //LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
+      }
+    }
+  }
 
-	    LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
+  //schedule_SIB1_BR(module_idP, frameP, subframeP);
+  //schedule_SI_BR(module_idP, frameP, subframeP);
+  stop_meas(&eNB->schedule_si_mbms);
+}
 
-	    if ((frameP & 1023) < 40)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-		LOG_D(MAC,
-		      "[eNB %d] Frame %d : MIB->BCH  CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
-		      module_idP, frameP, CC_id, mib_sdu_length,
-		      (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
-#else
-		LOG_D(MAC,
-		      "[eNB %d] Frame %d : MIB->BCH  CC_id %d, Received %d bytes\n",
-		      module_idP, frameP, CC_id, mib_sdu_length);
-#endif
 
-	    dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-	    memset((void *) dl_config_pdu, 0,
-		   sizeof(nfapi_dl_config_request_pdu_t));
-	    dl_config_pdu->pdu_type                                = NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
-		2 + sizeof(nfapi_dl_config_bch_pdu);
-            dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag             = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
-	    dl_config_pdu->bch_pdu.bch_pdu_rel8.length             = mib_sdu_length;
-	    dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index          = eNB->pdu_index[CC_id];
-	    dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
-            dl_req->tl.tag                                         = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-	    dl_req->number_pdu++;
-
-            dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
-            dl_config_request->sfn_sf = sfn_sf;
-
-	    LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
-	    // DL request
-
-	    TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
-	    TX_req->pdu_length = 3;
-	    TX_req->pdu_index = eNB->pdu_index[CC_id]++;
-	    TX_req->num_segments = 1;
-	    TX_req->segments[0].segment_length = 3;
-	    TX_req->segments[0].segment_data = cc[CC_id].MIB_pdu.payload;
-	    eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
-            eNB->TX_req[CC_id].sfn_sf = sfn_sf;
-            eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
-            eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
-	}
+void
+schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
+  eNB_MAC_INST *eNB = RC.mac[module_idP];
+  COMMON_channels_t *cc;
+  nfapi_dl_config_request_pdu_t *dl_config_pdu;
+  nfapi_tx_request_pdu_t *TX_req;
+  int mib_sdu_length;
+  int CC_id;
+  nfapi_dl_config_request_t *dl_config_request;
+  nfapi_dl_config_request_body_t *dl_req;
+  uint16_t sfn_sf = frameP << 4 | subframeP;
+  AssertFatal(subframeP == 0, "Subframe must be 0\n");
+  AssertFatal((frameP & 3) == 0, "Frame must be a multiple of 4\n");
+
+  for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+    dl_config_request = &eNB->DL_req[CC_id];
+    dl_req = &dl_config_request->dl_config_request_body;
+    cc = &eNB->common_channels[CC_id];
+    mib_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MIBCH, 0xFFFF, 1, &cc->MIB_pdu.payload[0], 0); // not used in this case
+    LOG_D(MAC, "Frame %d, subframe %d: BCH PDU length %d\n", frameP, subframeP, mib_sdu_length);
+
+    if (mib_sdu_length > 0) {
+      LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
+
+      if ((frameP & 1023) < 40)
+        LOG_D(MAC,
+              "[eNB %d] Frame %d : MIB->BCH  CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
+              module_idP, frameP, CC_id, mib_sdu_length,
+              (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
+
+      dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+      memset((void *) dl_config_pdu, 0,
+             sizeof(nfapi_dl_config_request_pdu_t));
+      dl_config_pdu->pdu_type                                = NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
+            2 + sizeof(nfapi_dl_config_bch_pdu);
+      dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag             = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
+      dl_config_pdu->bch_pdu.bch_pdu_rel8.length             = mib_sdu_length;
+      dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index          = eNB->pdu_index[CC_id];
+      dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
+      dl_req->tl.tag                                         = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
+      dl_req->number_pdu++;
+      dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
+      dl_config_request->sfn_sf = sfn_sf;
+      LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
+      // DL request
+      TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
+      TX_req->pdu_length = 3;
+      TX_req->pdu_index = eNB->pdu_index[CC_id]++;
+      TX_req->num_segments = 1;
+      TX_req->segments[0].segment_length = 3;
+      TX_req->segments[0].segment_data = cc[CC_id].MIB_pdu.payload;
+      eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
+      eNB->TX_req[CC_id].sfn_sf = sfn_sf;
+      eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+      eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
     }
+  }
 }
 
 
@@ -1041,224 +1002,212 @@ void
 schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
 //------------------------------------------------------------------------------
 {
+  int8_t bcch_sdu_length;
+  int mcs = -1;
+  int CC_id;
+  eNB_MAC_INST *eNB = RC.mac[module_idP];
+  COMMON_channels_t *cc;
+  uint8_t *vrb_map;
+  int first_rb = -1;
+  int N_RB_DL;
+  nfapi_dl_config_request_t      *dl_config_request;
+  nfapi_dl_config_request_pdu_t  *dl_config_pdu;
+  nfapi_tx_request_pdu_t *TX_req;
+  nfapi_dl_config_request_body_t *dl_req;
+  uint16_t sfn_sf = frameP << 4 | subframeP;
+  start_meas(&eNB->schedule_si);
+
+  // Only schedule LTE System Information in subframe 5
+  if (subframeP == 5) {
+    for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
+      cc = &eNB->common_channels[CC_id];
+      vrb_map = (void *) &cc->vrb_map;
+      N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
+      dl_config_request = &eNB->DL_req[CC_id];
+      dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
+      bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH, 0xFFFF,1, &cc->BCCH_pdu.payload[0], 0); // not used in this case
+
+      if (bcch_sdu_length > 0) {
+        LOG_D(MAC, "[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
+
+        // Allocate 4 PRBs in a random location
+        /*
+           while (1) {
+           first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
+           if ((vrb_map[first_rb] != 1) &&
+           (vrb_map[first_rb+1] != 1) &&
+           (vrb_map[first_rb+2] != 1) &&
+           (vrb_map[first_rb+3] != 1))
+           break;
+           }
+         */
+        switch (N_RB_DL) {
+          case 6:
+            first_rb = 0;
+            break;
+
+          case 15:
+            first_rb = 6;
+            break;
+
+          case 25:
+            first_rb = 11;
+            break;
+
+          case 50:
+            first_rb = 23;
+            break;
+
+          case 100:
+            first_rb = 48;
+            break;
+        }
+
+        vrb_map[first_rb] = 1;
+        vrb_map[first_rb + 1] = 1;
+        vrb_map[first_rb + 2] = 1;
+        vrb_map[first_rb + 3] = 1;
+
+        // Get MCS for length of SI, 3 PRBs
+        if (bcch_sdu_length <= 7) {
+          mcs = 0;
+        } else if (bcch_sdu_length <= 11) {
+          mcs = 1;
+        } else if (bcch_sdu_length <= 18) {
+          mcs = 2;
+        } else if (bcch_sdu_length <= 22) {
+          mcs = 3;
+        } else if (bcch_sdu_length <= 26) {
+          mcs = 4;
+        } else if (bcch_sdu_length <= 28) {
+          mcs = 5;
+        } else if (bcch_sdu_length <= 32) {
+          mcs = 6;
+        } else if (bcch_sdu_length <= 41) {
+          mcs = 7;
+        } else if (bcch_sdu_length <= 49) {
+          mcs = 8;
+        } else if (bcch_sdu_length <= 59) {
+          mcs = 9;
+        } else AssertFatal(1==0,"Cannot Assign mcs for bcch_sdu_length %d (max mcs 9)\n",bcch_sdu_length);
+
+        dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+        memset((void *) dl_config_pdu, 0,
+               sizeof(nfapi_dl_config_request_pdu_t));
+        dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
+        dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag                = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format            = NFAPI_DL_DCI_FORMAT_1A;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level     = 4;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti                  = 0xFFFF;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type             = 2;  // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power    = 6000; // equal to RS power
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process          = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                   = 1;  // no TPC
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1  = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1                 = mcs;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1  = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
+        dl_config_request->sfn_sf = sfn_sf;
+
+        if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
+          LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
+          dl_req->number_dci++;
+          dl_req->number_pdu++;
+          dl_req->tl.tag   = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
+          dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+          memset((void *) dl_config_pdu, 0,
+                 sizeof(nfapi_dl_config_request_pdu_t));
+          dl_config_pdu->pdu_type                                                        = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
+          dl_config_pdu->pdu_size                                                        = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index                              = eNB->pdu_index[CC_id];
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag                                 = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length                                 = bcch_sdu_length;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti                                   = 0xFFFF;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type               = 2; // format 1A/1B/1D
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding                  = getRIV(N_RB_DL, first_rb, 4);
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation                             = 2; //QPSK
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version                     = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks                       = 1; // first block
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag  = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB == 1) ? 0 : 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
+          //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4; // 0 dB
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap                                   = 0;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb                                   = get_subbandsize(cc->mib->message.dl_Bandwidth);  // ignored
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode                      = (cc->p_eNB == 1) ? 1 : 2;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband                 = 1;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector                          = 1;
+          //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
+          dl_req->number_pdu++;
+          dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
+          // Rel10 fields
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start                           = 3;
+          // Rel13 fields
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 0;   // regular UE
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 2;        // not BR
+          dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = 0xFFFF;   // absolute SF
+          dl_config_request->header.message_id                                           = NFAPI_DL_CONFIG_REQUEST;
+          dl_config_request->sfn_sf                                                      = sfn_sf;
+          // Program TX Request
+          TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
+          TX_req->pdu_length = bcch_sdu_length;
+          TX_req->pdu_index = eNB->pdu_index[CC_id]++;
+          TX_req->num_segments = 1;
+          TX_req->segments[0].segment_length = bcch_sdu_length;
+          TX_req->segments[0].segment_data = cc->BCCH_pdu.payload;
+          eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
+          eNB->TX_req[CC_id].sfn_sf = sfn_sf;
+          eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+          eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
+        } else {
+          LOG_E(MAC,
+                "[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI\n",
+                module_idP, CC_id, frameP, subframeP);
+        }
+
+        T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
+          T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
 
-    int8_t bcch_sdu_length;
-    int mcs = -1;
-    int CC_id;
-    eNB_MAC_INST *eNB = RC.mac[module_idP];
-    COMMON_channels_t *cc;
-    uint8_t *vrb_map;
-    int first_rb = -1;
-    int N_RB_DL;
-    nfapi_dl_config_request_t      *dl_config_request;
-    nfapi_dl_config_request_pdu_t  *dl_config_pdu;
-    nfapi_tx_request_pdu_t *TX_req;
-    nfapi_dl_config_request_body_t *dl_req;
-    uint16_t sfn_sf = frameP << 4 | subframeP;
-
-    start_meas(&eNB->schedule_si);
-
-    // Only schedule LTE System Information in subframe 5
-    if (subframeP == 5) {
-
-	for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-
-	    cc = &eNB->common_channels[CC_id];
-	    vrb_map = (void *) &cc->vrb_map;
-	    N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
-            dl_config_request = &eNB->DL_req[CC_id];
-	    dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
-
-
-	    bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH, 0xFFFF,1, &cc->BCCH_pdu.payload[0], 0);	// not used in this case
-
-	    if (bcch_sdu_length > 0) {
-		LOG_D(MAC, "[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
-
-		// Allocate 4 PRBs in a random location
-		/*
-		   while (1) {
-		   first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
-		   if ((vrb_map[first_rb] != 1) && 
-		   (vrb_map[first_rb+1] != 1) && 
-		   (vrb_map[first_rb+2] != 1) && 
-		   (vrb_map[first_rb+3] != 1))
-		   break;
-		   }
-		 */
-		switch (N_RB_DL) {
-		case 6:
-		    first_rb = 0;
-		    break;
-		case 15:
-		    first_rb = 6;
-		    break;
-		case 25:
-		    first_rb = 11;
-		    break;
-		case 50:
-		    first_rb = 23;
-		    break;
-		case 100:
-		    first_rb = 48;
-		    break;
-		}
-
-		vrb_map[first_rb] = 1;
-		vrb_map[first_rb + 1] = 1;
-		vrb_map[first_rb + 2] = 1;
-		vrb_map[first_rb + 3] = 1;
-
-		// Get MCS for length of SI, 3 PRBs
-		if (bcch_sdu_length <= 7) {
-		    mcs = 0;
-		} else if (bcch_sdu_length <= 11) {
-		    mcs = 1;
-		} else if (bcch_sdu_length <= 18) {
-		    mcs = 2;
-		} else if (bcch_sdu_length <= 22) {
-		    mcs = 3;
-		} else if (bcch_sdu_length <= 26) {
-		    mcs = 4;
-		} else if (bcch_sdu_length <= 28) {
-		    mcs = 5;
-		} else if (bcch_sdu_length <= 32) {
-		    mcs = 6;
-		} else if (bcch_sdu_length <= 41) {
-		    mcs = 7;
-		} else if (bcch_sdu_length <= 49) {
-		    mcs = 8;
-		} else if (bcch_sdu_length <= 59) {
-                    mcs = 9;
-                } 
-                else AssertFatal(1==0,"Cannot Assign mcs for bcch_sdu_length %d (max mcs 9)\n",bcch_sdu_length);
-
-		dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-		memset((void *) dl_config_pdu, 0,
-		       sizeof(nfapi_dl_config_request_pdu_t));
-		dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
-		dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
-                dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag                = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format            = NFAPI_DL_DCI_FORMAT_1A;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level     = 4;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti                  = 0xFFFF;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type             = 2;	// S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power    = 6000;	// equal to RS power
-
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process          = 0;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                   = 1;	// no TPC
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1  = 0;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1                 = mcs;
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1  = 0;
-
-		dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
-                dl_config_request->sfn_sf = sfn_sf;
-
-		if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
-		    LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
-		    dl_req->number_dci++;
-		    dl_req->number_pdu++;
-                    dl_req->tl.tag   = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-		    dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
-		    memset((void *) dl_config_pdu, 0,
-			   sizeof(nfapi_dl_config_request_pdu_t));
-		    dl_config_pdu->pdu_type                                                        = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
-		    dl_config_pdu->pdu_size                                                        = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index                              = eNB->pdu_index[CC_id];
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag                                 = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length                                 = bcch_sdu_length;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti                                   = 0xFFFF;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type               = 2;	// format 1A/1B/1D
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0;	// localized
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding                  = getRIV(N_RB_DL, first_rb, 4);
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation                             = 2;	//QPSK
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version                     = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks                       = 1;	// first block
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag  = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB == 1) ? 0 : 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
-		    //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4;	// 0 dB
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap                                   = 0;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb                                   = get_subbandsize(cc->mib->message.dl_Bandwidth);	// ignored
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode                      = (cc->p_eNB == 1) ? 1 : 2;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband                 = 1;
-		    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector                          = 1;
-		    //    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ; 
-		    dl_req->number_pdu++;
-		    dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-
-                    // Rel10 fields
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start                           = 3;
-                    // Rel13 fields
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag                                = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 0;   // regular UE
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 2;        // not BR
-                    dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = 0xFFFF;   // absolute SF
-
-                    dl_config_request->header.message_id                                           = NFAPI_DL_CONFIG_REQUEST;
-                    dl_config_request->sfn_sf                                                      = sfn_sf;
-
-		    // Program TX Request
-		    TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
-		    TX_req->pdu_length = bcch_sdu_length;
-		    TX_req->pdu_index = eNB->pdu_index[CC_id]++;
-		    TX_req->num_segments = 1;
-		    TX_req->segments[0].segment_length = bcch_sdu_length;
-		    TX_req->segments[0].segment_data = cc->BCCH_pdu.payload;
-		    eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
-                    eNB->TX_req[CC_id].sfn_sf = sfn_sf;
-                    eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
-                    eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
-
-		} else {
-		    LOG_E(MAC,
-			  "[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI\n",
-			  module_idP, CC_id, frameP, subframeP);
-		}
-
-                T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
-                  T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
-
-		if (opt_enabled == 1) {
-		    trace_pdu(DIRECTION_DOWNLINK,
-			      &cc->BCCH_pdu.payload[0],
-			      bcch_sdu_length,
-			      0xffff,
-			     WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
-		    LOG_D(OPT,
-			  "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-			  module_idP, frameP, CC_id, 0xffff,
-			  bcch_sdu_length);
-		}
-		if (cc->tdd_Config != NULL) {	//TDD
-		    LOG_D(MAC,
-			  "[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
-			  frameP, CC_id, bcch_sdu_length, mcs);
-		} else {
-		    LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
-		}
-
-
-		eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
-		eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
-		eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
-		eNB->eNB_stats[CC_id].bcch_mcs = mcs;
-//printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
-	    } else {
-
-		//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
-	    }
-	}
+        if (opt_enabled == 1) {
+          trace_pdu(DIRECTION_DOWNLINK,
+                    &cc->BCCH_pdu.payload[0],
+                    bcch_sdu_length,
+                    0xffff,
+                    WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
+          LOG_D(OPT,
+                "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+                module_idP, frameP, CC_id, 0xffff,
+                bcch_sdu_length);
+        }
+
+        if (cc->tdd_Config != NULL) { //TDD
+          LOG_D(MAC,
+                "[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
+                frameP, CC_id, bcch_sdu_length, mcs);
+        } else {
+          LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n", frameP, CC_id, bcch_sdu_length, mcs);
+        }
+
+        eNB->eNB_stats[CC_id].total_num_bcch_pdu += 1;
+        eNB->eNB_stats[CC_id].bcch_buffer = bcch_sdu_length;
+        eNB->eNB_stats[CC_id].total_bcch_buffer += bcch_sdu_length;
+        eNB->eNB_stats[CC_id].bcch_mcs = mcs;
+        //printf("SI %d.%d\n", frameP, subframeP);/////////////////////////////////////////******************************
+      } else {
+        //LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
+      }
     }
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    schedule_SIB1_BR(module_idP, frameP, subframeP);
-    schedule_SI_BR(module_idP, frameP, subframeP);
-#endif
+  }
 
+  schedule_SIB1_BR(module_idP, frameP, subframeP);
+  schedule_SI_BR(module_idP, frameP, subframeP);
   stop_meas(&eNB->schedule_si);
 }
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
index 051b1cd77311a722eb9871ee2483f08ae5bd0166..398915e36fc661cef2727865f55cfcde477c103a 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
@@ -566,7 +566,6 @@ schedule_ue_spec(module_id_t module_idP,
     dl_Bandwidth = cc[CC_id].mib->message.dl_Bandwidth;
     N_RB_DL[CC_id] = to_prb(dl_Bandwidth);
     min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id);
-
     // get number of PRBs less those used by common channels
     total_nb_available_rb[CC_id] = N_RB_DL[CC_id];
 
@@ -623,7 +622,6 @@ schedule_ue_spec(module_id_t module_idP,
       LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
             CC_id,
             UE_id);
-
       continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
       rnti = UE_RNTI(module_idP, UE_id);
       ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
@@ -777,7 +775,8 @@ schedule_ue_spec(module_id_t module_idP,
 
           if (ue_sched_ctrl->cdrx_configured) {
             ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
-            /* 
+
+            /*
              * Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
              */
             if (harq_pid == 0) {
@@ -981,11 +980,7 @@ schedule_ue_spec(module_id_t module_idP,
                                           ENB_FLAG_YES,
                                           MBMS_FLAG_NO,
                                           DCCH,
-                                          TBS - ta_len - header_length_total - sdu_length_total - 3
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                          , 0
-                                          , 0
-#endif
+                                          TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
                                          );
           sdu_lengths[0] = 0;
 
@@ -1004,17 +999,14 @@ schedule_ue_spec(module_id_t module_idP,
                                               MBMS_FLAG_NO,
                                               DCCH,
                                               TBS, //not used
-                                              (char *)&dlsch_buffer[0]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                              , 0
-                                              , 0
-#endif
+                                              (char *)&dlsch_buffer[0], 0, 0
                                              );
 
             if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
-              while(pthread_mutex_trylock(&rrc_release_freelist)){
+              while(pthread_mutex_trylock(&rrc_release_freelist)) {
                 /* spin... */
               }
+
               uint16_t release_total = 0;
 
               for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0];
@@ -1061,10 +1053,10 @@ schedule_ue_spec(module_id_t module_idP,
                 if(release_total >= rrc_release_info.num_UEs)
                   break;
               }
+
               pthread_mutex_unlock(&rrc_release_freelist);
             }
 
-
             for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) {
               if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) {
                 for (uint16_t mui_num = 0; mui_num < rlc_am_mui.rrc_mui_num; mui_num++) {
@@ -1125,11 +1117,7 @@ schedule_ue_spec(module_id_t module_idP,
                                           ENB_FLAG_YES,
                                           MBMS_FLAG_NO,
                                           DCCH + 1,
-                                          TBS - ta_len - header_length_total - sdu_length_total - 3
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                          , 0
-                                          , 0
-#endif
+                                          TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
                                          );
           // DCCH SDU
           sdu_lengths[num_sdus] = 0;
@@ -1145,11 +1133,7 @@ schedule_ue_spec(module_id_t module_idP,
                                      ENB_FLAG_YES,
                                      MBMS_FLAG_NO, DCCH + 1,
                                      TBS, //not used
-                                     (char *) &dlsch_buffer[sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                     , 0
-                                     , 0
-#endif
+                                     (char *) &dlsch_buffer[sdu_length_total], 0, 0
                                                      );
             T(T_ENB_MAC_UE_DL_SDU,
               T_INT(module_idP),
@@ -1204,11 +1188,7 @@ schedule_ue_spec(module_id_t module_idP,
                                             ENB_FLAG_YES,
                                             MBMS_FLAG_NO,
                                             lcid,
-                                            TBS - ta_len - header_length_total - sdu_length_total - 3
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                            , 0
-                                            , 0
-#endif
+                                            TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
                                            );
 
             if (rlc_status.bytes_in_buffer > 0) {
@@ -1226,11 +1206,7 @@ schedule_ue_spec(module_id_t module_idP,
                                       MBMS_FLAG_NO,
                                       lcid,
                                       TBS, //not used
-                                      (char *) &dlsch_buffer[sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                      , 0
-                                      , 0
-#endif
+                                      (char *) &dlsch_buffer[sdu_length_total], 0, 0
                                                       );
               T(T_ENB_MAC_UE_DL_SDU,
                 T_INT(module_idP),
@@ -1255,7 +1231,6 @@ schedule_ue_spec(module_id_t module_idP,
               header_length_total += header_length_last;
               num_sdus++;
               ue_sched_ctrl->uplane_inactivity_timer = 0;
-
               // reset RRC inactivity timer after uplane activity
               ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
 
@@ -1579,17 +1554,17 @@ schedule_ue_spec(module_id_t module_idP,
             dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
             eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP;
             eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
-
             /* CDRX */
             ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
 
             if (ue_sched_ctrl->cdrx_configured) {
               ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
               ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
-              /* 
+              /*
                * Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
                */
               VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
+
               if (harq_pid == 0) {
                 VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
               }
@@ -1876,8 +1851,6 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_
   }
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 //------------------------------------------------------------------------------
 /*
  * Default DLSCH scheduler for LTE-M
@@ -2579,7 +2552,6 @@ schedule_ue_spec_br(module_id_t module_idP,
     } // end else if ((subframeP == 7) && (round_DL < 8))
   } // end loop on UE_id
 }
-#endif
 
 //------------------------------------------------------------------------------
 void
@@ -3090,8 +3062,8 @@ schedule_PCH(module_id_t module_idP,
         dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format                  = NFAPI_DL_DCI_FORMAT_1A;
         dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process                = 0;
         dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                         = 1; // no TPC
-	    dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1        = 0;
-	    dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1        = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1        = 0;
+        dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1        = 0;
         dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4);
         dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
 #endif
@@ -3142,7 +3114,6 @@ schedule_PCH(module_id_t module_idP,
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme                    = (cc->p_eNB==1 ) ? 0 : 1;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers                       = 1;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands                     = 1;
-          // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index                         = ;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity                   = 1;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa                                     = 4; // 0 dB
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index               = 0;
@@ -3151,17 +3122,10 @@ schedule_PCH(module_id_t module_idP,
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode                      = (cc->p_eNB==1 ) ? 1 : 2;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband                 = 1;
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector                          = 1;
-          // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector                    = ;
-          // Rel10 fields
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start                           = 3;
-#endif
-          // Rel13 fields
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type                               = 0; // regular UE
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type                    = 2; // not BR
           dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io            = 0xFFFF;
-#endif
           dl_req->number_pdu++;
           eNB->TX_req[CC_id].sfn_sf                                                      = (frameP<<4)+subframeP;
           TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
index c071c1f505d7aad17b990ff33b0b9a9b0e51e906..b1e1fb5d73022fa83a545b933fce51885379971c 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
@@ -134,10 +134,7 @@ void pre_scd_nb_rbs_required(    module_id_t     module_idP,
     for (lc_id = DCCH; lc_id <= DTCH; lc_id++) {
       rlc_status =
         mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
-                           ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           ,0, 0
-#endif
+                           ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0,0, 0
                           );
       UE_template.dl_buffer_total += rlc_status.bytes_in_buffer; //storing the total dlsch buffer
     }
@@ -644,16 +641,18 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t   Mod_id,
     // Get total available RBS count and total UE count
     N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
     temp_total_rbs_count = 0;
-    for(uint8_t rbg_i = 0;rbg_i < N_RBG[CC_id];rbg_i++ ){
-      if(rballoc_sub[CC_id][rbg_i] == 0){
+
+    for(uint8_t rbg_i = 0; rbg_i < N_RBG[CC_id]; rbg_i++ ) {
+      if(rballoc_sub[CC_id][rbg_i] == 0) {
         if((rbg_i == N_RBG[CC_id] -1) &&
-           ((N_RB_DL == 25) || (N_RB_DL == 50))){
+            ((N_RB_DL == 25) || (N_RB_DL == 50))) {
           temp_total_rbs_count += (min_rb_unit[CC_id] -1);
-        }else{
+        } else {
           temp_total_rbs_count += min_rb_unit[CC_id];
         }
       }
     }
+
     temp_total_ue_count = dlsch_ue_select[CC_id].ue_num;
 
     for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) {
@@ -1284,11 +1283,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
         header_len_dcch = 2;  // 2 bytes DCCH SDU subheader
 
         if (TBS - ta_len - header_len_dcch > 0) {
-          rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                          ,0, 0
-#endif
-                                         ); // transport block set size
+          rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch),0, 0); // transport block set size
           sdu_lengths[0] = 0;
 
           if (rlc_status.bytes_in_buffer > 0) { // There is DCCH to transmit
@@ -1297,18 +1292,14 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
                   module_idP, frameP, subframeP, CC_id,
                   TBS - header_len_dcch);
             sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, TBS,  //not used
-                                              (char *)
-                                              &dlsch_buffer
-                                              [0]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                              ,0, 0
-#endif
+                                              (char *) &dlsch_buffer[0],0, 0
                                              );
 
-            if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){
+            if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
               while(pthread_mutex_trylock(&rrc_release_freelist)) {
                 /* spin... */
               }
+
               uint16_t release_total = 0;
 
               for(uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
@@ -1345,6 +1336,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
                 if(release_total >= rrc_release_info.num_UEs)
                   break;
               }
+
               pthread_mutex_unlock(&rrc_release_freelist);
             }
 
@@ -1396,10 +1388,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
 
         // check for DCCH1 and update header information (assume 2 byte sub-header)
         if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) {
-          rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                          ,0, 0
-#endif
+          rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total),0, 0
                                          ); // transport block set size less allocations for timing advance and
           // DCCH SDU
           sdu_lengths[num_sdus] = 0;
@@ -1410,12 +1399,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
                   module_idP, frameP, CC_id,
                   TBS - header_len_dcch - sdu_length_total);
             sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, TBS,  //not used
-                                     (char *)
-                                     &dlsch_buffer
-                                     [sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                     ,0, 0
-#endif
+                                     (char *) &dlsch_buffer[sdu_length_total],0, 0
                                                      );
             T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
               T_INT(CC_id), T_INT(rnti), T_INT(frameP),
@@ -1470,10 +1454,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
                                             ENB_FLAG_YES,
                                             MBMS_FLAG_NO,
                                             lcid,
-                                            TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                            , 0, 0
-#endif
+                                            TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch, 0, 0
                                            );
 
             if (rlc_status.bytes_in_buffer > 0) {
@@ -1491,10 +1472,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
                                       MBMS_FLAG_NO,
                                       lcid,
                                       TBS,  //not used
-                                      (char *)&dlsch_buffer[sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                      , 0, 0
-#endif
+                                      (char *)&dlsch_buffer[sdu_length_total], 0, 0
                                                       );
               T(T_ENB_MAC_UE_DL_SDU,
                 T_INT(module_idP),
@@ -2052,6 +2030,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
       hi_dci0_pdu   = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
       format_flag = 2;
       aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
+
       if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
         cc_id_flag[CC_id] = 1;
         continue;
@@ -2130,7 +2109,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
       hi_dci0_pdu   = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
       format_flag = 2;
       rnti = UE_RNTI(module_idP,first_ue_id[CC_id][temp]);
-      aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0); 
+      aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
+
       if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
         cc_id_flag[CC_id] = 1;
         break;
@@ -2203,6 +2183,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
       hi_dci0_pdu   = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
       format_flag = 2;
       aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
+
       if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
         cc_id_flag[CC_id] = 1;
         continue;
@@ -2256,6 +2237,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
       format_flag = 2;
       rnti = UE_RNTI(module_idP,ul_inactivity_id[CC_id][temp]);
       aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[ul_inactivity_id[CC_id][temp]].dl_cqi[CC_id],format0);
+
       if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
         cc_id_flag[CC_id] = 1;
         continue;
@@ -2454,20 +2436,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
               UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
             }
           } else {
-            if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED){
+            if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) {
               // assigne RBS( 6 RBs)
               first_rb[CC_id] = first_rb[CC_id] + 6;
               UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 6;
               UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5;
               UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
-            }else{
+            } else {
               // assigne RBS( 3 RBs)
               first_rb[CC_id] = first_rb[CC_id] + 3;
               UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 3;
               UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
               UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
             }
-           }
+          }
         } else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority  == SCH_UL_INACTIVE ) {
           // assigne RBS( 3 RBs)
           first_rb[CC_id] = first_rb[CC_id] + 3;
@@ -2766,7 +2748,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
       UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
       harq_pid      = subframe2harqpid(cc,sched_frame,sched_subframeP);
       rnti = UE_RNTI(CC_id,UE_id);
-      aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0); 
+      aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
       LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n",
             module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL);
       int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
@@ -2959,7 +2941,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
                                              get_TBS_UL(UE_template->mcs_UL[harq_pid],
                                                  rb_table[rb_table_index])
                                             );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
         if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
           fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
@@ -2969,8 +2950,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
                                                (frameP*10)+subframeP);
         }
 
-#endif
-
         if(dlsch_flag == 1) {
           if(cqi_req == 1) {
             ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
@@ -3047,7 +3026,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
           LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n",
                 module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid);
 
-
         // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
         //store for possible retransmission
         UE_template->nb_rb_ul[harq_pid]    = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
@@ -3111,7 +3089,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
                                              0, // n_srs
                                              UE_template->TBS_UL[harq_pid]
                                             );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
         if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
           fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
@@ -3121,8 +3098,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t   module_idP,
                                                (frameP*10)+subframeP);
         }
 
-#endif
-
         if(dlsch_flag == 1) {
           if(cqi_req == 1) {
             ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c
index cf358752e88f2ec96585f335bab49a583dde1a20..c0e6b392e5af3238c1d4a4118d55cf8996b5a22d 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c
@@ -48,10 +48,10 @@
 #include "assertions.h"
 
 #if defined(ENABLE_ITTI)
-#include "intertask_interface.h"
+  #include "intertask_interface.h"
 #endif
 
-#include "SIMULATION/TOOLS/sim.h"	// for taus
+#include "SIMULATION/TOOLS/sim.h" // for taus
 
 #define ENABLE_MAC_PAYLOAD_DEBUG
 #define DEBUG_eNB_SCHEDULER 1
@@ -59,757 +59,723 @@
 
 extern RAN_CONTEXT_t RC;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 int8_t
 get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
-		       uint8_t mbsfn_sync_area)
-{
-    // currently there is one-to-one mapping between sf allocation pattern and sync area
-    if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
-	LOG_W(MAC,
-	      "[eNB %d] CC_id %d MBSFN synchronization area %d out of range\n ",
-	      module_idP, CC_id, mbsfn_sync_area);
-	return -1;
-    } else if (RC.mac[module_idP]->
-	       common_channels[CC_id].mbsfn_SubframeConfig[mbsfn_sync_area]
-	       != NULL) {
-	return mbsfn_sync_area;
-    } else {
-	LOG_W(MAC,
-	      "[eNB %d] CC_id %d MBSFN Subframe Config pattern %d not found \n ",
-	      module_idP, CC_id, mbsfn_sync_area);
-	return -1;
-    }
+                       uint8_t mbsfn_sync_area) {
+  // currently there is one-to-one mapping between sf allocation pattern and sync area
+  if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
+    LOG_W(MAC,
+          "[eNB %d] CC_id %d MBSFN synchronization area %d out of range\n ",
+          module_idP, CC_id, mbsfn_sync_area);
+    return -1;
+  } else if (RC.mac[module_idP]->
+             common_channels[CC_id].mbsfn_SubframeConfig[mbsfn_sync_area]
+             != NULL) {
+    return mbsfn_sync_area;
+  } else {
+    LOG_W(MAC,
+          "[eNB %d] CC_id %d MBSFN Subframe Config pattern %d not found \n ",
+          module_idP, CC_id, mbsfn_sync_area);
+    return -1;
+  }
 }
 
 int
 schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
-	      sub_frame_t subframeP)
-{
-
-    int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
-    int mbsfn_period = 0;	// 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
-    int mcch_period = 0;	//32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
-    int mch_scheduling_period =
-	8 << (RC.mac[module_idP]->common_channels[CC_id].
-	      pmch_Config[0]->mch_SchedulingPeriod_r9);
-    unsigned char mcch_sdu_length;
-    unsigned char header_len_mcch = 0, header_len_msi =
-	0, header_len_mtch = 0, header_len_mtch_temp =
-	0, header_len_mcch_temp = 0, header_len_msi_temp = 0;
-    int ii = 0, msi_pos = 0;
-    int mcch_mcs = -1;
-    uint16_t TBS, j = -1, padding = 0, post_padding = 0;
-    mac_rlc_status_resp_t rlc_status;
-    int num_mtch;
-    int msi_length, i, k;
-    unsigned char sdu_lcids[11], num_sdus = 0, offset = 0;
-    uint16_t sdu_lengths[11], sdu_length_total = 0;
-    unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES];	// check the max value, this is for dlsch only
-
-    COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
-
-    cc->MCH_pdu.Pdu_size = 0;
-
-    for (i = 0; i < cc->num_active_mbsfn_area; i++) {
-	// assume, that there is always a mapping
-	if ((j = get_mbsfn_sf_alloction(module_idP, CC_id, i)) == -1) {
-	    return 0;
-	}
-
-	mbsfn_period =
-	    1 << (cc->mbsfn_SubframeConfig[j]->radioframeAllocationPeriod);
-	mcch_period =
-	    32 << (cc->mbsfn_AreaInfo[i]->
-		   mcch_Config_r9.mcch_RepetitionPeriod_r9);
-	msi_pos = 0;
-	ii = 0;
-	LOG_D(MAC,
-	      "[eNB %d] CC_id %d Frame %d subframeP %d : Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n",
-	      module_idP, CC_id, frameP, subframeP, i,
-	      cc->num_active_mbsfn_area, j, cc->num_sf_allocation_pattern,
-	      mbsfn_period, mcch_period);
-
-
-	switch (cc->mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) {
-	case 0:
-	    mcch_mcs = 2;
-	    break;
-
-	case 1:
-	    mcch_mcs = 7;
-	    break;
-
-	case 2:
-	    mcch_mcs = 13;
-	    break;
-
-	case 3:
-	    mcch_mcs = 19;
-	    break;
-	}
-
-	// 1st: Check the MBSFN subframes from SIB2 info (SF allocation pattern i, max 8 non-overlapping patterns exist)
-	if (frameP % mbsfn_period == cc->mbsfn_SubframeConfig[j]->radioframeAllocationOffset) {	// MBSFN frameP
-	    if (cc->mbsfn_SubframeConfig[j]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {	// one-frameP format
-
-		//  Find the first subframeP in this MCH to transmit MSI
-		if (frameP % mch_scheduling_period ==
-		    cc->mbsfn_SubframeConfig[j]->
-		    radioframeAllocationOffset) {
-		    while (ii == 0) {
-			ii = cc->
-			    mbsfn_SubframeConfig[j]->subframeAllocation.
-			    choice.oneFrame.buf[0] & (0x80 >> msi_pos);
-			msi_pos++;
-		    }
-
-		    LOG_D(MAC,
-			  "[eNB %d] CC_id %d Frame %d subframeP %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n",
-			  module_idP, CC_id, frameP, subframeP, i, j,
-			  cc->mbsfn_SubframeConfig[j]->
-			  subframeAllocation.choice.oneFrame.buf[0],
-			  msi_pos);
-		}
-		// Check if the subframeP is for MSI, MCCH or MTCHs and Set the correspoding flag to 1
-		switch (subframeP) {
-		case 1:
-		    if (cc->tdd_Config == NULL) {
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF1) ==
-			    MBSFN_FDD_SF1) {
-			    if (msi_pos == 1) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF1) ==
-				 MBSFN_FDD_SF1)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 2:
-		    if (cc->tdd_Config == NULL) {
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF2) ==
-			    MBSFN_FDD_SF2) {
-			    if (msi_pos == 2) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF2) ==
-				 MBSFN_FDD_SF2)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 3:
-		    if (cc->tdd_Config != NULL) {	// TDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_TDD_SF3) ==
-			    MBSFN_TDD_SF3) {
-			    if (msi_pos == 1) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_TDD_SF3) ==
-				 MBSFN_TDD_SF3)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    } else {	// FDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF3) ==
-			    MBSFN_FDD_SF3) {
-			    if (msi_pos == 3) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF3) ==
-				 MBSFN_FDD_SF3)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 4:
-		    if (cc->tdd_Config != NULL) {
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_TDD_SF4) ==
-			    MBSFN_TDD_SF4) {
-			    if (msi_pos == 2) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_TDD_SF4) ==
-				 MBSFN_TDD_SF4)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 6:
-		    if (cc->tdd_Config == NULL) {
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF6) ==
-			    MBSFN_FDD_SF6) {
-			    if (msi_pos == 4) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF6) ==
-				 MBSFN_FDD_SF6)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 7:
-		    if (cc->tdd_Config != NULL) {	// TDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_TDD_SF7) ==
-			    MBSFN_TDD_SF7) {
-			    if (msi_pos == 3) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_TDD_SF7) ==
-				 MBSFN_TDD_SF7)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    } else {	// FDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF7) ==
-			    MBSFN_FDD_SF7) {
-			    if (msi_pos == 5) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF7) ==
-				 MBSFN_FDD_SF7)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 8:
-		    if (cc->tdd_Config != NULL) {	//TDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_TDD_SF8) ==
-			    MBSFN_TDD_SF8) {
-			    if (msi_pos == 4) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_TDD_SF8) ==
-				 MBSFN_TDD_SF8)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    } else {	// FDD
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_FDD_SF8) ==
-			    MBSFN_FDD_SF8) {
-			    if (msi_pos == 6) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_FDD_SF8) ==
-				 MBSFN_FDD_SF8)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-
-		case 9:
-		    if (cc->tdd_Config != NULL) {
-			if ((cc->
-			     mbsfn_SubframeConfig[j]->subframeAllocation.
-			     choice.oneFrame.buf[0] & MBSFN_TDD_SF9) ==
-			    MBSFN_TDD_SF9) {
-			    if (msi_pos == 5) {
-				msi_flag = 1;
-			    }
-
-			    if ((frameP % mcch_period ==
-				 cc->mbsfn_AreaInfo[i]->
-				 mcch_Config_r9.mcch_Offset_r9)
-				&&
-				((cc->mbsfn_AreaInfo[i]->
-				  mcch_Config_r9.sf_AllocInfo_r9.
-				  buf[0] & MBSFN_TDD_SF9) ==
-				 MBSFN_TDD_SF9)) {
-				mcch_flag = 1;
-			    }
-
-			    mtch_flag = 1;
-			}
-		    }
-
-		    break;
-		}		// end switch
-
-		// sf allocation is non-overlapping
-		if ((msi_flag == 1) || (mcch_flag == 1)
-		    || (mtch_flag == 1)) {
-		    LOG_D(MAC,
-			  "[eNB %d] CC_id %d Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n",
-			  module_idP, CC_id, frameP, subframeP, i, j,
-			  msi_flag, mcch_flag, mtch_flag);
-		    break;
-		}
-	    } else {		// four-frameP format
-	    }
-	}
-    }				// end of for loop
-
-    cc->msi_active = 0;
-    cc->mcch_active = 0;
-    cc->mtch_active = 0;
-
-    // Calculate the mcs
-    if ((msi_flag == 1) || (mcch_flag == 1)) {
-	cc->MCH_pdu.mcs = mcch_mcs;
-    } else if (mtch_flag == 1) {	// only MTCH in this subframeP
-	cc->MCH_pdu.mcs = cc->pmch_Config[0]->dataMCS_r9;
+              sub_frame_t subframeP) {
+  int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
+  int mbsfn_period = 0; // 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
+  int mcch_period = 0;  //32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
+  int mch_scheduling_period =
+    8 << (RC.mac[module_idP]->common_channels[CC_id].
+          pmch_Config[0]->mch_SchedulingPeriod_r9);
+  unsigned char mcch_sdu_length;
+  unsigned char header_len_mcch = 0, header_len_msi =
+                                    0, header_len_mtch = 0, header_len_mtch_temp =
+                                          0, header_len_mcch_temp = 0, header_len_msi_temp = 0;
+  int ii = 0, msi_pos = 0;
+  int mcch_mcs = -1;
+  uint16_t TBS, j = -1, padding = 0, post_padding = 0;
+  mac_rlc_status_resp_t rlc_status;
+  int num_mtch;
+  int msi_length, i, k;
+  unsigned char sdu_lcids[11], num_sdus = 0, offset = 0;
+  uint16_t sdu_lengths[11], sdu_length_total = 0;
+  unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES];  // check the max value, this is for dlsch only
+  COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
+  cc->MCH_pdu.Pdu_size = 0;
+
+  for (i = 0; i < cc->num_active_mbsfn_area; i++) {
+    // assume, that there is always a mapping
+    if ((j = get_mbsfn_sf_alloction(module_idP, CC_id, i)) == -1) {
+      return 0;
     }
-    // 2nd: Create MSI, get MCCH from RRC and MTCHs from RLC
-
-    // there is MSI (MCH Scheduling Info)
-    if (msi_flag == 1) {
-	// Create MSI here
-	uint16_t msi_control_element[29], *msi_ptr;
-
-	msi_ptr = &msi_control_element[0];
-	((MSI_ELEMENT *) msi_ptr)->lcid = MCCH_LCHANID;	//MCCH
-
-	if (mcch_flag == 1) {
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0;
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0;
-	} else {		// no mcch for this MSP
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0x7;	// stop value is 2047
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0xff;
-	}
-
-	msi_ptr += sizeof(MSI_ELEMENT);
-
-	//Header for MTCHs
-	num_mtch = cc->mbms_SessionList[0]->list.count;
-
-	for (k = 0; k < num_mtch; k++) {	// loop for all session in this MCH (MCH[0]) at this moment
-	    ((MSI_ELEMENT *) msi_ptr)->lcid = cc->mbms_SessionList[0]->list.array[k]->logicalChannelIdentity_r9;	//mtch_lcid;
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0;	// last subframeP of this mtch (only one mtch now)
-	    ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0xB;
-	    msi_ptr += sizeof(MSI_ELEMENT);
-	}
-
-	msi_length = msi_ptr - msi_control_element;
-
-	if (msi_length < 128) {
-	    header_len_msi = 2;
-	} else {
-	    header_len_msi = 3;
-	}
-
-	LOG_D(MAC,
-	      "[eNB %d] CC_id %d Frame %d : MSI->MCH, length of MSI is %d bytes \n",
-	      module_idP, CC_id, frameP, msi_length);
-	//LOG_D(MAC,"Scheduler: MSI is transmitted in this subframeP \n" );
-
-	//   LOG_D(MAC,"Scheduler: MSI length is %d bytes\n",msi_length);
-	// Store MSI data to mch_buffer[0]
-	memcpy((char *) &mch_buffer[sdu_length_total],
-	       msi_control_element, msi_length);
-
-	sdu_lcids[num_sdus] = MCH_SCHDL_INFO;
-	sdu_lengths[num_sdus] = msi_length;
-	sdu_length_total += sdu_lengths[num_sdus];
-	LOG_I(MAC, "[eNB %d] CC_id %d Create %d bytes for MSI\n",
-	      module_idP, CC_id, sdu_lengths[num_sdus]);
-	num_sdus++;
-	cc->msi_active = 1;
+
+    mbsfn_period =
+      1 << (cc->mbsfn_SubframeConfig[j]->radioframeAllocationPeriod);
+    mcch_period =
+      32 << (cc->mbsfn_AreaInfo[i]->
+             mcch_Config_r9.mcch_RepetitionPeriod_r9);
+    msi_pos = 0;
+    ii = 0;
+    LOG_D(MAC,
+          "[eNB %d] CC_id %d Frame %d subframeP %d : Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n",
+          module_idP, CC_id, frameP, subframeP, i,
+          cc->num_active_mbsfn_area, j, cc->num_sf_allocation_pattern,
+          mbsfn_period, mcch_period);
+
+    switch (cc->mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) {
+      case 0:
+        mcch_mcs = 2;
+        break;
+
+      case 1:
+        mcch_mcs = 7;
+        break;
+
+      case 2:
+        mcch_mcs = 13;
+        break;
+
+      case 3:
+        mcch_mcs = 19;
+        break;
     }
-    // there is MCCH
-    if (mcch_flag == 1) {
-	LOG_D(MAC,
-	      "[eNB %d] CC_id %d Frame %d Subframe %d: Schedule MCCH MESSAGE (area %d, sfAlloc %d)\n",
-	      module_idP, CC_id, frameP, subframeP, i, j);
-
-	mcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MCCH, 0xFFFC, 1, &cc->MCCH_pdu.payload[0], 
-					   i);	// this is the mbsfn sync area index
-
-	if (mcch_sdu_length > 0) {
-	    LOG_D(MAC,
-		  "[eNB %d] CC_id %d Frame %d subframeP %d : MCCH->MCH, Received %d bytes from RRC \n",
-		  module_idP, CC_id, frameP, subframeP, mcch_sdu_length);
-
-	    header_len_mcch = 2;
-
-	    if (cc->tdd_Config != NULL) {
-		LOG_D(MAC,
-		      "[eNB %d] CC_id %d Frame %d subframeP %d: Scheduling MCCH->MCH (TDD) for MCCH message %d bytes (mcs %d )\n",
-		      module_idP, CC_id, frameP, subframeP,
-		      mcch_sdu_length, mcch_mcs);
-	    } else {
-		LOG_I(MAC,
-		      "[eNB %d] CC_id %d Frame %d subframeP %d: Scheduling MCCH->MCH (FDD) for MCCH message %d bytes (mcs %d)\n",
-		      module_idP, CC_id, frameP, subframeP,
-		      mcch_sdu_length, mcch_mcs);
-	    }
-
-	    cc->mcch_active = 1;
-
-	    memcpy((char *) &mch_buffer[sdu_length_total],
-		   &cc->MCCH_pdu.payload[0], mcch_sdu_length);
-	    sdu_lcids[num_sdus] = MCCH_LCHANID;
-	    sdu_lengths[num_sdus] = mcch_sdu_length;
-
-	    if (sdu_lengths[num_sdus] > 128) {
-		header_len_mcch = 3;
-	    }
-
-	    sdu_length_total += sdu_lengths[num_sdus];
-	    LOG_D(MAC,
-		  "[eNB %d] CC_id %d Got %d bytes for MCCH from RRC \n",
-		  module_idP, CC_id, sdu_lengths[num_sdus]);
-	    num_sdus++;
-	}
+
+    // 1st: Check the MBSFN subframes from SIB2 info (SF allocation pattern i, max 8 non-overlapping patterns exist)
+    if (frameP % mbsfn_period == cc->mbsfn_SubframeConfig[j]->radioframeAllocationOffset) { // MBSFN frameP
+      if (cc->mbsfn_SubframeConfig[j]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {  // one-frameP format
+
+        //  Find the first subframeP in this MCH to transmit MSI
+        if (frameP % mch_scheduling_period ==
+            cc->mbsfn_SubframeConfig[j]->
+            radioframeAllocationOffset) {
+          while (ii == 0) {
+            ii = cc->
+                 mbsfn_SubframeConfig[j]->subframeAllocation.
+                 choice.oneFrame.buf[0] & (0x80 >> msi_pos);
+            msi_pos++;
+          }
+
+          LOG_D(MAC,
+                "[eNB %d] CC_id %d Frame %d subframeP %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n",
+                module_idP, CC_id, frameP, subframeP, i, j,
+                cc->mbsfn_SubframeConfig[j]->
+                subframeAllocation.choice.oneFrame.buf[0],
+                msi_pos);
+        }
+
+        // Check if the subframeP is for MSI, MCCH or MTCHs and Set the correspoding flag to 1
+        switch (subframeP) {
+          case 1:
+            if (cc->tdd_Config == NULL) {
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF1) ==
+                  MBSFN_FDD_SF1) {
+                if (msi_pos == 1) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF1) ==
+                     MBSFN_FDD_SF1)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 2:
+            if (cc->tdd_Config == NULL) {
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF2) ==
+                  MBSFN_FDD_SF2) {
+                if (msi_pos == 2) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF2) ==
+                     MBSFN_FDD_SF2)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 3:
+            if (cc->tdd_Config != NULL) { // TDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_TDD_SF3) ==
+                  MBSFN_TDD_SF3) {
+                if (msi_pos == 1) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_TDD_SF3) ==
+                     MBSFN_TDD_SF3)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            } else {  // FDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF3) ==
+                  MBSFN_FDD_SF3) {
+                if (msi_pos == 3) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF3) ==
+                     MBSFN_FDD_SF3)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 4:
+            if (cc->tdd_Config != NULL) {
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_TDD_SF4) ==
+                  MBSFN_TDD_SF4) {
+                if (msi_pos == 2) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_TDD_SF4) ==
+                     MBSFN_TDD_SF4)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 6:
+            if (cc->tdd_Config == NULL) {
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF6) ==
+                  MBSFN_FDD_SF6) {
+                if (msi_pos == 4) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF6) ==
+                     MBSFN_FDD_SF6)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 7:
+            if (cc->tdd_Config != NULL) { // TDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_TDD_SF7) ==
+                  MBSFN_TDD_SF7) {
+                if (msi_pos == 3) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_TDD_SF7) ==
+                     MBSFN_TDD_SF7)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            } else {  // FDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF7) ==
+                  MBSFN_FDD_SF7) {
+                if (msi_pos == 5) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF7) ==
+                     MBSFN_FDD_SF7)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 8:
+            if (cc->tdd_Config != NULL) { //TDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_TDD_SF8) ==
+                  MBSFN_TDD_SF8) {
+                if (msi_pos == 4) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_TDD_SF8) ==
+                     MBSFN_TDD_SF8)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            } else {  // FDD
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_FDD_SF8) ==
+                  MBSFN_FDD_SF8) {
+                if (msi_pos == 6) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_FDD_SF8) ==
+                     MBSFN_FDD_SF8)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+
+          case 9:
+            if (cc->tdd_Config != NULL) {
+              if ((cc->
+                   mbsfn_SubframeConfig[j]->subframeAllocation.
+                   choice.oneFrame.buf[0] & MBSFN_TDD_SF9) ==
+                  MBSFN_TDD_SF9) {
+                if (msi_pos == 5) {
+                  msi_flag = 1;
+                }
+
+                if ((frameP % mcch_period ==
+                     cc->mbsfn_AreaInfo[i]->
+                     mcch_Config_r9.mcch_Offset_r9)
+                    &&
+                    ((cc->mbsfn_AreaInfo[i]->
+                      mcch_Config_r9.sf_AllocInfo_r9.
+                      buf[0] & MBSFN_TDD_SF9) ==
+                     MBSFN_TDD_SF9)) {
+                  mcch_flag = 1;
+                }
+
+                mtch_flag = 1;
+              }
+            }
+
+            break;
+        }   // end switch
+
+        // sf allocation is non-overlapping
+        if ((msi_flag == 1) || (mcch_flag == 1)
+            || (mtch_flag == 1)) {
+          LOG_D(MAC,
+                "[eNB %d] CC_id %d Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n",
+                module_idP, CC_id, frameP, subframeP, i, j,
+                msi_flag, mcch_flag, mtch_flag);
+          break;
+        }
+      } else {    // four-frameP format
+      }
     }
+  }       // end of for loop
 
-    TBS =
-	get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    // do not let mcch and mtch multiplexing when relaying is active
-    // for sync area 1, so not transmit data
-    //if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) {
-#endif
+  cc->msi_active = 0;
+  cc->mcch_active = 0;
+  cc->mtch_active = 0;
 
-    // there is MTCHs, loop if there are more than 1
-    if (mtch_flag == 1) {
-	// Calculate TBS
-	/* if ((msi_flag==1) || (mcch_flag==1)) {
-	   TBS = mac_xface->get_TBS(mcch_mcs, mac_xface->frame_parms->N_RB_DL);
-	   }
-	   else { // only MTCH in this subframeP
-	   TBS = mac_xface->get_TBS(RC.mac[module_idP]->pmch_Config[0]->dataMCS_r9, mac_xface->frame_parms->N_RB_DL);
-	   }
-
-	   // get MTCH data from RLC (like for DTCH)
-	   LOG_D(MAC,"[eNB %d] CC_id %d Frame %d subframe %d: Schedule MTCH (area %d, sfAlloc %d)\n",Mod_id,CC_id,frame,subframe,i,j);
-
-	   header_len_mtch = 3;
-	   LOG_D(MAC,"[eNB %d], CC_id %d, Frame %d, MTCH->MCH, Checking RLC status (rab %d, tbs %d, len %d)\n",
-	   Mod_id,CC_id,frame,MTCH,TBS,
-	   TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
-
-	   rlc_status = mac_rlc_status_ind(Mod_id,frame,1,RLC_MBMS_YES,MTCH+ (maxDRB + 3) * MAX_MOBILES_PER_RG,
-	   TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
-	   printf("frame %d, subframe %d,  rlc_status.bytes_in_buffer is %d\n",frame,subframe, rlc_status.bytes_in_buffer);
-
-	 */
-
-	// get MTCH data from RLC (like for DTCH)
-	LOG_D(MAC,
-	      "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n",
-	      module_idP, CC_id, frameP, subframeP, i, j);
-
-	header_len_mtch = 3;
-	LOG_D(MAC,
-	      "[eNB %d], CC_id %d, Frame %d, MTCH->MCH, Checking RLC status (rab %d, tbs %d, len %d)\n",
-	      module_idP, CC_id, frameP, MTCH, TBS,
-	      TBS - header_len_mcch - header_len_msi - sdu_length_total -
-	      header_len_mtch);
-
-	rlc_status =
-	    mac_rlc_status_ind(module_idP, 0, frameP, subframeP,
-			       module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
-			       MTCH,
-			       TBS - header_len_mcch - header_len_msi -
-			       sdu_length_total - header_len_mtch
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                    ,0, 0
-#endif
-                                    );
-
-	LOG_D(MAC,
-	      "e-MBMS log channel %u frameP %d, subframeP %d,  rlc_status.bytes_in_buffer is %d\n",
-	      MTCH, frameP, subframeP, rlc_status.bytes_in_buffer);
-
-	if (rlc_status.bytes_in_buffer > 0) {
-	    LOG_I(MAC,
-		  "[eNB %d][MBMS USER-PLANE], CC_id %d, Frame %d, MTCH->MCH, Requesting %d bytes from RLC (header len mtch %d)\n",
-		  module_idP, CC_id, frameP,
-		  TBS - header_len_mcch - header_len_msi -
-		  sdu_length_total - header_len_mtch, header_len_mtch);
-
-	    sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0,	//not used
-						     (char *)
-						     &mch_buffer[sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,0,
-                                 0
-#endif
-                                 );
+  // Calculate the mcs
+  if ((msi_flag == 1) || (mcch_flag == 1)) {
+    cc->MCH_pdu.mcs = mcch_mcs;
+  } else if (mtch_flag == 1) {  // only MTCH in this subframeP
+    cc->MCH_pdu.mcs = cc->pmch_Config[0]->dataMCS_r9;
+  }
+
+  // 2nd: Create MSI, get MCCH from RRC and MTCHs from RLC
 
+  // there is MSI (MCH Scheduling Info)
+  if (msi_flag == 1) {
+    // Create MSI here
+    uint16_t msi_control_element[29], *msi_ptr;
+    msi_ptr = &msi_control_element[0];
+    ((MSI_ELEMENT *) msi_ptr)->lcid = MCCH_LCHANID; //MCCH
 
-	    //sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO,  MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
-	    LOG_I(MAC,
-		  "[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
-		  module_idP, CC_id, sdu_lengths[num_sdus], MTCH);
-	    cc->mtch_active = 1;
-	    sdu_lcids[num_sdus] = MTCH;
-	    sdu_length_total += sdu_lengths[num_sdus];
+    if (mcch_flag == 1) {
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0;
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0;
+    } else {    // no mcch for this MSP
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0x7; // stop value is 2047
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0xff;
+    }
 
-	    if (sdu_lengths[num_sdus] < 128) {
-		header_len_mtch = 2;
-	    }
+    msi_ptr += sizeof(MSI_ELEMENT);
+    //Header for MTCHs
+    num_mtch = cc->mbms_SessionList[0]->list.count;
 
-	    num_sdus++;
-	} else {
-	    header_len_mtch = 0;
-	}
+    for (k = 0; k < num_mtch; k++) {  // loop for all session in this MCH (MCH[0]) at this moment
+      ((MSI_ELEMENT *) msi_ptr)->lcid = cc->mbms_SessionList[0]->list.array[k]->logicalChannelIdentity_r9;  //mtch_lcid;
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0; // last subframeP of this mtch (only one mtch now)
+      ((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0xB;
+      msi_ptr += sizeof(MSI_ELEMENT);
     }
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    //  }
-#endif
 
-    // FINAL STEP: Prepare and multiplexe MSI, MCCH and MTCHs
-    if ((sdu_length_total + header_len_msi + header_len_mcch +
-	 header_len_mtch) > 0) {
-	// Adjust the last subheader
-	/*                                 if ((msi_flag==1) || (mcch_flag==1)) {
-	   RC.mac[module_idP]->MCH_pdu.mcs = mcch_mcs;
-	   }
-	   else if (mtch_flag == 1) { // only MTCH in this subframeP
-	   RC.mac[module_idP]->MCH_pdu.mcs = RC.mac[module_idP]->pmch_Config[0]->dataMCS_r9;
-	   }
-	 */
-	header_len_mtch_temp = header_len_mtch;
-	header_len_mcch_temp = header_len_mcch;
-	header_len_msi_temp = header_len_msi;
-
-	if (header_len_mtch > 0) {
-	    header_len_mtch = 1;	// remove Length field in the  subheader for the last PDU
-	} else if (header_len_mcch > 0) {
-	    header_len_mcch = 1;
-	} else {
-	    header_len_msi = 1;
-	}
-
-	// Calculate the padding
-	if ((TBS - header_len_mtch - header_len_mcch - header_len_msi -
-	     sdu_length_total) < 0) {
-	    LOG_E(MAC, "Error in building MAC PDU, TBS %d < PDU %d \n",
-		  TBS,
-		  header_len_mtch + header_len_mcch + header_len_msi +
-		  sdu_length_total);
-	    return 0;
-	} else
-	    if ((TBS - header_len_mtch - header_len_mcch - header_len_msi -
-		 sdu_length_total) <= 2) {
-	    padding =
-		(TBS - header_len_mtch - header_len_mcch - header_len_msi -
-		 sdu_length_total);
-	    post_padding = 0;
-	} else {		// using post_padding, give back the Length field of subheader  for the last PDU
-	    padding = 0;
-
-	    if (header_len_mtch > 0) {
-		header_len_mtch = header_len_mtch_temp;
-	    } else if (header_len_mcch > 0) {
-		header_len_mcch = header_len_mcch_temp;
-	    } else {
-		header_len_msi = header_len_msi_temp;
-	    }
-
-	    post_padding =
-		TBS - sdu_length_total - header_len_msi - header_len_mcch -
-		header_len_mtch;
-	}
-
-	// Generate the MAC Header for MCH
-	// here we use the function for DLSCH because DLSCH & MCH have the same Header structure
-	offset = generate_dlsch_header((unsigned char *) cc->MCH_pdu.payload, num_sdus, sdu_lengths, sdu_lcids, 255,	// no drx
-				       31,	// no timing advance
-				       NULL,	// no contention res id
-				       padding, post_padding);
-
-	cc->MCH_pdu.Pdu_size = TBS;
-	cc->MCH_pdu.sync_area = i;
-	cc->MCH_pdu.msi_active = cc->msi_active;
-	cc->MCH_pdu.mcch_active = cc->mcch_active;
-	cc->MCH_pdu.mtch_active = cc->mtch_active;
-	LOG_D(MAC,
-	      " MCS for this sf is %d (mcch active %d, mtch active %d)\n",
-	      cc->MCH_pdu.mcs, cc->MCH_pdu.mcch_active,
-	      cc->MCH_pdu.mtch_active);
-	LOG_I(MAC,
-	      "[eNB %d][MBMS USER-PLANE ] CC_id %d Generate header : sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,padding %d,post_padding %d (mcs %d, TBS %d), header MTCH %d, header MCCH %d, header MSI %d\n",
-	      module_idP, CC_id, sdu_length_total, num_sdus,
-	      sdu_lengths[0], sdu_lcids[0], offset, padding, post_padding,
-	      cc->MCH_pdu.mcs, TBS, header_len_mtch, header_len_mcch,
-	      header_len_msi);
-	// copy SDU to mch_pdu after the MAC Header
-	memcpy(&cc->MCH_pdu.payload[offset], mch_buffer, sdu_length_total);
-
-	// filling remainder of MCH with random data if necessery
-	for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
-	    cc->MCH_pdu.payload[offset + sdu_length_total + j] =
-		(char) (taus() & 0xff);
-	}
-
-	/* Tracing of PDU is done on UE side */
-	if (opt_enabled == 1) {
-	    trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI , 0xffff,	// M_RNTI = 6 in wirehsark
-		      RC.mac[module_idP]->frame,
-		      RC.mac[module_idP]->subframe, 0, 0);
-	    LOG_D(OPT,
-		  "[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
-		  module_idP, CC_id, frameP, TBS);
-	}
-
-	/*
-	   for (j=0;j<sdu_length_total;j++)
-	   printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
-	   printf(" \n"); */
-	return 1;
+    msi_length = msi_ptr - msi_control_element;
+
+    if (msi_length < 128) {
+      header_len_msi = 2;
     } else {
-	cc->MCH_pdu.Pdu_size = 0;
-	cc->MCH_pdu.sync_area = 0;
-	cc->MCH_pdu.msi_active = 0;
-	cc->MCH_pdu.mcch_active = 0;
-	cc->MCH_pdu.mtch_active = 0;
-	// for testing purpose, fill with random data
-	//for (j=0;j<(TBS-sdu_length_total-offset);j++)
-	//  RC.mac[module_idP]->MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
-	return 0;
+      header_len_msi = 3;
     }
 
-    //this is for testing
-    /*
-       if (mtch_flag == 1) {
-       //  LOG_D(MAC,"DUY: mch_buffer length so far is : %ld\n", &mch_buffer[sdu_length_total]-&mch_buffer[0]);
-       return 1;
+    LOG_D(MAC,
+          "[eNB %d] CC_id %d Frame %d : MSI->MCH, length of MSI is %d bytes \n",
+          module_idP, CC_id, frameP, msi_length);
+    //LOG_D(MAC,"Scheduler: MSI is transmitted in this subframeP \n" );
+    //   LOG_D(MAC,"Scheduler: MSI length is %d bytes\n",msi_length);
+    // Store MSI data to mch_buffer[0]
+    memcpy((char *) &mch_buffer[sdu_length_total],
+           msi_control_element, msi_length);
+    sdu_lcids[num_sdus] = MCH_SCHDL_INFO;
+    sdu_lengths[num_sdus] = msi_length;
+    sdu_length_total += sdu_lengths[num_sdus];
+    LOG_I(MAC, "[eNB %d] CC_id %d Create %d bytes for MSI\n",
+          module_idP, CC_id, sdu_lengths[num_sdus]);
+    num_sdus++;
+    cc->msi_active = 1;
+  }
+
+  // there is MCCH
+  if (mcch_flag == 1) {
+    LOG_D(MAC,
+          "[eNB %d] CC_id %d Frame %d Subframe %d: Schedule MCCH MESSAGE (area %d, sfAlloc %d)\n",
+          module_idP, CC_id, frameP, subframeP, i, j);
+    mcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MCCH, 0xFFFC, 1, &cc->MCCH_pdu.payload[0],
+                                       i);  // this is the mbsfn sync area index
+
+    if (mcch_sdu_length > 0) {
+      LOG_D(MAC,
+            "[eNB %d] CC_id %d Frame %d subframeP %d : MCCH->MCH, Received %d bytes from RRC \n",
+            module_idP, CC_id, frameP, subframeP, mcch_sdu_length);
+      header_len_mcch = 2;
+
+      if (cc->tdd_Config != NULL) {
+        LOG_D(MAC,
+              "[eNB %d] CC_id %d Frame %d subframeP %d: Scheduling MCCH->MCH (TDD) for MCCH message %d bytes (mcs %d )\n",
+              module_idP, CC_id, frameP, subframeP,
+              mcch_sdu_length, mcch_mcs);
+      } else {
+        LOG_I(MAC,
+              "[eNB %d] CC_id %d Frame %d subframeP %d: Scheduling MCCH->MCH (FDD) for MCCH message %d bytes (mcs %d)\n",
+              module_idP, CC_id, frameP, subframeP,
+              mcch_sdu_length, mcch_mcs);
+      }
+
+      cc->mcch_active = 1;
+      memcpy((char *) &mch_buffer[sdu_length_total],
+             &cc->MCCH_pdu.payload[0], mcch_sdu_length);
+      sdu_lcids[num_sdus] = MCCH_LCHANID;
+      sdu_lengths[num_sdus] = mcch_sdu_length;
+
+      if (sdu_lengths[num_sdus] > 128) {
+        header_len_mcch = 3;
+      }
+
+      sdu_length_total += sdu_lengths[num_sdus];
+      LOG_D(MAC,
+            "[eNB %d] CC_id %d Got %d bytes for MCCH from RRC \n",
+            module_idP, CC_id, sdu_lengths[num_sdus]);
+      num_sdus++;
+    }
+  }
+
+  TBS =
+    get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
+
+  // do not let mcch and mtch multiplexing when relaying is active
+  // for sync area 1, so not transmit data
+  //if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) {
+
+  // there is MTCHs, loop if there are more than 1
+  if (mtch_flag == 1) {
+    // Calculate TBS
+    /* if ((msi_flag==1) || (mcch_flag==1)) {
+       TBS = mac_xface->get_TBS(mcch_mcs, mac_xface->frame_parms->N_RB_DL);
        }
-       else
-       return 0;
+       else { // only MTCH in this subframeP
+       TBS = mac_xface->get_TBS(RC.mac[module_idP]->pmch_Config[0]->dataMCS_r9, mac_xface->frame_parms->N_RB_DL);
+       }
+
+       // get MTCH data from RLC (like for DTCH)
+       LOG_D(MAC,"[eNB %d] CC_id %d Frame %d subframe %d: Schedule MTCH (area %d, sfAlloc %d)\n",Mod_id,CC_id,frame,subframe,i,j);
+
+       header_len_mtch = 3;
+       LOG_D(MAC,"[eNB %d], CC_id %d, Frame %d, MTCH->MCH, Checking RLC status (rab %d, tbs %d, len %d)\n",
+       Mod_id,CC_id,frame,MTCH,TBS,
+       TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
+
+       rlc_status = mac_rlc_status_ind(Mod_id,frame,1,RLC_MBMS_YES,MTCH+ (maxDRB + 3) * MAX_MOBILES_PER_RG,
+       TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
+       printf("frame %d, subframe %d,  rlc_status.bytes_in_buffer is %d\n",frame,subframe, rlc_status.bytes_in_buffer);
+
      */
+    // get MTCH data from RLC (like for DTCH)
+    LOG_D(MAC,
+          "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n",
+          module_idP, CC_id, frameP, subframeP, i, j);
+    header_len_mtch = 3;
+    LOG_D(MAC,
+          "[eNB %d], CC_id %d, Frame %d, MTCH->MCH, Checking RLC status (rab %d, tbs %d, len %d)\n",
+          module_idP, CC_id, frameP, MTCH, TBS,
+          TBS - header_len_mcch - header_len_msi - sdu_length_total -
+          header_len_mtch);
+    rlc_status =
+      mac_rlc_status_ind(module_idP, 0, frameP, subframeP,
+                         module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
+                         MTCH,
+                         TBS - header_len_mcch - header_len_msi -
+                         sdu_length_total - header_len_mtch,0, 0);
+    LOG_D(MAC,
+          "e-MBMS log channel %u frameP %d, subframeP %d,  rlc_status.bytes_in_buffer is %d\n",
+          MTCH, frameP, subframeP, rlc_status.bytes_in_buffer);
+
+    if (rlc_status.bytes_in_buffer > 0) {
+      LOG_I(MAC,
+            "[eNB %d][MBMS USER-PLANE], CC_id %d, Frame %d, MTCH->MCH, Requesting %d bytes from RLC (header len mtch %d)\n",
+            module_idP, CC_id, frameP,
+            TBS - header_len_mcch - header_len_msi -
+            sdu_length_total - header_len_mtch, header_len_mtch);
+      sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
+                              (char *) &mch_buffer[sdu_length_total],0, 0
+                                              );
+      //sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO,  MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
+      LOG_I(MAC,
+            "[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
+            module_idP, CC_id, sdu_lengths[num_sdus], MTCH);
+      cc->mtch_active = 1;
+      sdu_lcids[num_sdus] = MTCH;
+      sdu_length_total += sdu_lengths[num_sdus];
+
+      if (sdu_lengths[num_sdus] < 128) {
+        header_len_mtch = 2;
+      }
+
+      num_sdus++;
+    } else {
+      header_len_mtch = 0;
+    }
+  }
+
+  // FINAL STEP: Prepare and multiplexe MSI, MCCH and MTCHs
+  if ((sdu_length_total + header_len_msi + header_len_mcch +
+       header_len_mtch) > 0) {
+    // Adjust the last subheader
+    /*                                 if ((msi_flag==1) || (mcch_flag==1)) {
+       RC.mac[module_idP]->MCH_pdu.mcs = mcch_mcs;
+       }
+       else if (mtch_flag == 1) { // only MTCH in this subframeP
+       RC.mac[module_idP]->MCH_pdu.mcs = RC.mac[module_idP]->pmch_Config[0]->dataMCS_r9;
+       }
+     */
+    header_len_mtch_temp = header_len_mtch;
+    header_len_mcch_temp = header_len_mcch;
+    header_len_msi_temp = header_len_msi;
+
+    if (header_len_mtch > 0) {
+      header_len_mtch = 1;  // remove Length field in the  subheader for the last PDU
+    } else if (header_len_mcch > 0) {
+      header_len_mcch = 1;
+    } else {
+      header_len_msi = 1;
+    }
+
+    // Calculate the padding
+    if ((TBS - header_len_mtch - header_len_mcch - header_len_msi -
+         sdu_length_total) < 0) {
+      LOG_E(MAC, "Error in building MAC PDU, TBS %d < PDU %d \n",
+            TBS,
+            header_len_mtch + header_len_mcch + header_len_msi +
+            sdu_length_total);
+      return 0;
+    } else if ((TBS - header_len_mtch - header_len_mcch - header_len_msi -
+                sdu_length_total) <= 2) {
+      padding =
+        (TBS - header_len_mtch - header_len_mcch - header_len_msi -
+         sdu_length_total);
+      post_padding = 0;
+    } else {    // using post_padding, give back the Length field of subheader  for the last PDU
+      padding = 0;
+
+      if (header_len_mtch > 0) {
+        header_len_mtch = header_len_mtch_temp;
+      } else if (header_len_mcch > 0) {
+        header_len_mcch = header_len_mcch_temp;
+      } else {
+        header_len_msi = header_len_msi_temp;
+      }
+
+      post_padding =
+        TBS - sdu_length_total - header_len_msi - header_len_mcch -
+        header_len_mtch;
+    }
+
+    // Generate the MAC Header for MCH
+    // here we use the function for DLSCH because DLSCH & MCH have the same Header structure
+    offset = generate_dlsch_header((unsigned char *) cc->MCH_pdu.payload, num_sdus, sdu_lengths, sdu_lcids, 255,  // no drx
+                                   31,  // no timing advance
+                                   NULL,  // no contention res id
+                                   padding, post_padding);
+    cc->MCH_pdu.Pdu_size = TBS;
+    cc->MCH_pdu.sync_area = i;
+    cc->MCH_pdu.msi_active = cc->msi_active;
+    cc->MCH_pdu.mcch_active = cc->mcch_active;
+    cc->MCH_pdu.mtch_active = cc->mtch_active;
+    LOG_D(MAC,
+          " MCS for this sf is %d (mcch active %d, mtch active %d)\n",
+          cc->MCH_pdu.mcs, cc->MCH_pdu.mcch_active,
+          cc->MCH_pdu.mtch_active);
+    LOG_I(MAC,
+          "[eNB %d][MBMS USER-PLANE ] CC_id %d Generate header : sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,padding %d,post_padding %d (mcs %d, TBS %d), header MTCH %d, header MCCH %d, header MSI %d\n",
+          module_idP, CC_id, sdu_length_total, num_sdus,
+          sdu_lengths[0], sdu_lcids[0], offset, padding, post_padding,
+          cc->MCH_pdu.mcs, TBS, header_len_mtch, header_len_mcch,
+          header_len_msi);
+    // copy SDU to mch_pdu after the MAC Header
+    memcpy(&cc->MCH_pdu.payload[offset], mch_buffer, sdu_length_total);
+
+    // filling remainder of MCH with random data if necessery
+    for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
+      cc->MCH_pdu.payload[offset + sdu_length_total + j] =
+        (char) (taus() & 0xff);
+    }
+
+    /* Tracing of PDU is done on UE side */
+    if (opt_enabled == 1) {
+      trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff,  // M_RNTI = 6 in wirehsark
+                RC.mac[module_idP]->frame,
+                RC.mac[module_idP]->subframe, 0, 0);
+      LOG_D(OPT,
+            "[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
+            module_idP, CC_id, frameP, TBS);
+    }
+
+    /*
+       for (j=0;j<sdu_length_total;j++)
+       printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
+       printf(" \n"); */
+    return 1;
+  } else {
+    cc->MCH_pdu.Pdu_size = 0;
+    cc->MCH_pdu.sync_area = 0;
+    cc->MCH_pdu.msi_active = 0;
+    cc->MCH_pdu.mcch_active = 0;
+    cc->MCH_pdu.mtch_active = 0;
+    // for testing purpose, fill with random data
+    //for (j=0;j<(TBS-sdu_length_total-offset);j++)
+    //  RC.mac[module_idP]->MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
+    return 0;
+  }
+
+  //this is for testing
+  /*
+     if (mtch_flag == 1) {
+     //  LOG_D(MAC,"DUY: mch_buffer length so far is : %ld\n", &mch_buffer[sdu_length_total]-&mch_buffer[0]);
+     return 1;
+     }
+     else
+     return 0;
+   */
 }
 
 MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
-		     sub_frame_t subframeP)
-{
-    //  RC.mac[module_idP]->MCH_pdu.mcs=0;
-    //LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
-//#warning "MCH pdu should take the CC_id index"
-    return (&RC.mac[module_idP]->common_channels[CC_id].MCH_pdu);
+                     sub_frame_t subframeP) {
+  //  RC.mac[module_idP]->MCH_pdu.mcs=0;
+  //LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
+  //#warning "MCH pdu should take the CC_id index"
+  return (&RC.mac[module_idP]->common_channels[CC_id].MCH_pdu);
 }
 
-#endif
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c
index 18f35d4fe3ad8303ded74420dcd2085ff177b774..647db3f6249ea7a2c74f0e6ebe7857eb0daff226 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c
@@ -57,7 +57,7 @@ schedule_ue_spec_phy_test(
   module_id_t   module_idP,
   frame_t       frameP,
   sub_frame_t   subframeP,
-  int*          mbsfn_flag
+  int          *mbsfn_flag
 )
 //------------------------------------------------------------------------------
 {
@@ -66,7 +66,6 @@ schedule_ue_spec_phy_test(
   uint16_t                       N_RB_DL;
   uint16_t                       TBS;
   uint16_t                       nb_rb;
-
   unsigned char                  harq_pid  = (frameP*10+subframeP)%8;
   uint16_t                       rnti      = 0x1235;
   uint32_t                       rb_alloc  = 0x1FFFFF;
@@ -75,17 +74,14 @@ schedule_ue_spec_phy_test(
   int32_t                        cqi       = 15;
   int32_t                        ndi       = (frameP*10+subframeP)/8;
   int32_t                        dai       = 0;
-
   eNB_MAC_INST                   *eNB      = RC.mac[module_idP];
   COMMON_channels_t              *cc       = eNB->common_channels;
   nfapi_dl_config_request_body_t *dl_req;
   nfapi_dl_config_request_pdu_t  *dl_config_pdu;
-
   N_RB_DL         = to_prb(cc->mib->message.dl_Bandwidth);
 
   for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
     LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id);
-
     dl_req        = &eNB->DL_req[CC_id].dl_config_request_body;
 
     if (mbsfn_flag[CC_id]>0)
@@ -93,23 +89,20 @@ schedule_ue_spec_phy_test(
 
     nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
     TBS = get_TBS_DL(mcs,nb_rb);
-
-    LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);
-
-    dl_config_pdu                                                         = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; 
-    memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
-    dl_config_pdu->pdu_type                                               = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; 
+    LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc,
+          N_RB_DL, dl_req->number_pdu);
+    dl_config_pdu                                                         = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
+    memset((void *)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
+    dl_config_pdu->pdu_type                                               = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
     dl_config_pdu->pdu_size                                               = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format                  = NFAPI_DL_DCI_FORMAT_1;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level           = get_aggregation(get_bw_index(module_idP,CC_id),cqi,format1);
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type    = 0;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding       = rb_alloc;
-
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti                        = rnti;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type                   = 1;    // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power          = 6000; // equal to RS power
-    
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process                = harq_pid;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc                         = tpc; // dont adjust power when retransmitting
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1        = ndi;
@@ -118,80 +111,73 @@ schedule_ue_spec_phy_test(
     //deactivate second codeword
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2                       = 0;
     dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2        = 1;
-    
+
     if (cc[CC_id].tdd_Config != NULL) { //TDD
       dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = dai;
       LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
-	    module_idP,CC_id,harq_pid,dai,mcs);
+            module_idP,CC_id,harq_pid,dai,mcs);
     } else {
       LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
-	    module_idP,CC_id,harq_pid,mcs);
-      
+            module_idP,CC_id,harq_pid,mcs);
     }
+
     LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu);
+
     if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) {
-      
-      
       //ue_sched_ctl->round[CC_id][harq_pid] = 0;
       dl_req->number_dci++;
       dl_req->number_pdu++;
       eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
       //eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
-      
       // Toggle NDI for next time
       /*
       LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
-	    CC_id, frameP,subframeP,UE_id,
-	    rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
-      
+      CC_id, frameP,subframeP,UE_id,
+      rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
+
       UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
       UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
       UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
       AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
       AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
       */
-
-      
       fill_nfapi_dlsch_config(eNB,
-			      dl_req,
-			      TBS,
-			      eNB->pdu_index[CC_id],
-			      rnti,
-			      0, // type 0 allocation from 7.1.6 in 36.213
-			      0, // virtual_resource_block_assignment_flag
-			      rb_alloc, // resource_block_coding
-			      getQm(mcs),
-			      0, // redundancy version
-			      1, // transport blocks
-			      0, // transport block to codeword swap flag
-			      cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
-			      1, // number of layers
-			      1, // number of subbands
-			      //			     uint8_t codebook_index,
-			      4, // UE category capacity
-			      LTE_PDSCH_ConfigDedicated__p_a_dB0,
-			      0, // delta_power_offset for TM5
-			      0, // ngap
-			      0, // nprb
-			      cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
-			      0, //number of PRBs treated as one subband, not used here
-			      0 // number of beamforming vectors, not used here
-			      );  
-
+                              dl_req,
+                              TBS,
+                              eNB->pdu_index[CC_id],
+                              rnti,
+                              0, // type 0 allocation from 7.1.6 in 36.213
+                              0, // virtual_resource_block_assignment_flag
+                              rb_alloc, // resource_block_coding
+                              getQm(mcs),
+                              0, // redundancy version
+                              1, // transport blocks
+                              0, // transport block to codeword swap flag
+                              cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
+                              1, // number of layers
+                              1, // number of subbands
+                              //           uint8_t codebook_index,
+                              4, // UE category capacity
+                              LTE_PDSCH_ConfigDedicated__p_a_dB0,
+                              0, // delta_power_offset for TM5
+                              0, // ngap
+                              0, // nprb
+                              cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
+                              0, //number of PRBs treated as one subband, not used here
+                              0 // number of beamforming vectors, not used here
+                             );
       eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
-						    (frameP*10)+subframeP,
-						    TBS,
-						    eNB->pdu_index[CC_id],
-						    eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
-    }
-    else {
+                                  (frameP*10)+subframeP,
+                                  TBS,
+                                  eNB->pdu_index[CC_id],
+                                  eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
+    } else {
       LOG_W(MAC,"[eNB_scheduler_phytest] DCI allocation infeasible!\n");
     }
   }
 }
 
-void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
-{
+void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
   uint16_t first_rb[MAX_NUM_CCs];
   int               UE_id = 0;
   uint8_t           aggregation    = 2;
@@ -218,158 +204,132 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
   nfapi_hi_dci0_request_t        *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
   nfapi_hi_dci0_request_body_t   *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
   nfapi_hi_dci0_request_pdu_t    *hi_dci0_pdu;
-
   //nfapi_ul_config_request_pdu_t  *ul_config_pdu = &ul_req->ul_config_pdu_list[0];;
   nfapi_ul_config_request_body_t *ul_req       = &mac->UL_req[CC_id].ul_config_request_body;
-
   N_RB_UL         = to_prb(cc->mib->message.dl_Bandwidth);
-  switch(N_RB_UL){
-  case 100:
-    nb_rb = 96;
-    break;
-  case 50:
-    nb_rb = 48;
-    break;
-  case 25:
-    nb_rb = 24;
-    break;
+
+  switch(N_RB_UL) {
+    case 100:
+      nb_rb = 96;
+      break;
+
+    case 50:
+      nb_rb = 48;
+      break;
+
+    case 25:
+      nb_rb = 24;
+      break;
   }
 
   mac->UL_req[CC_id].sfn_sf   = (sched_frame<<4) + sched_subframe;
   hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
-  
+
   for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
     //rnti = UE_RNTI(module_idP,UE_id);
     //leave out first RB for PUCCH
     first_rb[CC_id] = 1;
-  // loop over all active UEs
-
-      //      if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
-
-      UE_template   = &UE_list->UE_template[CC_id][UE_id];
-      UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
-      harq_pid      = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
-
-
-      RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
-
-	  
-
-      //power control
-      //compute the expected ULSCH RX power (for the stats)
-	  
-      // this is the snr and this should be constant (regardless of mcs)
-      snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
-	  
-      // new transmission
-	  
-      ndi = 1-UE_template->oldNDI_UL[harq_pid];
-      UE_template->oldNDI_UL[harq_pid]=ndi;
-	  UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
-	  UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
-	  UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
-      UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
-      UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
-	  //            buffer_occupancy = UE_template->ul_total_buffer;
-
-	    
-	    
-      UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
-	  UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
-	  UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
-	  //            buffer_occupancy -= TBS;
-
-
-	    
-	  // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
-      //store for possible retransmission
-      UE_template->nb_rb_ul[harq_pid]    = nb_rb;
-      UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
-	    
-	  UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
-	    
-	  // adjust total UL buffer status by TBS, wait for UL sdus to do final update
-	  //UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
-	  // Cyclic shift for DM RS
-	  cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
-	  // save it for a potential retransmission
-      UE_template->cshift[harq_pid] = cshift;	    
-
-	  hi_dci0_pdu                                                         = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
-	  memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
-	  hi_dci0_pdu->pdu_type                                               = NFAPI_HI_DCI0_DCI_PDU_TYPE; 
-	  hi_dci0_pdu->pdu_size                                               = 2+sizeof(nfapi_hi_dci0_dci_pdu);
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format                        = NFAPI_UL_DCI_FORMAT_0;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level                 = aggregation;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti                              = rnti;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power                = 6000;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start              = first_rb[CC_id];
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block          = nb_rb;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1                             = mcs;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms           = cshift;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag    = 0;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1             = ndi;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc                               = tpc;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request                   = cqi_req;
-	  hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index               = UE_template->DAI_ul[sched_subframe];
-          hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid                          = harq_pid;
-
+    // loop over all active UEs
+    //      if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
+    UE_template   = &UE_list->UE_template[CC_id][UE_id];
+    UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
+    harq_pid      = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
+    RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
+    //power control
+    //compute the expected ULSCH RX power (for the stats)
+    // this is the snr and this should be constant (regardless of mcs)
+    snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
+    // new transmission
+    ndi = 1-UE_template->oldNDI_UL[harq_pid];
+    UE_template->oldNDI_UL[harq_pid]=ndi;
+    UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
+    UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
+    UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
+    UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
+    UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
+    //            buffer_occupancy = UE_template->ul_total_buffer;
+    UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
+    UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
+    UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
+    //            buffer_occupancy -= TBS;
+    // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
+    //store for possible retransmission
+    UE_template->nb_rb_ul[harq_pid]    = nb_rb;
+    UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
+    UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
+    // adjust total UL buffer status by TBS, wait for UL sdus to do final update
+    //UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
+    // Cyclic shift for DM RS
+    cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
+    // save it for a potential retransmission
+    UE_template->cshift[harq_pid] = cshift;
+    hi_dci0_pdu                                                         = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
+    memset((void *)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
+    hi_dci0_pdu->pdu_type                                               = NFAPI_HI_DCI0_DCI_PDU_TYPE;
+    hi_dci0_pdu->pdu_size                                               = 2+sizeof(nfapi_hi_dci0_dci_pdu);
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format                        = NFAPI_UL_DCI_FORMAT_0;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level                 = aggregation;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti                              = rnti;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power                = 6000;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start              = first_rb[CC_id];
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block          = nb_rb;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1                             = mcs;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms           = cshift;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag    = 0;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1             = ndi;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc                               = tpc;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request                   = cqi_req;
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index               = UE_template->DAI_ul[sched_subframe];
+    hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid                          = harq_pid;
+    hi_dci0_req_body->number_of_dci++;
+    ul_req_index = 0;
+
+    for(ul_req_index = 0; ul_req_index < ul_req->number_of_pdus; ul_req_index++) {
+      if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) {
+        LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
+        break;
+      }
+    }
 
-	  hi_dci0_req_body->number_of_dci++;
-	    
-	  ul_req_index = 0;
-            for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
-              if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
-                LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
-                break;
-              }
-            }
+    // Add UL_config PDUs
+    fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
+                                         cqi_req,
+                                         cc,
+                                         0,//UE_template->physicalConfigDedicated,
+                                         get_tmode(module_idP,CC_id,UE_id),
+                                         mac->ul_handle,//eNB->ul_handle,
+                                         rnti,
+                                         first_rb[CC_id], // resource_block_start
+                                         nb_rb, // number_of_resource_blocks
+                                         mcs,
+                                         cshift, // cyclic_shift_2_for_drms
+                                         0, // frequency_hopping_enabled_flag
+                                         0, // frequency_hopping_bits
+                                         ndi, // new_data_indication
+                                         0, // redundancy_version
+                                         harq_pid, // harq_process_number
+                                         0, // ul_tx_mode
+                                         0, // current_tx_nb
+                                         0, // n_srs
+                                         get_TBS_UL(mcs,nb_rb)
+                                        );
+
+    if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
+      fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
+                                           UE_template->rach_resource_type>2 ? 2 : 1,
+                                           1, //total_number_of_repetitions
+                                           1, //repetition_number
+                                           (frameP*10)+subframeP);
+    }
 
-	  // Add UL_config PDUs
-	  fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
-						 cqi_req,
-						 cc,
-						 0,//UE_template->physicalConfigDedicated,
-						 get_tmode(module_idP,CC_id,UE_id),
-						 mac->ul_handle,//eNB->ul_handle,
-						 rnti,
-						 first_rb[CC_id], // resource_block_start
-						 nb_rb, // number_of_resource_blocks
-						 mcs,
-						 cshift, // cyclic_shift_2_for_drms
-						 0, // frequency_hopping_enabled_flag
-						 0, // frequency_hopping_bits
-						 ndi, // new_data_indication
-						 0, // redundancy_version
-						 harq_pid, // harq_process_number
-						 0, // ul_tx_mode
-						 0, // current_tx_nb
-						 0, // n_srs
-						 get_TBS_UL(mcs,nb_rb)
-						 );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	  if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
-	    fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
-						   UE_template->rach_resource_type>2 ? 2 : 1,
-						   1, //total_number_of_repetitions
-						   1, //repetition_number
-						   (frameP*10)+subframeP);
-	    }
-#endif
-	  ul_req->number_of_pdus = 1;
-	  mac->ul_handle++;
-	    
-	    
-	  	
-	  add_ue_ulsch_info(module_idP,
-			      CC_id,
-			      UE_id,
-			      subframeP,
-			      S_UL_SCHEDULED);
-	    
-            // increment first rb for next UE allocation
-       first_rb[CC_id]+= nb_rb;
-	    
-	  	  
+    ul_req->number_of_pdus = 1;
+    mac->ul_handle++;
+    add_ue_ulsch_info(module_idP,
+                      CC_id,
+                      UE_id,
+                      subframeP,
+                      S_UL_SCHEDULED);
+    // increment first rb for next UE allocation
+    first_rb[CC_id]+= nb_rb;
   } // loop of CC_id
 }
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
index 63f838f652daa216fa49b6d02c7b8c8848de23ce..3405f31cc12c4fe010729086222fe1b8d48835d9 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
@@ -351,7 +351,6 @@ subframe2harqpid(COMMON_channels_t *cc,
 //------------------------------------------------------------------------------
 {
   AssertFatal(cc != NULL, "cc is null\n");
-
   uint8_t ret = 255;
 
   if (cc->tdd_Config == NULL) { // FDD
@@ -892,22 +891,19 @@ get_csi_params(COMMON_channels_t *cc,
       *Npd = 160;
       *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 157;
     } else if (cqi_PMI_ConfigIndex > 317) {
-
-      if (cqi_PMI_ConfigIndex <= 349) {	        // 32 ms CQI_PMI period
-	*Npd = 32;
-	      *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
-      } else if (cqi_PMI_ConfigIndex <= 413) {	// 64 ms CQI_PMI period
-	      *Npd = 64;
-	      *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
-      } else if (cqi_PMI_ConfigIndex <= 541) {	// 128 ms CQI_PMI period
-	      *Npd = 128;
-	      *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
+      if (cqi_PMI_ConfigIndex <= 349) {         // 32 ms CQI_PMI period
+        *Npd = 32;
+        *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
+      } else if (cqi_PMI_ConfigIndex <= 413) {  // 64 ms CQI_PMI period
+        *Npd = 64;
+        *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
+      } else if (cqi_PMI_ConfigIndex <= 541) {  // 128 ms CQI_PMI period
+        *Npd = 128;
+        *N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
       }
-
     }
-
   } else {  // TDD
-    if (cqi_PMI_ConfigIndex == 0) {	// all UL subframes
+    if (cqi_PMI_ConfigIndex == 0) { // all UL subframes
       *Npd = 1;
       *N_OFFSET_CQI = 0;
     } else if (cqi_PMI_ConfigIndex <= 6) {  // 5 ms CQI_PMI period
@@ -1029,7 +1025,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
         return (4 + (N << 1) + 4 + (N << 1) + 4);
 
       break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
 
     case LTE_CQI_ReportModeAperiodic_rm32_v1250:
       AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10, "Illegal TM (%d) for CQI_ReportModeAperiodic_rm32\n",
@@ -1064,7 +1059,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
         return (4 + 4 + 4);
 
       break;
-#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
   }
 
   AssertFatal(1 == 0, "Shouldn't get here\n");
@@ -1147,7 +1141,6 @@ fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
 //------------------------------------------------------------------------------
 {
   memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
-
   dl_config_pdu->pdu_type                                                          = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
   dl_config_pdu->pdu_size                                                          = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
   dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag                                 = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
@@ -1185,7 +1178,6 @@ program_dlsch_acknak(module_id_t module_idP,
   int                                    use_simultaneous_pucch_pusch = 0;
   nfapi_ul_config_ulsch_harq_information *ulsch_harq_information      = NULL;
   nfapi_ul_config_harq_information       *harq_information            = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
   struct LTE_PhysicalConfigDedicated__ext2 *ext2 = UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2;
 
   if (ext2 &&
@@ -1194,7 +1186,6 @@ program_dlsch_acknak(module_id_t module_idP,
       *ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == LTE_PUCCH_ConfigDedicated_v1020__simultaneousPUCCH_PUSCH_r10_true)
     use_simultaneous_pucch_pusch = 1;
 
-#endif
   // pucch1 and pusch feedback is similar, namely in n+k subframes from now
   // This is used in the following "if/else" condition to check if there isn't or is already an UL grant in n+k
   int16_t ul_absSF = get_pucch1_absSF(&cc[CC_idP],
@@ -1385,17 +1376,6 @@ fill_nfapi_ulsch_harq_information(module_id_t                            module_
   struct LTE_PUSCH_ConfigDedicated *puschConfigDedicated = physicalConfigDedicated->pusch_ConfigDedicated;
   AssertFatal(puschConfigDedicated != NULL, "physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n",
               rntiP);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
-  /*  if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 =  UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020;
-      #endif
-      #if (LTE_RRC_VERSION >= MAKE_VERSION(11, 3, 0))
-      if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 =  UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130;
-      #endif
-      #if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
-      if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 =  UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
-      #endif
-  */
-#endif
   harq_information_rel10->delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index;
   harq_information_rel10->tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_HARQ_INFORMATION_REL10_TAG;
   struct LTE_PUCCH_ConfigDedicated *pucch_ConfigDedicated = physicalConfigDedicated->pucch_ConfigDedicated;
@@ -1424,6 +1404,7 @@ fill_nfapi_ulsch_harq_information(module_id_t                            module_
         else
           harq_information_rel10->harq_size = 1;
       }
+
       break;
 
     default:      // for any other TM we need 2 bits harq
@@ -1438,6 +1419,7 @@ fill_nfapi_ulsch_harq_information(module_id_t                            module_
         else
           harq_information_rel10->harq_size = 2;
       }
+
       break;
   }       // get Tmode
 
@@ -1582,7 +1564,7 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
   ul_config_pdu->pdu_type                                               = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE;
   ul_config_pdu->pdu_size                                               = (uint8_t) (2 + sizeof(nfapi_ul_config_uci_harq_pdu));
   ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
-  ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0;	// don't know how to use this
+  ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0;  // don't know how to use this
   ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti   = rntiP;
   fill_nfapi_harq_information(module_idP,
                               CC_idP,
@@ -1601,7 +1583,6 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
   ul_req_body->tl.tag       = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
   ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
   ul_req->sfn_sf            = (ackNAK_absSF/10) << 4 | ackNAK_absSF%10;
-
   return (((ackNAK_absSF / 10) << 4) + (ackNAK_absSF % 10));
 }
 
@@ -1774,7 +1755,6 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd
   return;
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 //------------------------------------------------------------------------------
 void
 fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *ul_config_pdu,
@@ -1933,7 +1913,6 @@ narrowband_to_first_rb(COMMON_channels_t *cc,
 
   return 0;
 }
-#endif
 
 //------------------------------------------------------------------------------
 void
@@ -2141,10 +2120,8 @@ int
 add_new_ue(module_id_t mod_idP,
            int cc_idP,
            rnti_t rntiP,
-           int harq_pidP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  , uint8_t rach_resource_type
-#endif
+           int harq_pidP,
+           uint8_t rach_resource_type
           )
 //------------------------------------------------------------------------------
 {
@@ -2177,9 +2154,7 @@ add_new_ue(module_id_t mod_idP,
 #if defined(USRP_REC_PLAY) // not specific to record/playback ?
     UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
 #endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type;
-#endif
     memset((void *) &UE_list->UE_sched_ctrl[UE_id],
            0,
            sizeof(UE_sched_ctrl_t));
@@ -2239,14 +2214,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
   }
 
   pCC_id = UE_PCCID(mod_idP, UE_id);
-
   LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",
         UE_id,
         pCC_id,
         rntiP);
-
   dump_ue_list(UE_list, 0); // DL list displayed in LOG_T(MAC)
-
   UE_list->active[UE_id] = FALSE;
   UE_list->num_UEs--;
 
@@ -2274,8 +2246,8 @@ rrc_mac_remove_ue(module_id_t mod_idP,
 
   /* Clear all remaining pending transmissions */
   memset(&UE_list->UE_template[pCC_id][UE_id],
-          0,
-          sizeof(UE_TEMPLATE));
+         0,
+         sizeof(UE_TEMPLATE));
   ue_stats = &UE_list->eNB_UE_stats[pCC_id][UE_id];
   ue_stats->total_rbs_used = 0;
   ue_stats->total_rbs_used_retx = 0;
@@ -2300,11 +2272,9 @@ rrc_mac_remove_ue(module_id_t mod_idP,
   ue_stats->total_pdu_bytes_rx = 0;
   ue_stats->total_num_pdus_rx = 0;
   ue_stats->total_num_errors_rx = 0;
-
   eNB_ulsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
   eNB_ulsch_info[mod_idP][pCC_id][UE_id].status = S_UL_NONE;
   eNB_ulsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
-
   eNB_dlsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
   eNB_dlsch_info[mod_idP][pCC_id][UE_id].status = S_DL_NONE;
   eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
@@ -2319,10 +2289,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
                    rntiP);
   }
 
-  if(rrc_release_info.num_UEs > 0){
+  if(rrc_release_info.num_UEs > 0) {
     while(pthread_mutex_trylock(&rrc_release_freelist)) {
       /* spin... */
     }
+
     uint16_t release_total = 0;
 
     for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
@@ -2342,6 +2313,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
         break;
       }
     }
+
     pthread_mutex_unlock(&rrc_release_freelist);
   }
 
@@ -2529,7 +2501,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
     return 0;
 
   rnti_t ue_rnti = UE_RNTI(module_idP, UE_id);
-
   LOG_D(MAC, "[eNB %d][PUSCH] Checking UL requirements UE %d/%x\n",
         module_idP,
         UE_id,
@@ -2548,7 +2519,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
           ue_rnti,
           UE_template->ul_buffer_info[LCGID0],
           UE_template->ul_SR);
-
     return 1;
   }
 
@@ -3945,7 +3915,6 @@ extract_harq(module_id_t mod_idP,
   sub_frame_t subframe_tx;
   int frame_tx;
   uint8_t harq_pid;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
   LTE_PhysicalConfigDedicated_t *physicalConfigDedicated = UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated;
 
   if (physicalConfigDedicated != NULL && physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
@@ -3955,8 +3924,6 @@ extract_harq(module_id_t mod_idP,
     spatial_bundling = 1;
   }
 
-#endif
-
   for (i = 0; i < numCC; i++) {
     tmode[i] = get_tmode(mod_idP,
                          i,
@@ -4058,6 +4025,7 @@ extract_harq(module_id_t mod_idP,
             }
           }
         }
+
         break;
 
       case 1:   // Channel Selection
@@ -4154,17 +4122,14 @@ extract_harq(module_id_t mod_idP,
           if (pdu[0] == 1) {  // ACK
             sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
             sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
-
             /* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
             sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
-
           } else if (pdu[0] == 2 || pdu[0] == 4) {  // NAK (treat DTX as NAK)
             sched_ctl->round[CC_idP][harq_pid]++; // increment round
 
             if (sched_ctl->round[CC_idP][harq_pid] == 4) {
               sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
               sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
-
               /* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
               sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
             }
@@ -4191,7 +4156,6 @@ extract_harq(module_id_t mod_idP,
           if (num_ack_nak == 2 && sched_ctl->round[CC_idP][harq_pid] < 8 && sched_ctl->tbcnt[CC_idP][harq_pid] == 1 && pdu[0] == 1 && pdu[1] == 1) {
             sched_ctl->round[CC_idP][harq_pid] = 8;
             sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
-
             /* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
             sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
           }
@@ -4205,7 +4169,6 @@ extract_harq(module_id_t mod_idP,
             if (sched_ctl->round[CC_idP][harq_pid] == 4) {
               sched_ctl->round[CC_idP][harq_pid] = 8;     // release HARQ process
               sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
-
               /* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
               sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
             }
@@ -4223,7 +4186,6 @@ extract_harq(module_id_t mod_idP,
             if (sched_ctl->round[CC_idP][harq_pid] == 4) {
               sched_ctl->round[CC_idP][harq_pid] = 8;     // release HARQ process
               sched_ctl->tbcnt[CC_idP][harq_pid] = 0;  /* TODO: do we have to set it to 0? */
-
               /* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
               sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
             }
@@ -4236,7 +4198,6 @@ extract_harq(module_id_t mod_idP,
             if (sched_ctl->round[CC_idP][harq_pid] == 4) {
               sched_ctl->round[CC_idP][harq_pid] = 8;     // release HARQ process
               sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
-
               /* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
               sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
             }
@@ -4933,7 +4894,6 @@ extract_pusch_csi(module_id_t mod_idP,
       }
 
       break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
 
     case LTE_CQI_ReportModeAperiodic_rm32_v1250:
       AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10,
@@ -4941,8 +4901,6 @@ extract_pusch_csi(module_id_t mod_idP,
                   tmode);
       AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n");
       break;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0))
 
     case LTE_CQI_ReportModeAperiodic_rm10_v1310:
       AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7, "Illegal transmission mode %d for CQI_ReportModeAperiodic_rm10\n",
@@ -4956,7 +4914,6 @@ extract_pusch_csi(module_id_t mod_idP,
                   tmode);
       AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n");
       break;
-#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
   }
 
   return;
@@ -5054,7 +5011,7 @@ SR_indication(module_id_t mod_idP,
   if (UE_id != -1) {
     UE_scheduling_ctrl = &(UE_list->UE_sched_ctrl[UE_id]);
 
-    if ((UE_scheduling_ctrl->cdrx_configured == TRUE) && 
+    if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
         (UE_scheduling_ctrl->dci0_ongoing_timer > 0)  &&
         (UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
       LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d.  \
@@ -5075,6 +5032,7 @@ SR_indication(module_id_t mod_idP,
               UE_id,
               cc_idP);
       }
+
       UE_list->UE_template[cc_idP][UE_id].ul_SR = 1;
       UE_list->UE_template[cc_idP][UE_id].ul_active = TRUE;
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
@@ -5089,7 +5047,7 @@ SR_indication(module_id_t mod_idP,
           UE_id,
           cc_idP);
   }
-  
+
   return;
 }
 
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index be1f838aaadaba7db8841bdb61d81b9649565714..6f712e63b8be699a1b45fe78a88b4fcd054a26c9 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -123,7 +123,6 @@ rx_sdu(const module_id_t enb_mod_idP,
   rrc_eNB_ue_context_t *ue_contextP = NULL;
   UE_sched_ctrl_t *UE_scheduling_control = NULL;
   UE_TEMPLATE *UE_template_ptr = NULL;
-
   /* Init */
   current_rnti = rntiP;
   UE_id = find_UE_id(enb_mod_idP, current_rnti);
@@ -148,7 +147,6 @@ rx_sdu(const module_id_t enb_mod_idP,
   if (UE_id != -1) {
     UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
     UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
-
     LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
           enb_mod_idP,
           harq_pid,
@@ -159,7 +157,6 @@ rx_sdu(const module_id_t enb_mod_idP,
           current_rnti,
           UE_id,
           ul_cqi);
-
     AssertFatal(UE_scheduling_control->round_UL[CC_idP][harq_pid] < 8, "round >= 8\n");
 
     if (sduP != NULL) {
@@ -174,7 +171,6 @@ rx_sdu(const module_id_t enb_mod_idP,
       UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
       UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
       UE_scheduling_control->ul_consecutive_errors = 0;
-
       first_rb = UE_template_ptr->first_rb_ul[harq_pid];
 
       if (UE_scheduling_control->ul_out_of_sync > 0) {
@@ -231,7 +227,7 @@ rx_sdu(const module_id_t enb_mod_idP,
       if (UE_scheduling_control->cdrx_configured == TRUE) {
         /* Synchronous UL HARQ */
         UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
-        /* 
+        /*
          * The NACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
          * Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
          * Note: in case of asynchronous UL HARQ process restart here relevant RTT timer.
@@ -240,13 +236,11 @@ rx_sdu(const module_id_t enb_mod_idP,
       }
 
       first_rb = UE_template_ptr->first_rb_ul[harq_pid];
-
       /* Program NACK for PHICH */
       LOG_D(MAC, "Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)\n",
             current_rnti,
             harq_pid,
             first_rb);
-
       nfapi_hi_dci0_request_t *hi_dci0_req = NULL;
       uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
       hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP + sf_ahead_dl) % 10];
@@ -270,13 +264,11 @@ rx_sdu(const module_id_t enb_mod_idP,
     // if UE_id == -1
   } else if ((RA_id = find_RA_id(enb_mod_idP, CC_idP, current_rnti)) != -1) { // Check if this is an RA process for the rnti
     RA_t *ra = (RA_t *) &(mac->common_channels[CC_idP].ra[RA_id]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
     if (ra->rach_resource_type > 0) {
       harq_pid = 0;
     }
 
-#endif
     AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1,
                 "maxHARQ %d should be greater than 1\n",
                 (int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
@@ -386,7 +378,6 @@ rx_sdu(const module_id_t enb_mod_idP,
                 CC_idP,
                 rx_ces[i],
                 UE_template_ptr->phr_info);
-
           UE_template_ptr->phr_info_configured = 1;
           UE_scheduling_control->phr_received = 1;
         }
@@ -418,13 +409,11 @@ rx_sdu(const module_id_t enb_mod_idP,
                   CC_idP,
                   old_rnti,
                   old_UE_id);
-
             UE_id = old_UE_id;
             current_rnti = old_rnti;
             /* Clear timer */
             UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
             UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
-
             UE_scheduling_control->uplane_inactivity_timer = 0;
             UE_scheduling_control->ul_inactivity_timer = 0;
             UE_scheduling_control->ul_failure_timer = 0;
@@ -437,6 +426,7 @@ rx_sdu(const module_id_t enb_mod_idP,
                                      subframeP,
                                      old_rnti);
             }
+
             UE_template_ptr->ul_SR = 1;
             UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
             UE_list->UE_template[UE_PCCID(enb_mod_idP, UE_id)][UE_id].configured = 1;
@@ -461,51 +451,49 @@ rx_sdu(const module_id_t enb_mod_idP,
             if (RA_id != -1) {
               RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
               int8_t ret = mac_rrc_data_ind(enb_mod_idP,
-                               CC_idP,
-                               frameP, subframeP,
-                               UE_id,
-                               old_rnti,
-                               DCCH,
-                               (uint8_t *) payload_ptr,
-                               rx_lengths[i],
-                               0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,ra->rach_resource_type > 0
-#endif
-                              );
+                                            CC_idP,
+                                            frameP, subframeP,
+                                            UE_id,
+                                            old_rnti,
+                                            DCCH,
+                                            (uint8_t *) payload_ptr,
+                                            rx_lengths[i],
+                                            0,ra->rach_resource_type > 0
+                                           );
+
               /* Received a new rnti */
               if (ret == 0) {
-              ra->state = MSGCRNTI;
-              LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
-                    enb_mod_idP,
-                    frameP,
-                    subframeP,
-                    CC_idP,
-                    old_rnti,
-                    old_UE_id);
-              UE_id = old_UE_id;
-              current_rnti = old_rnti;
-              ra->rnti = old_rnti;
-              ra->crnti_rrc_mui = rrc_eNB_mui-1;
-              ra->crnti_harq_pid = -1;
-
-              /* Clear timer */
-              UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
-              UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
-
-              UE_scheduling_control->uplane_inactivity_timer = 0;
-              UE_scheduling_control->ul_inactivity_timer = 0;
-              UE_scheduling_control->ul_failure_timer = 0;
+                ra->state = MSGCRNTI;
+                LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
+                      enb_mod_idP,
+                      frameP,
+                      subframeP,
+                      CC_idP,
+                      old_rnti,
+                      old_UE_id);
+                UE_id = old_UE_id;
+                current_rnti = old_rnti;
+                ra->rnti = old_rnti;
+                ra->crnti_rrc_mui = rrc_eNB_mui-1;
+                ra->crnti_harq_pid = -1;
+                /* Clear timer */
+                UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
+                UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
+                UE_scheduling_control->uplane_inactivity_timer = 0;
+                UE_scheduling_control->ul_inactivity_timer = 0;
+                UE_scheduling_control->ul_failure_timer = 0;
+
+                if (UE_scheduling_control->ul_out_of_sync > 0) {
+                  UE_scheduling_control->ul_out_of_sync = 0;
+                  mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
+                }
 
-              if (UE_scheduling_control->ul_out_of_sync > 0) {
-                UE_scheduling_control->ul_out_of_sync = 0;
-                mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
-              }
-              UE_template_ptr->ul_SR = 1;
-              UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
+                UE_template_ptr->ul_SR = 1;
+                UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
               } else {
                 cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
               }
+
               // break;
             }
           }
@@ -539,7 +527,6 @@ rx_sdu(const module_id_t enb_mod_idP,
             UE_template_ptr->ul_buffer_info[LCGID1] +
             UE_template_ptr->ul_buffer_info[LCGID2] +
             UE_template_ptr->ul_buffer_info[LCGID3];
-
           RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
 
           if (UE_id == UE_list->head) {
@@ -580,21 +567,19 @@ rx_sdu(const module_id_t enb_mod_idP,
           UE_template_ptr->ul_buffer_info[LCGID1] = BSR_TABLE[bsr1];
           UE_template_ptr->ul_buffer_info[LCGID2] = BSR_TABLE[bsr2];
           UE_template_ptr->ul_buffer_info[LCGID3] = BSR_TABLE[bsr3];
-
           UE_template_ptr->estimated_ul_buffer =
             UE_template_ptr->ul_buffer_info[LCGID0] +
             UE_template_ptr->ul_buffer_info[LCGID1] +
             UE_template_ptr->ul_buffer_info[LCGID2] +
             UE_template_ptr->ul_buffer_info[LCGID3];
-
           LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = %u LCGID2 = %u LCGID3 = %u\n",
-            enb_mod_idP,
-            CC_idP,
-            rx_ces[i],
-            UE_template_ptr->ul_buffer_info[LCGID0],
-            UE_template_ptr->ul_buffer_info[LCGID1],
-            UE_template_ptr->ul_buffer_info[LCGID2],
-            UE_template_ptr->ul_buffer_info[LCGID3]);
+                enb_mod_idP,
+                CC_idP,
+                rx_ces[i],
+                UE_template_ptr->ul_buffer_info[LCGID0],
+                UE_template_ptr->ul_buffer_info[LCGID1],
+                UE_template_ptr->ul_buffer_info[LCGID2],
+                UE_template_ptr->ul_buffer_info[LCGID3]);
 
           if (crnti_rx == 1) {
             LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received CRNTI.\n",
@@ -689,11 +674,7 @@ rx_sdu(const module_id_t enb_mod_idP,
                   rx_lengths[i],
                   payload_ptr - sduP);
 
-            if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                    , ra->rach_resource_type
-#endif
-                                   )) == -1) {
+            if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid, ra->rach_resource_type )) == -1) {
               LOG_E(MAC,"[MAC][eNB] Max user count reached\n");
               cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // send Connection Reject ???
               break;
@@ -705,7 +686,6 @@ rx_sdu(const module_id_t enb_mod_idP,
                     frameP,
                     ra->rnti,
                     UE_id);
-
               UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
               UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
             }
@@ -728,10 +708,7 @@ rx_sdu(const module_id_t enb_mod_idP,
                            CCCH,
                            (uint8_t *) payload_ptr,
                            rx_lengths[i],
-                           0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           ,ra->rach_resource_type > 0
-#endif
+                           0,ra->rach_resource_type > 0
                           );
 
           if (num_ce > 0) { // handle msg3 which is not RRCConnectionRequest
@@ -801,7 +778,7 @@ rx_sdu(const module_id_t enb_mod_idP,
           mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL);  //(unsigned int*)crc_status);
           UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
           UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
-        
+
           if (mac_eNB_get_rrc_status(enb_mod_idP, current_rnti) < RRC_RECONFIGURED) {
             UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
           }
@@ -864,7 +841,6 @@ rx_sdu(const module_id_t enb_mod_idP,
               UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
               /* Clear uplane_inactivity_timer */
               UE_scheduling_control->uplane_inactivity_timer = 0;
-
               /* Reset RRC inactivity timer after uplane activity */
               ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], current_rnti);
 
@@ -906,7 +882,7 @@ rx_sdu(const module_id_t enb_mod_idP,
     if (UE_scheduling_control->cdrx_configured == TRUE) {
       /* Synchronous UL HARQ */
       UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
-      /* 
+      /*
        * The ACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
        * Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
        * Note: in case of asynchronous UL HARQ process restart here relevant RTT timer
@@ -920,11 +896,9 @@ rx_sdu(const module_id_t enb_mod_idP,
         current_rnti,
         harq_pid,
         first_rb);
-
   nfapi_hi_dci0_request_t *hi_dci0_req;
   uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
   hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10];
-
   nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
   nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci +
                                       hi_dci0_req_body->number_of_hi];
@@ -1129,13 +1103,11 @@ schedule_ulsch(module_id_t module_idP,
   COMMON_channels_t *cc = NULL;
   int sched_subframe;
   int sched_frame;
-
   /* Init */
   mac = RC.mac[module_idP];
   sli = &(mac->slice_info);
   memset(first_rb, 0, NFAPI_CC_MAX * sizeof(uint16_t));
   start_meas(&(mac->schedule_ulsch));
-
   sched_subframe = (subframeP + 4) % 10;
   sched_frame = frameP;
   cc = mac->common_channels;
@@ -1235,25 +1207,13 @@ schedule_ulsch(module_id_t module_idP,
     sched_frame %= 1024;
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   int emtc_active[5];
   memset(emtc_active, 0, 5 * sizeof(int));
   schedule_ulsch_rnti_emtc(module_idP, frameP, subframeP, sched_subframe, emtc_active);
-#endif
 
   /* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
   for (int CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++, cc++) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     first_rb[CC_id] = (emtc_active[CC_id] == 1) ? 7 : 1;
-#else
-    /* Note: the size of PUCCH is arbitrary, to be done properly. */
-    switch (RC.eNB[module_idP][CC_id]->frame_parms.N_RB_DL) {
-    case 25:  first_rb[CC_id] = 1; break; // leave out first RB for PUCCH
-    case 50:  first_rb[CC_id] = 2; break; // leave out first RB for PUCCH
-    case 100: first_rb[CC_id] = 3; break; // leave out first RB for PUCCH
-    default: LOG_E(MAC, "nb RBs not handled, todo.\n"); exit(1);
-    }
-#endif
     RA_t *ra_ptr = cc->ra;
 
     /* From Louis-Adrien to François:
@@ -1378,6 +1338,7 @@ schedule_ulsch_rnti(module_id_t   module_idP,
   /* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
   for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
     n_rb_ul_tab[CC_id] = to_prb(cc[CC_id].ul_Bandwidth); // return total number of PRB
+
     /* HACK: let's remove the PUCCH from available RBs
      * we suppose PUCCH size is:
      * - for 25 RBs: 1 RB (top and bottom of ressource grid)
@@ -1388,15 +1349,27 @@ schedule_ulsch_rnti(module_id_t   module_idP,
      * so we only remove the top part of the resource grid.
      */
     switch (n_rb_ul_tab[CC_id]) {
-    case 25:  n_rb_ul_tab[CC_id] -= 1; break;
-    case 50:  n_rb_ul_tab[CC_id] -= 2; break;
-    case 100: n_rb_ul_tab[CC_id] -= 3; break;
-    default: LOG_E(MAC, "RBs setting not handled. Todo.\n"); exit(1);
+      case 25:
+        n_rb_ul_tab[CC_id] -= 1;
+        break;
+
+      case 50:
+        n_rb_ul_tab[CC_id] -= 2;
+        break;
+
+      case 100:
+        n_rb_ul_tab[CC_id] -= 3;
+        break;
+
+      default:
+        LOG_E(MAC, "RBs setting not handled. Todo.\n");
+        exit(1);
     }
+
     UE_list->first_rb_offset[CC_id][slice_idx] = cmin(n_rb_ul_tab[CC_id], sli->ul[slice_idx].first_rb);
   }
 
-  /* 
+  /*
    * ULSCH preprocessor: set UE_template->
    * pre_allocated_nb_rb_ul[slice_idx]
    * pre_assigned_mcs_ul
@@ -1413,7 +1386,7 @@ schedule_ulsch_rnti(module_id_t   module_idP,
     if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx)) {
       continue;
     }
-    
+
     if (UE_list->UE_template[UE_PCCID(module_idP, UE_id)][UE_id].rach_resource_type > 0)  continue;
 
     // don't schedule if Msg5 is not received yet
@@ -1441,7 +1414,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
     for (int n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
       /* This is the actual CC_id in the list */
       CC_id = UE_list->ordered_ULCCids[n][UE_id];
-
       UE_template_ptr = &(UE_list->UE_template[CC_id][UE_id]);
       UE_sched_ctrl_ptr = &(UE_list->UE_sched_ctrl[UE_id]);
       harq_pid = subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
@@ -1483,7 +1455,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
               UE_sched_ctrl_ptr->ul_inactivity_timer,
               UE_sched_ctrl_ptr->ul_failure_timer,
               UE_sched_ctrl_ptr->cqi_req_timer);
-
         /* Reset the scheduling request */
         UE_template_ptr->ul_SR = 0;
         status = mac_eNB_get_rrc_status(module_idP, rnti);
@@ -1493,13 +1464,12 @@ schedule_ulsch_rnti(module_id_t   module_idP,
           /* Be sure that there are some free RBs */
           if (first_rb_slice[CC_id] >= n_rb_ul_tab[CC_id]) {
             LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
-              module_idP,
-              frameP,
-              subframeP,
-              UE_id,
-              rnti,
-              CC_id);
-
+                  module_idP,
+                  frameP,
+                  subframeP,
+                  UE_id,
+                  rnti,
+                  CC_id);
             continue;
           }
 
@@ -1507,27 +1477,27 @@ schedule_ulsch_rnti(module_id_t   module_idP,
           /* This test seems to be way too long, can we provide an optimization? */
           if (CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, aggregation, rnti)) {
             LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: not enough CCE\n",
-              module_idP,
-              frameP,
-              subframeP,
-              UE_id,
-              rnti,
-              CC_id);
-
+                  module_idP,
+                  frameP,
+                  subframeP,
+                  UE_id,
+                  rnti,
+                  CC_id);
             continue;
           }
-          
+
           /* Handle the aperiodic CQI report */
           cqi_req = 0;
           LOG_D(MAC,"RRC Conenction status %d, cqi_timer %d\n",status,UE_sched_ctrl_ptr->cqi_req_timer);
+
           if (status >= RRC_CONNECTED && UE_sched_ctrl_ptr->cqi_req_timer > 30) {
             if (UE_sched_ctrl_ptr->cqi_received == 0) {
               if (NFAPI_MODE != NFAPI_MONOLITHIC) {
                 cqi_req = 0;
               } else {
                 cqi_req = 1;
-
                 LOG_D(MAC,"Setting CQI_REQ (timer %d)\n",UE_sched_ctrl_ptr->cqi_req_timer);
+
                 /* TDD: to be safe, do not ask CQI in special Subframes:36.213/7.2.3 CQI definition */
                 if (cc[CC_id].tdd_Config) {
                   switch (cc[CC_id].tdd_Config->subframeAssignment) {
@@ -1535,12 +1505,14 @@ schedule_ulsch_rnti(module_id_t   module_idP,
                       if(subframeP == 1 || subframeP == 6) {
                         cqi_req=0;
                       }
+
                       break;
 
                     case 3:
                       if(subframeP == 1) {
                         cqi_req=0;
                       }
+
                       break;
 
                     default:
@@ -1569,7 +1541,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
            */
           snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10;
           target_snr = mac->puSch10xSnr / 10;
-
           /*
            * This assumes accumulated tpc
            * Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
@@ -1578,7 +1549,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
 
           if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
               ((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { //frame wrap-around
-
             UE_template_ptr->pusch_tpc_tx_frame = frameP;
             UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
 
@@ -1597,14 +1567,14 @@ schedule_ulsch_rnti(module_id_t   module_idP,
 
           if (tpc != 1) {
             LOG_D(MAC, "[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
-              module_idP,
-              frameP,
-              subframeP,
-              harq_pid,
-              tpc,
-              tpc_accumulated,
-              snr,
-              target_snr);
+                  module_idP,
+                  frameP,
+                  subframeP,
+                  harq_pid,
+                  tpc,
+                  tpc_accumulated,
+                  snr,
+                  target_snr);
           }
 
           ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
@@ -1618,8 +1588,8 @@ schedule_ulsch_rnti(module_id_t   module_idP,
           if (UE_sched_ctrl_ptr->cdrx_configured) {
             UE_sched_ctrl_ptr->drx_inactivity_timer = 1; // reset drx inactivity timer when new transmission
             VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) UE_sched_ctrl_ptr->drx_inactivity_timer);
-            UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1, 
-                                                       // see definition for more information
+            UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1,
+            // see definition for more information
           }
 
           if (UE_template_ptr->pre_allocated_rb_table_index_ul >= 0) {
@@ -1747,7 +1717,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
                                                0,         // current_tx_nb
                                                0,         // n_srs
                                                get_TBS_UL(UE_template_ptr->mcs_UL[harq_pid], rb_table[rb_table_index]));
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
           /* This is a BL/CE UE allocation */
           if (UE_template_ptr->rach_resource_type > 0) {
@@ -1757,7 +1726,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
                                                  1,  // repetition_number
                                                  (frameP * 10) + subframeP);
           }
-#endif
 
           if (dlsch_flag == 1) {
             if (cqi_req == 1) {
@@ -1862,7 +1830,7 @@ schedule_ulsch_rnti(module_id_t   module_idP,
                                                0, // current_tx_nb
                                                0, // n_srs
                                                UE_template_ptr->TBS_UL[harq_pid]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
           /* This is a BL/CE UE allocation */
           if (UE_template_ptr->rach_resource_type > 0) {
             fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index],
@@ -1871,7 +1839,6 @@ schedule_ulsch_rnti(module_id_t   module_idP,
                                                  1, // repetition_number
                                                  (frameP * 10) + subframeP);
           }
-#endif
 
           if(dlsch_flag == 1) {
             if(cqi_req == 1) {
@@ -1902,14 +1869,14 @@ schedule_ulsch_rnti(module_id_t   module_idP,
           ul_req_tmp->sfn_sf = sched_frame<<4|sched_subframeP;
           ul_req_tmp->header.message_id = NFAPI_UL_CONFIG_REQUEST;
           LOG_D(MAC, "[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d cqi_req %d\n",
-            harq_pid,
-            frameP,
-            subframeP,
-            UE_id,
-            rnti,
-            sched_frame,
-            sched_subframeP,
-            cqi_req);
+                harq_pid,
+                frameP,
+                subframeP,
+                UE_id,
+                rnti,
+                sched_frame,
+                sched_subframeP,
+                cqi_req);
 
           /* HACK: RBs used by retransmission have to be reserved.
            * The current mechanism uses the notion of 'first_rb', so
@@ -1923,13 +1890,13 @@ schedule_ulsch_rnti(module_id_t   module_idP,
            */
           if (first_rb_slice[CC_id] < UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid])
             first_rb_slice[CC_id] = UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid];
-        }  // end of round > 0 
+        }  // end of round > 0
       }  // UE_is_to_be_scheduled
     }  // loop over all active CC_ids
   }  // loop over UE_ids
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 //-----------------------------------------------------------------------------
 /*
  * default ULSCH scheduler for LTE-M
@@ -2365,4 +2332,3 @@ void schedule_ulsch_rnti_emtc(module_id_t   module_idP,
     } // ULCCs
   } // loop over UE_id
 }
-#endif
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index 1760355f6152f12640c1916f84f6d3458032d567..556bf2176f2f29715be1f47ec5c7905ddc5dc637 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -1,23 +1,23 @@
- /*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
- *
- * 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.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
+/*
+* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The OpenAirInterface Software Alliance licenses this file to You under
+* the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+*
+* 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.
+*-------------------------------------------------------------------------------
+* For more information about the OpenAirInterface (OAI) Software Alliance:
+*      contact@openairinterface.org
+*/
 
 /*! \file LAYER2/MAC/defs.h
 * \brief MAC data structures, constant, and function prototype
@@ -54,24 +54,16 @@
 #include "LTE_RACH-ConfigCommon.h"
 #include "LTE_MeasObjectToAddModList.h"
 #include "LTE_MobilityControlInfo.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 #include "LTE_MBSFN-AreaInfoList-r9.h"
 #include "LTE_MBSFN-SubframeConfigList.h"
 #include "LTE_PMCH-InfoList-r9.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 #include "LTE_SCellToAddMod-r10.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 #include "LTE_SystemInformationBlockType1-v1310-IEs.h"
 #include "LTE_SystemInformationBlockType18-r12.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #include "LTE_BCCH-BCH-Message-MBMS.h"
 #include "LTE_BCCH-DL-SCH-Message-MBMS.h"
 #include "LTE_SystemInformationBlockType1-MBMS-r14.h"
 #include "LTE_NonMBSFN-SubframeConfig-r14.h"
-#endif
 #include "LTE_RadioResourceConfigCommonSIB.h"
 #include "nfapi_interface.h"
 #include "PHY_INTERFACE/IF_Module.h"
@@ -98,15 +90,14 @@
 #define DCH_PAYLOAD_SIZE_MAX 4096
 /// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
 // Mask for identifying subframe for MBMS
-#define MBSFN_TDD_SF3 0x80	// for TDD
+#define MBSFN_TDD_SF3 0x80  // for TDD
 #define MBSFN_TDD_SF4 0x40
 #define MBSFN_TDD_SF7 0x20
 #define MBSFN_TDD_SF8 0x10
 #define MBSFN_TDD_SF9 0x08
-#define MBSFN_FDD_SF1 0x80	// for FDD
+#define MBSFN_FDD_SF1 0x80  // for FDD
 #define MBSFN_FDD_SF2 0x40
 #define MBSFN_FDD_SF3 0x20
 #define MBSFN_FDD_SF6 0x10
@@ -117,8 +108,7 @@
 #define MAX_PMCH_perMBSFN 15
 /*!\brief MAX MCCH payload size  */
 #define MCCH_PAYLOAD_SIZE_MAX 128
-//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
-#endif
+//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are hi
 
 #define printk printf
 
@@ -141,9 +131,9 @@
 /*!\brief size of buffer status report table */
 #define BSR_TABLE_SIZE 64
 /*!\brief The power headroom reporting range is from -23 ...+40 dB and beyond, with step 1 */
-#define PHR_MAPPING_OFFSET 23	// if ( x>= -23 ) val = floor (x + 23)
+#define PHR_MAPPING_OFFSET 23 // if ( x>= -23 ) val = floor (x + 23)
 /*!\brief maximum number of resource block groups */
-#define N_RBG_MAX 25		// for 20MHz channel BW
+#define N_RBG_MAX 25    // for 20MHz channel BW
 /*!\brief minimum value for channel quality indicator */
 #define MIN_CQI_VALUE  0
 /*!\brief maximum value for channel quality indicator */
@@ -181,17 +171,17 @@
  */
 /*!\brief MAC header of Random Access Response for Random access preamble identifier (RAPID) */
 typedef struct {
-    uint8_t RAPID:6;
-    uint8_t T:1;
-    uint8_t E:1;
+  uint8_t RAPID:6;
+  uint8_t T:1;
+  uint8_t E:1;
 } __attribute__ ((__packed__)) RA_HEADER_RAPID;
 
 /*!\brief  MAC header of Random Access Response for backoff indicator (BI)*/
 typedef struct {
-    uint8_t BI:4;
-    uint8_t R:2;
-    uint8_t T:1;
-    uint8_t E:1;
+  uint8_t BI:4;
+  uint8_t R:2;
+  uint8_t T:1;
+  uint8_t E:1;
 } __attribute__ ((__packed__)) RA_HEADER_BI;
 /*
 typedef struct {
@@ -224,27 +214,27 @@ typedef struct {
 */
 /*!\brief  MAC subheader short with 7bit Length field */
 typedef struct {
-    uint8_t LCID:5;		// octet 1 LSB
-    uint8_t E:1;
-    uint8_t R:2;		// octet 1 MSB
-    uint8_t L:7;		// octet 2 LSB
-    uint8_t F:1;		// octet 2 MSB
+  uint8_t LCID:5;   // octet 1 LSB
+  uint8_t E:1;
+  uint8_t R:2;    // octet 1 MSB
+  uint8_t L:7;    // octet 2 LSB
+  uint8_t F:1;    // octet 2 MSB
 } __attribute__ ((__packed__)) SCH_SUBHEADER_SHORT;
 /*!\brief  MAC subheader long  with 15bit Length field */
 typedef struct {
-    uint8_t LCID:5;		// octet 1 LSB
-    uint8_t E:1;
-    uint8_t R:2;		// octet 1 MSB
-    uint8_t L_MSB:7;
-    uint8_t F:1;		// octet 2 MSB
-    uint8_t L_LSB:8;
-    uint8_t padding;
+  uint8_t LCID:5;   // octet 1 LSB
+  uint8_t E:1;
+  uint8_t R:2;    // octet 1 MSB
+  uint8_t L_MSB:7;
+  uint8_t F:1;    // octet 2 MSB
+  uint8_t L_LSB:8;
+  uint8_t padding;
 } __attribute__ ((__packed__)) SCH_SUBHEADER_LONG;
 /*!\brief MAC subheader short without length field */
 typedef struct {
-    uint8_t LCID:5;
-    uint8_t E:1;
-    uint8_t R:2;
+  uint8_t LCID:5;
+  uint8_t E:1;
+  uint8_t R:2;
 } __attribute__ ((__packed__)) SCH_SUBHEADER_FIXED;
 
 
@@ -262,9 +252,9 @@ typedef struct {
   uint8_t  LCID:5;
   uint8_t  E:1;
   uint8_t  R1:2;
-  uint8_t  L:7;	// Length field indicating the size of the corresponding SDU in bytes.
+  uint8_t  L:7; // Length field indicating the size of the corresponding SDU in bytes.
   uint8_t  F:1;
-}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_SHORT;
+} __attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_SHORT;
 
 /*!\brief  MAC subheader long  with 24bit DST field */
 typedef struct {
@@ -279,10 +269,10 @@ typedef struct {
   uint8_t  LCID:5;
   uint8_t  E:1;
   uint8_t  R1:2;
-  uint8_t  L_MSB:7;	// Length field indicating the size of the corresponding SDU in bytes.
+  uint8_t  L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
   uint8_t  F:1;
   uint8_t  L_LSB:8;
-}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_LONG;
+} __attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_LONG;
 
 /*!\brief  MAC subheader long  with 24bit DST field */
 typedef struct {
@@ -295,9 +285,9 @@ typedef struct {
   uint8_t  LCID:5;
   uint8_t  E:1;
   uint8_t  R1:2;
-  uint8_t  L:7;	// Length field indicating the size of the corresponding SDU in bytes.
+  uint8_t  L:7; // Length field indicating the size of the corresponding SDU in bytes.
   uint8_t  F:1;
-}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_SHORT;
+} __attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_SHORT;
 
 /*!\brief  MAC subheader long  with 24bit DST field */
 typedef struct {
@@ -311,130 +301,127 @@ typedef struct {
   uint8_t  LCID:5;
   uint8_t  E:1;
   uint8_t  R1:2;
-  uint8_t  L_MSB:7;	// Length field indicating the size of the corresponding SDU in bytes.
+  uint8_t  L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
   uint8_t  F:1;
   uint8_t  L_LSB:8;
-}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_LONG;
+} __attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_LONG;
 
 /*!\brief  mac control element: short buffer status report for a specific logical channel group ID*/
 typedef struct {
-    uint8_t Buffer_size:6;	// octet 1 LSB
-    uint8_t LCGID:2;		// octet 1 MSB
+  uint8_t Buffer_size:6;  // octet 1 LSB
+  uint8_t LCGID:2;    // octet 1 MSB
 } __attribute__ ((__packed__)) BSR_SHORT;
 
 typedef BSR_SHORT BSR_TRUNCATED;
 /*!\brief  mac control element: long buffer status report for all logical channel group ID*/
 typedef struct {
-    uint8_t Buffer_size3:6;
-    uint8_t Buffer_size2:6;
-    uint8_t Buffer_size1:6;
-    uint8_t Buffer_size0:6;
+  uint8_t Buffer_size3:6;
+  uint8_t Buffer_size2:6;
+  uint8_t Buffer_size1:6;
+  uint8_t Buffer_size0:6;
 } __attribute__ ((__packed__)) BSR_LONG;
 
 /*!\brief  mac control element: sidelink buffer status report */
 typedef struct {
-	uint8_t DST_1:4;
-	uint8_t LCGID_1: 2;
-	uint8_t Buffer_size_1:6;
-	uint8_t DST_2:4;
-	uint8_t LCGID_2: 2;
-	uint8_t Buffer_size_2:6;
-}__attribute__((__packed__))SL_BSR;
+  uint8_t DST_1:4;
+  uint8_t LCGID_1: 2;
+  uint8_t Buffer_size_1:6;
+  uint8_t DST_2:4;
+  uint8_t LCGID_2: 2;
+  uint8_t Buffer_size_2:6;
+} __attribute__((__packed__))SL_BSR;
 
 /*!\brief  mac control element: truncated sidelink buffer status report */
 typedef struct {
-	uint8_t DST:4;
-	uint8_t LCGID: 2;
-	uint8_t Buffer_size:6;
-	uint8_t R1:1;
-	uint8_t R2:1;
-	uint8_t R3:1;
-	uint8_t R4:1;
-}__attribute__((__packed__))SL_BSR_Truncated;
+  uint8_t DST:4;
+  uint8_t LCGID: 2;
+  uint8_t Buffer_size:6;
+  uint8_t R1:1;
+  uint8_t R2:1;
+  uint8_t R3:1;
+  uint8_t R4:1;
+} __attribute__((__packed__))SL_BSR_Truncated;
 
 
 
 #define BSR_LONG_SIZE  (sizeof(BSR_LONG))
 /*!\brief  mac control element: timing advance  */
 typedef struct {
-    uint8_t TA:6;
-    uint8_t R:2;
+  uint8_t TA:6;
+  uint8_t R:2;
 } __attribute__ ((__packed__)) TIMING_ADVANCE_CMD;
 /*!\brief  mac control element: power headroom report  */
 typedef struct {
-    uint8_t PH:6;
-    uint8_t R:2;
+  uint8_t PH:6;
+  uint8_t R:2;
 } __attribute__ ((__packed__)) POWER_HEADROOM_CMD;
 
 /*! \brief MIB payload */
 typedef struct {
-    uint8_t payload[3];
+  uint8_t payload[3];
 } __attribute__ ((__packed__)) MIB_PDU;
 /*! \brief CCCH payload */
 typedef struct {
-    uint8_t payload[CCCH_PAYLOAD_SIZE_MAX];
+  uint8_t payload[CCCH_PAYLOAD_SIZE_MAX];
 } __attribute__ ((__packed__)) CCCH_PDU;
 /*! \brief BCCH payload */
 typedef struct {
-    uint8_t payload[BCCH_PAYLOAD_SIZE_MAX];
+  uint8_t payload[BCCH_PAYLOAD_SIZE_MAX];
 } __attribute__ ((__packed__)) BCCH_PDU;
 /*! \brief RAR payload */
 typedef struct {
-    uint8_t payload[RAR_PAYLOAD_SIZE_MAX];
+  uint8_t payload[RAR_PAYLOAD_SIZE_MAX];
 } __attribute__ ((__packed__)) RAR_PDU;
 /*! \brief BCCH payload */
 typedef struct {
-    uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
+  uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
 } __attribute__ ((__packed__)) PCCH_PDU;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 /*! \brief MCCH payload */
 typedef struct {
-    uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
+  uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
 } __attribute__ ((__packed__)) MCCH_PDU;
 /*!< \brief MAC control element for activation and deactivation of component carriers */
 typedef struct {
-    uint8_t C7:1;		/*!< \brief Component carrier 7 */
-    uint8_t C6:1;		/*!< \brief Component carrier 6 */
-    uint8_t C5:1;		/*!< \brief Component carrier 5 */
-    uint8_t C4:1;		/*!< \brief Component carrier 4 */
-    uint8_t C3:1;		/*!< \brief Component carrier 3 */
-    uint8_t C2:1;		/*!< \brief Component carrier 2 */
-    uint8_t C1:1;		/*!< \brief Component carrier 1 */
-    uint8_t R:1;		/*!< \brief Reserved  */
+  uint8_t C7:1;   /*!< \brief Component carrier 7 */
+  uint8_t C6:1;   /*!< \brief Component carrier 6 */
+  uint8_t C5:1;   /*!< \brief Component carrier 5 */
+  uint8_t C4:1;   /*!< \brief Component carrier 4 */
+  uint8_t C3:1;   /*!< \brief Component carrier 3 */
+  uint8_t C2:1;   /*!< \brief Component carrier 2 */
+  uint8_t C1:1;   /*!< \brief Component carrier 1 */
+  uint8_t R:1;    /*!< \brief Reserved  */
 } __attribute__ ((__packed__)) CC_ELEMENT;
 /*! \brief MAC control element: MCH Scheduling Information */
 typedef struct {
-    uint8_t stop_sf_MSB:3;	// octet 1 LSB
-    uint8_t lcid:5;		// octet 2 MSB
-    uint8_t stop_sf_LSB:8;
+  uint8_t stop_sf_MSB:3;  // octet 1 LSB
+  uint8_t lcid:5;   // octet 2 MSB
+  uint8_t stop_sf_LSB:8;
 } __attribute__ ((__packed__)) MSI_ELEMENT;
-#endif
 /*! \brief Values of CCCH LCID for DLSCH */
 #define CCCH_LCHANID 0
 /*!\brief Values of BCCH logical channel (fake)*/
-#define BCCH 3			// SI
+#define BCCH 3      // SI
 /*!\brief Values of PCCH logical channel (fake)*/
-#define PCCH 4			// Paging
+#define PCCH 4      // Paging
 /*!\brief Values of PCCH logical channel (fake) */
-#define MIBCH 5			// MIB
+#define MIBCH 5     // MIB
 /*!\brief Values of BCCH SIB1_BR logical channel (fake) */
-#define BCCH_SIB1_BR 6		// SIB1_BR
+#define BCCH_SIB1_BR 6    // SIB1_BR
 /*!\brief Values of BCCH SIB_BR logical channel (fake) */
-#define BCCH_SI_BR 7		// SI-BR
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+#define BCCH_SI_BR 7    // SI-BR
 /*!\brief Values of BCCH SIB1_BR logical channel (fake) */
 #define BCCH_SIB1_MBMS 60              // SIB1_MBMS //TODO better armonize index
 #define BCCH_SI_MBMS 61                // SIB_MBMS //TODO better armonize index
-#endif
 /*!\brief Value of CCCH / SRB0 logical channel */
-#define CCCH 0			// srb0
+#define CCCH 0      // srb0
 /*!\brief DCCH / SRB1 logical channel */
-#define DCCH 1			// srb1
+#define DCCH 1      // srb1
 /*!\brief DCCH1 / SRB2  logical channel */
-#define DCCH1 2			// srb2
+#define DCCH1 2     // srb2
 /*!\brief DTCH DRB1  logical channel */
-#define DTCH 3			// LCID
+#define DTCH 3      // LCID
 /*!\brief MCCH logical channel */
 //#define MCCH 4
 #define MCCH 62
@@ -449,8 +436,6 @@ typedef struct {
 #define DRX_CMD 30
 /*!\brief LCID of padding LCID for DLSCH */
 #define SHORT_PADDING 31
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 // MCH LCHAN IDs (table6.2.1-4 TS36.321)
 /*!\brief LCID of MCCH for DL */
 #define MCCH_LCHANID 0
@@ -461,7 +446,6 @@ typedef struct {
 //TTN (for D2D)
 #define SL_DISCOVERY 8 //LCID (fake)
 #define MAX_NUM_DEST 10
-#endif
 
 // ULSCH LCHAN IDs
 /*!\brief LCID of extended power headroom for ULSCH */
@@ -477,34 +461,34 @@ typedef struct {
 /*!\brief LCID of long BSR for ULSCH */
 #define LONG_BSR 30
 /*!\bitmaps for BSR Triggers */
-#define	BSR_TRIGGER_NONE		(0)	/* No BSR Trigger */
-#define	BSR_TRIGGER_REGULAR		(1)	/* For Regular and ReTxBSR Expiry Triggers */
-#define	BSR_TRIGGER_PERIODIC	(2)	/* For BSR Periodic Timer Expiry Trigger */
-#define	BSR_TRIGGER_PADDING		(4)	/* For Padding BSR Trigger */
+#define BSR_TRIGGER_NONE    (0) /* No BSR Trigger */
+#define BSR_TRIGGER_REGULAR   (1) /* For Regular and ReTxBSR Expiry Triggers */
+#define BSR_TRIGGER_PERIODIC  (2) /* For BSR Periodic Timer Expiry Trigger */
+#define BSR_TRIGGER_PADDING   (4) /* For Padding BSR Trigger */
 
 
 /*! \brief Downlink SCH PDU Structure */
 typedef struct {
-    uint8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
-    uint16_t Pdu_size[8];
+  uint8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
+  uint16_t Pdu_size[8];
 } __attribute__ ((__packed__)) DLSCH_PDU;
 
 
 /*! \brief MCH PDU Structure */
 typedef struct {
-    int8_t payload[SCH_PAYLOAD_SIZE_MAX];
-    uint16_t Pdu_size;
-    uint8_t mcs;
-    uint8_t sync_area;
-    uint8_t msi_active;
-    uint8_t mcch_active;
-    uint8_t mtch_active;
+  int8_t payload[SCH_PAYLOAD_SIZE_MAX];
+  uint16_t Pdu_size;
+  uint8_t mcs;
+  uint8_t sync_area;
+  uint8_t msi_active;
+  uint8_t mcch_active;
+  uint8_t mtch_active;
 } __attribute__ ((__packed__)) MCH_PDU;
 
 /*! \brief Uplink SCH PDU Structure */
 typedef struct {
-    int8_t payload[SCH_PAYLOAD_SIZE_MAX];	/*!< \brief SACH payload */
-    uint16_t Pdu_size;
+  int8_t payload[SCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
+  uint16_t Pdu_size;
 } __attribute__ ((__packed__)) ULSCH_PDU;
 
 /*! \brief Uplink SCH PDU Structure */
@@ -515,85 +499,85 @@ typedef struct {
 
 /*!\brief RA process state*/
 typedef enum {
-    IDLE = 0,
-    MSG2,
-    WAITMSG3,
-    MSG4,
-    WAITMSG4ACK,
-    MSGCRNTI,
-    MSGCRNTI_ACK
+  IDLE = 0,
+  MSG2,
+  WAITMSG3,
+  MSG4,
+  WAITMSG4ACK,
+  MSGCRNTI,
+  MSGCRNTI_ACK
 } RA_state;
 
 /*!\brief  UE ULSCH scheduling states*/
 typedef enum {
-    S_UL_NONE = 0,
-    S_UL_WAITING,
-    S_UL_SCHEDULED,
-    S_UL_BUFFERED,
-    S_UL_NUM_STATUS
+  S_UL_NONE = 0,
+  S_UL_WAITING,
+  S_UL_SCHEDULED,
+  S_UL_BUFFERED,
+  S_UL_NUM_STATUS
 } UE_ULSCH_STATUS;
 
 /*!\brief  UE DLSCH scheduling states*/
 typedef enum {
-    S_DL_NONE = 0,
-    S_DL_WAITING,
-    S_DL_SCHEDULED,
-    S_DL_BUFFERED,
-    S_DL_NUM_STATUS
+  S_DL_NONE = 0,
+  S_DL_WAITING,
+  S_DL_SCHEDULED,
+  S_DL_BUFFERED,
+  S_DL_NUM_STATUS
 } UE_DLSCH_STATUS;
 
 /*!\brief  scheduling policy for the contention-based access */
 typedef enum {
-    CBA_ES = 0,			/// equal share of RB among groups w
-    CBA_ES_S,			/// equal share of RB among groups with small allocation
-    CBA_PF,			/// proportional fair (kind of)
-    CBA_PF_S,			/// proportional fair (kind of) with small RB allocation
-    CBA_RS			/// random allocation
+  CBA_ES = 0,     /// equal share of RB among groups w
+  CBA_ES_S,     /// equal share of RB among groups with small allocation
+  CBA_PF,     /// proportional fair (kind of)
+  CBA_PF_S,     /// proportional fair (kind of) with small RB allocation
+  CBA_RS      /// random allocation
 } CBA_POLICY;
 
 /*!\brief  scheduler mode */
 typedef enum {
-    SCHED_MODE_DEFAULT = 0,			/// default cheduler
-    SCHED_MODE_FAIR_RR			/// fair raund robin
+  SCHED_MODE_DEFAULT = 0,     /// default cheduler
+  SCHED_MODE_FAIR_RR      /// fair raund robin
 } SCHEDULER_MODES;
 
 
 /*! \brief temporary struct for ULSCH sched */
 typedef struct {
-    rnti_t rnti;
-    uint16_t subframe;
-    uint16_t serving_num;
-    UE_ULSCH_STATUS status;
+  rnti_t rnti;
+  uint16_t subframe;
+  uint16_t serving_num;
+  UE_ULSCH_STATUS status;
 } eNB_ULSCH_INFO;
 
 /*! \brief temp struct for DLSCH sched */
 typedef struct {
-    rnti_t rnti;
-    uint16_t weight;
-    uint16_t subframe;
-    uint16_t serving_num;
-    UE_DLSCH_STATUS status;
+  rnti_t rnti;
+  uint16_t weight;
+  uint16_t subframe;
+  uint16_t serving_num;
+  UE_DLSCH_STATUS status;
 } eNB_DLSCH_INFO;
 
 /*! \brief eNB overall statistics */
 typedef struct {
-    /// num BCCH PDU per CC
-    uint32_t total_num_bcch_pdu;
-    /// BCCH buffer size
-    uint32_t bcch_buffer;
-    /// total BCCH buffer size
-    uint32_t total_bcch_buffer;
-    /// BCCH MCS
-    uint32_t bcch_mcs;
-
-    /// num CCCH PDU per CC
-    uint32_t total_num_ccch_pdu;
-    /// BCCH buffer size
-    uint32_t ccch_buffer;
-    /// total BCCH buffer size
-    uint32_t total_ccch_buffer;
-    /// BCCH MCS
-    uint32_t ccch_mcs;
+  /// num BCCH PDU per CC
+  uint32_t total_num_bcch_pdu;
+  /// BCCH buffer size
+  uint32_t bcch_buffer;
+  /// total BCCH buffer size
+  uint32_t total_bcch_buffer;
+  /// BCCH MCS
+  uint32_t bcch_mcs;
+
+  /// num CCCH PDU per CC
+  uint32_t total_num_ccch_pdu;
+  /// BCCH buffer size
+  uint32_t ccch_buffer;
+  /// total BCCH buffer size
+  uint32_t total_ccch_buffer;
+  /// BCCH MCS
+  uint32_t ccch_mcs;
 
   /// num PCCH PDU per CC
   uint32_t total_num_pcch_pdu;
@@ -604,472 +588,469 @@ typedef struct {
   /// BCCH MCS
   uint32_t pcch_mcs;
 
-/// num active users
-    uint16_t num_dlactive_UEs;
-    ///  available number of PRBs for a give SF
-    uint16_t available_prbs;
-    /// total number of PRB available for the user plane
-    uint32_t total_available_prbs;
-    /// aggregation
-    /// total avilable nccc : num control channel element
-    uint16_t available_ncces;
-    // only for a new transmission, should be extended for retransmission
-    // current dlsch  bit rate for all transport channels
-    uint32_t dlsch_bitrate;
-    //
-    uint32_t dlsch_bytes_tx;
-    //
-    uint32_t dlsch_pdus_tx;
-    //
-    uint32_t total_dlsch_bitrate;
-    //
-    uint32_t total_dlsch_bytes_tx;
-    //
-    uint32_t total_dlsch_pdus_tx;
-
-    // here for RX
-    //
-    uint32_t ulsch_bitrate;
-    //
-    uint32_t ulsch_bytes_rx;
-    //
-    uint64_t ulsch_pdus_rx;
-
-    uint32_t total_ulsch_bitrate;
-    //
-    uint32_t total_ulsch_bytes_rx;
-    //
-    uint32_t total_ulsch_pdus_rx;
-
-
-    /// MAC agent-related stats
-    /// total number of scheduling decisions
-    int sched_decisions;
-    /// missed deadlines
-    int missed_deadlines;
+  /// num active users
+  uint16_t num_dlactive_UEs;
+  ///  available number of PRBs for a give SF
+  uint16_t available_prbs;
+  /// total number of PRB available for the user plane
+  uint32_t total_available_prbs;
+  /// aggregation
+  /// total avilable nccc : num control channel element
+  uint16_t available_ncces;
+  // only for a new transmission, should be extended for retransmission
+  // current dlsch  bit rate for all transport channels
+  uint32_t dlsch_bitrate;
+  //
+  uint32_t dlsch_bytes_tx;
+  //
+  uint32_t dlsch_pdus_tx;
+  //
+  uint32_t total_dlsch_bitrate;
+  //
+  uint32_t total_dlsch_bytes_tx;
+  //
+  uint32_t total_dlsch_pdus_tx;
+
+  // here for RX
+  //
+  uint32_t ulsch_bitrate;
+  //
+  uint32_t ulsch_bytes_rx;
+  //
+  uint64_t ulsch_pdus_rx;
+
+  uint32_t total_ulsch_bitrate;
+  //
+  uint32_t total_ulsch_bytes_rx;
+  //
+  uint32_t total_ulsch_pdus_rx;
+
+
+  /// MAC agent-related stats
+  /// total number of scheduling decisions
+  int sched_decisions;
+  /// missed deadlines
+  int missed_deadlines;
 
 } eNB_STATS;
 
 /*! \brief eNB statistics for the connected UEs*/
 typedef struct {
-    /// CRNTI of UE
-    rnti_t crnti;		///user id (rnti) of connected UEs
-    // rrc status
-    uint8_t rrc_status;
-    /// harq pid
-    uint8_t harq_pid;
-    /// harq rounf
-    uint8_t harq_round;
-    /// total available number of PRBs for a new transmission
-    uint16_t rbs_used;
-    /// total available number of PRBs for a retransmission
-    uint16_t rbs_used_retx;
-    /// total nccc used for a new transmission: num control channel element
-    uint16_t ncce_used;
-    /// total avilable nccc for a retransmission: num control channel element
-    uint16_t ncce_used_retx;
-
-    // mcs1 before the rate adaptaion
-    uint8_t dlsch_mcs1;
-    /// Target mcs2 after rate-adaptation
-    uint8_t dlsch_mcs2;
-    //  current TBS with mcs2
-    uint32_t TBS;
-    //  total TBS with mcs2
-    //  uint32_t total_TBS;
-    //  total rb used for a new transmission
-    uint32_t total_rbs_used;
-    //  total rb used for retransmission
-    uint32_t total_rbs_used_retx;
-
-    /// TX
-    /// Num pkt
-    uint32_t num_pdu_tx[NB_RB_MAX];
-    /// num bytes
-    uint32_t num_bytes_tx[NB_RB_MAX];
-    /// num retransmission / harq
-    uint32_t num_retransmission;
-    /// instantaneous tx throughput for each TTI
-    //  uint32_t tti_throughput[NB_RB_MAX];
-    // Number of received MAC SDU
-    uint32_t num_mac_sdu_tx;
-    // LCID related to SDU
-    unsigned char lcid_sdu[NB_RB_MAX];
-    // Length of SDU Got from LC DL
-    uint32_t sdu_length_tx[NB_RB_MAX];
-
-
-    /// overall
-    //
-    uint32_t dlsch_bitrate;
-    //total
-    uint32_t total_dlsch_bitrate;
-    /// headers+ CE +  padding bytes for a MAC PDU
-    uint64_t overhead_bytes;
-    /// headers+ CE +  padding bytes for a MAC PDU
-    uint64_t total_overhead_bytes;
-    /// headers+ CE +  padding bytes for a MAC PDU
-    uint64_t avg_overhead_bytes;
-    // MAC multiplexed payload
-    uint64_t total_sdu_bytes;
-    // total MAC pdu bytes
-    uint64_t total_pdu_bytes;
-
-    // total num pdu
-    uint32_t total_num_pdus;
-    //
-    //  uint32_t avg_pdu_size;
-
-    /// RX
-
-    /// PUCCH1a/b power (dBm)
-    int32_t Po_PUCCH_dBm;
-    /// Indicator that Po_PUCCH has been updated by PHY
-    int32_t Po_PUCCH_update;
-    /// Uplink measured RSSI
-    int32_t UL_rssi;
-    /// preassigned mcs after rate adaptation
-    uint8_t ulsch_mcs1;
-    /// adjusted mcs
-    uint8_t ulsch_mcs2;
-
-    /// estimated average pdu inter-departure time
-    uint32_t avg_pdu_idt;
-    /// estimated average pdu size
-    uint32_t avg_pdu_ps;
-    ///
-    uint32_t aggregated_pdu_size;
-    uint32_t aggregated_pdu_arrival;
-
-    ///  uplink transport block size
-    uint32_t ulsch_TBS;
-
-    uint32_t total_ulsch_TBS;
-
-    ///  total rb used for a new uplink transmission
-    uint32_t num_retransmission_rx;
-    ///  total rb used for a new uplink transmission
-    uint32_t rbs_used_rx;
-    ///  total rb used for a new uplink retransmission
-    uint32_t rbs_used_retx_rx;
-    ///  total rb used for a new uplink transmission
-    uint32_t total_rbs_used_rx;
-    /// snr
-    int32_t snr;
-    /// target snr
-    int32_t target_snr;
-
-    /// num rx pdu
-    uint32_t num_pdu_rx[NB_RB_MAX];
-    /// num bytes rx
-    uint32_t num_bytes_rx[NB_RB_MAX];
-    /// instantaneous rx throughput for each TTI
-    //  uint32_t tti_goodput[NB_RB_MAX];
-    /// errors
-    uint32_t num_errors_rx;
-
-    uint64_t overhead_bytes_rx;
-    /// headers+ CE +  padding bytes for a MAC PDU
-    uint64_t total_overhead_bytes_rx;
-    /// headers+ CE +  padding bytes for a MAC PDU
-    uint64_t avg_overhead_bytes_rx;
-    //
-    uint32_t ulsch_bitrate;
-    //total
-    uint32_t total_ulsch_bitrate;
-    /// overall
-    ///  MAC pdu bytes
-    uint64_t pdu_bytes_rx;
-    /// total MAC pdu bytes
-    uint64_t total_pdu_bytes_rx;
-    /// total num pdu
-    uint32_t total_num_pdus_rx;
-    /// num of error pdus
-    uint32_t total_num_errors_rx;
-    // Number of error PDUS
-    uint32_t num_mac_sdu_rx;
-    // Length of SDU Got from LC UL - Size array can be refined
-    uint32_t      sdu_length_rx[NB_RB_MAX];
+  /// CRNTI of UE
+  rnti_t crnti;   ///user id (rnti) of connected UEs
+  // rrc status
+  uint8_t rrc_status;
+  /// harq pid
+  uint8_t harq_pid;
+  /// harq rounf
+  uint8_t harq_round;
+  /// total available number of PRBs for a new transmission
+  uint16_t rbs_used;
+  /// total available number of PRBs for a retransmission
+  uint16_t rbs_used_retx;
+  /// total nccc used for a new transmission: num control channel element
+  uint16_t ncce_used;
+  /// total avilable nccc for a retransmission: num control channel element
+  uint16_t ncce_used_retx;
+
+  // mcs1 before the rate adaptaion
+  uint8_t dlsch_mcs1;
+  /// Target mcs2 after rate-adaptation
+  uint8_t dlsch_mcs2;
+  //  current TBS with mcs2
+  uint32_t TBS;
+  //  total TBS with mcs2
+  //  uint32_t total_TBS;
+  //  total rb used for a new transmission
+  uint32_t total_rbs_used;
+  //  total rb used for retransmission
+  uint32_t total_rbs_used_retx;
+
+  /// TX
+  /// Num pkt
+  uint32_t num_pdu_tx[NB_RB_MAX];
+  /// num bytes
+  uint32_t num_bytes_tx[NB_RB_MAX];
+  /// num retransmission / harq
+  uint32_t num_retransmission;
+  /// instantaneous tx throughput for each TTI
+  //  uint32_t tti_throughput[NB_RB_MAX];
+  // Number of received MAC SDU
+  uint32_t num_mac_sdu_tx;
+  // LCID related to SDU
+  unsigned char lcid_sdu[NB_RB_MAX];
+  // Length of SDU Got from LC DL
+  uint32_t sdu_length_tx[NB_RB_MAX];
+
+
+  /// overall
+  //
+  uint32_t dlsch_bitrate;
+  //total
+  uint32_t total_dlsch_bitrate;
+  /// headers+ CE +  padding bytes for a MAC PDU
+  uint64_t overhead_bytes;
+  /// headers+ CE +  padding bytes for a MAC PDU
+  uint64_t total_overhead_bytes;
+  /// headers+ CE +  padding bytes for a MAC PDU
+  uint64_t avg_overhead_bytes;
+  // MAC multiplexed payload
+  uint64_t total_sdu_bytes;
+  // total MAC pdu bytes
+  uint64_t total_pdu_bytes;
+
+  // total num pdu
+  uint32_t total_num_pdus;
+  //
+  //  uint32_t avg_pdu_size;
+
+  /// RX
+
+  /// PUCCH1a/b power (dBm)
+  int32_t Po_PUCCH_dBm;
+  /// Indicator that Po_PUCCH has been updated by PHY
+  int32_t Po_PUCCH_update;
+  /// Uplink measured RSSI
+  int32_t UL_rssi;
+  /// preassigned mcs after rate adaptation
+  uint8_t ulsch_mcs1;
+  /// adjusted mcs
+  uint8_t ulsch_mcs2;
+
+  /// estimated average pdu inter-departure time
+  uint32_t avg_pdu_idt;
+  /// estimated average pdu size
+  uint32_t avg_pdu_ps;
+  ///
+  uint32_t aggregated_pdu_size;
+  uint32_t aggregated_pdu_arrival;
+
+  ///  uplink transport block size
+  uint32_t ulsch_TBS;
+
+  uint32_t total_ulsch_TBS;
+
+  ///  total rb used for a new uplink transmission
+  uint32_t num_retransmission_rx;
+  ///  total rb used for a new uplink transmission
+  uint32_t rbs_used_rx;
+  ///  total rb used for a new uplink retransmission
+  uint32_t rbs_used_retx_rx;
+  ///  total rb used for a new uplink transmission
+  uint32_t total_rbs_used_rx;
+  /// snr
+  int32_t snr;
+  /// target snr
+  int32_t target_snr;
+
+  /// num rx pdu
+  uint32_t num_pdu_rx[NB_RB_MAX];
+  /// num bytes rx
+  uint32_t num_bytes_rx[NB_RB_MAX];
+  /// instantaneous rx throughput for each TTI
+  //  uint32_t tti_goodput[NB_RB_MAX];
+  /// errors
+  uint32_t num_errors_rx;
+
+  uint64_t overhead_bytes_rx;
+  /// headers+ CE +  padding bytes for a MAC PDU
+  uint64_t total_overhead_bytes_rx;
+  /// headers+ CE +  padding bytes for a MAC PDU
+  uint64_t avg_overhead_bytes_rx;
+  //
+  uint32_t ulsch_bitrate;
+  //total
+  uint32_t total_ulsch_bitrate;
+  /// overall
+  ///  MAC pdu bytes
+  uint64_t pdu_bytes_rx;
+  /// total MAC pdu bytes
+  uint64_t total_pdu_bytes_rx;
+  /// total num pdu
+  uint32_t total_num_pdus_rx;
+  /// num of error pdus
+  uint32_t total_num_errors_rx;
+  // Number of error PDUS
+  uint32_t num_mac_sdu_rx;
+  // Length of SDU Got from LC UL - Size array can be refined
+  uint32_t      sdu_length_rx[NB_RB_MAX];
 
 } eNB_UE_STATS;
 /*! \brief eNB template for UE context information  */
 
 typedef struct {
-    /// C-RNTI of UE
-    rnti_t rnti;
-    /// NDI from last scheduling
-    uint8_t oldNDI[8];
-    /// mcs1 from last scheduling
-    uint8_t oldmcs1[8];
-    /// mcs2 from last scheduling
-    uint8_t oldmcs2[8];
-    /// NDI from last UL scheduling
-    uint8_t oldNDI_UL[8];
-    /// mcs from last UL scheduling
-    uint8_t mcs_UL[8];
-    /// TBS from last UL scheduling
-    int TBS_UL[8];
-    /// Flag to indicate UL has been scheduled at least once
-    boolean_t ul_active;
-    /// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
-    boolean_t configured;
-
-    /// MCS from last scheduling
-    uint8_t mcs[8];
-
-    /// TPC from last scheduling
-    uint8_t oldTPC[8];
-
-    // PHY interface info
-
-    /// Number of Allocated RBs for DL after scheduling (prior to frequency allocation)
-    uint16_t nb_rb[8];		// num_max_harq
-
-    /// Number of Allocated RBs for UL after scheduling
-    uint16_t nb_rb_ul[8];	// num_max_harq
-
-    /// Number of Allocated RBs for UL after scheduling
-    uint16_t first_rb_ul[8];	// num_max_harq
-
-    /// Is CQI requested for UL after scheduling 1st transmission
-    uint8_t cqi_req[8];         // num_max_harq
-
-    /// Cyclic shift for DMRS after scheduling
-    uint16_t cshift[8];		// num_max_harq
-
-    /// Number of Allocated RBs by the ulsch preprocessor
-    uint8_t pre_allocated_nb_rb_ul[MAX_NUM_SLICES];
-
-    /// index of Allocated RBs by the ulsch preprocessor
-    int8_t pre_allocated_rb_table_index_ul;
-
-    /// total allocated RBs
-    int8_t total_allocated_rbs;
-
-    /// pre-assigned MCS by the ulsch preprocessor
-    uint8_t pre_assigned_mcs_ul;
-
-    /// assigned MCS by the ulsch scheduler
-    uint8_t assigned_mcs_ul;
-
-    /// DL DAI
-    uint8_t DAI;
-
-    /// UL DAI
-    uint8_t DAI_ul[10];
-
-    /// UL Scheduling Request Received
-    uint8_t ul_SR;
-
-    ///Resource Block indication for each sub-band in MU-MIMO
-    uint8_t rballoc_subband[8][50];
-
-    // Logical channel info for link with RLC
-
-    /// LCGID mapping
-    long lcgidmap[11];
-
-	///UE logical channel priority
-    long lcgidpriority[11];
-
-    /// phr information
-    int8_t phr_info;
-
-    /// phr information
-    int8_t phr_info_configured;
-
-    ///dl buffer info
-    uint32_t dl_buffer_info[MAX_NUM_LCID];
-    /// total downlink buffer info
-    uint32_t dl_buffer_total;
-    /// total downlink pdus
-    uint32_t dl_pdus_total;
-    /// downlink pdus for each LCID
-    uint32_t dl_pdus_in_buffer[MAX_NUM_LCID];
-    /// creation time of the downlink buffer head for each LCID
-    uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
-    /// maximum creation time of the downlink buffer head across all LCID
-    uint32_t dl_buffer_head_sdu_creation_time_max;
-    /// a flag indicating that the downlink head SDU is segmented
-    uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
-    /// size of remaining size to send for the downlink head SDU
-    uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
-
-    /// uplink buffer creation time for each LCID
-    uint32_t ul_buffer_creation_time[MAX_NUM_LCGID];
-    /// maximum uplink buffer creation time across all the LCIDs
-    uint32_t ul_buffer_creation_time_max;
-    /// uplink buffer size per LCID
-    uint32_t ul_buffer_info[MAX_NUM_LCGID];
-
-    /// uplink bytes that are currently scheduled
-    int scheduled_ul_bytes;
-    /// estimation of the UL buffer size
-    int estimated_ul_buffer;
+  /// C-RNTI of UE
+  rnti_t rnti;
+  /// NDI from last scheduling
+  uint8_t oldNDI[8];
+  /// mcs1 from last scheduling
+  uint8_t oldmcs1[8];
+  /// mcs2 from last scheduling
+  uint8_t oldmcs2[8];
+  /// NDI from last UL scheduling
+  uint8_t oldNDI_UL[8];
+  /// mcs from last UL scheduling
+  uint8_t mcs_UL[8];
+  /// TBS from last UL scheduling
+  int TBS_UL[8];
+  /// Flag to indicate UL has been scheduled at least once
+  boolean_t ul_active;
+  /// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
+  boolean_t configured;
+
+  /// MCS from last scheduling
+  uint8_t mcs[8];
+
+  /// TPC from last scheduling
+  uint8_t oldTPC[8];
+
+  // PHY interface info
+
+  /// Number of Allocated RBs for DL after scheduling (prior to frequency allocation)
+  uint16_t nb_rb[8];    // num_max_harq
+
+  /// Number of Allocated RBs for UL after scheduling
+  uint16_t nb_rb_ul[8]; // num_max_harq
+
+  /// Number of Allocated RBs for UL after scheduling
+  uint16_t first_rb_ul[8];  // num_max_harq
+
+  /// Is CQI requested for UL after scheduling 1st transmission
+  uint8_t cqi_req[8];         // num_max_harq
+
+  /// Cyclic shift for DMRS after scheduling
+  uint16_t cshift[8];   // num_max_harq
+
+  /// Number of Allocated RBs by the ulsch preprocessor
+  uint8_t pre_allocated_nb_rb_ul[MAX_NUM_SLICES];
+
+  /// index of Allocated RBs by the ulsch preprocessor
+  int8_t pre_allocated_rb_table_index_ul;
+
+  /// total allocated RBs
+  int8_t total_allocated_rbs;
+
+  /// pre-assigned MCS by the ulsch preprocessor
+  uint8_t pre_assigned_mcs_ul;
+
+  /// assigned MCS by the ulsch scheduler
+  uint8_t assigned_mcs_ul;
+
+  /// DL DAI
+  uint8_t DAI;
+
+  /// UL DAI
+  uint8_t DAI_ul[10];
+
+  /// UL Scheduling Request Received
+  uint8_t ul_SR;
+
+  ///Resource Block indication for each sub-band in MU-MIMO
+  uint8_t rballoc_subband[8][50];
+
+  // Logical channel info for link with RLC
+
+  /// LCGID mapping
+  long lcgidmap[11];
+
+  ///UE logical channel priority
+  long lcgidpriority[11];
+
+  /// phr information
+  int8_t phr_info;
+
+  /// phr information
+  int8_t phr_info_configured;
+
+  ///dl buffer info
+  uint32_t dl_buffer_info[MAX_NUM_LCID];
+  /// total downlink buffer info
+  uint32_t dl_buffer_total;
+  /// total downlink pdus
+  uint32_t dl_pdus_total;
+  /// downlink pdus for each LCID
+  uint32_t dl_pdus_in_buffer[MAX_NUM_LCID];
+  /// creation time of the downlink buffer head for each LCID
+  uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
+  /// maximum creation time of the downlink buffer head across all LCID
+  uint32_t dl_buffer_head_sdu_creation_time_max;
+  /// a flag indicating that the downlink head SDU is segmented
+  uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
+  /// size of remaining size to send for the downlink head SDU
+  uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
+
+  /// uplink buffer creation time for each LCID
+  uint32_t ul_buffer_creation_time[MAX_NUM_LCGID];
+  /// maximum uplink buffer creation time across all the LCIDs
+  uint32_t ul_buffer_creation_time_max;
+  /// uplink buffer size per LCID
+  uint32_t ul_buffer_info[MAX_NUM_LCGID];
 
-    /// UE tx power
-    int32_t ue_tx_power;
+  /// uplink bytes that are currently scheduled
+  int scheduled_ul_bytes;
+  /// estimation of the UL buffer size
+  int estimated_ul_buffer;
 
-    /// stores the frame where the last TPC was transmitted
-    uint32_t pusch_tpc_tx_frame;
-    uint32_t pusch_tpc_tx_subframe;
-    uint32_t pucch_tpc_tx_frame;
-    uint32_t pucch_tpc_tx_subframe;
+  /// UE tx power
+  int32_t ue_tx_power;
 
+  /// stores the frame where the last TPC was transmitted
+  uint32_t pusch_tpc_tx_frame;
+  uint32_t pusch_tpc_tx_subframe;
+  uint32_t pucch_tpc_tx_frame;
+  uint32_t pucch_tpc_tx_subframe;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    uint8_t rach_resource_type;
-    uint16_t mpdcch_repetition_cnt;
-    frame_t Msg2_frame;
-#endif
-    sub_frame_t Msg2_subframe;
+  uint8_t rach_resource_type;
+  uint16_t mpdcch_repetition_cnt;
+  frame_t Msg2_frame;
+  sub_frame_t Msg2_subframe;
 
-    LTE_PhysicalConfigDedicated_t *physicalConfigDedicated;
+  LTE_PhysicalConfigDedicated_t *physicalConfigDedicated;
 
 } UE_TEMPLATE;
 
 /*! \brief scheduling control information set through an API (not used)*/
 typedef struct {
-    ///UL transmission bandwidth in RBs
-    uint8_t ul_bandwidth[MAX_NUM_LCID];
-    ///DL transmission bandwidth in RBs
-    uint8_t dl_bandwidth[MAX_NUM_LCID];
-
-    //To do GBR bearer
-    uint8_t min_ul_bandwidth[MAX_NUM_LCID];
-
-    uint8_t min_dl_bandwidth[MAX_NUM_LCID];
-
-    ///aggregated bit rate of non-gbr bearer per UE
-    uint64_t ue_AggregatedMaximumBitrateDL;
-    ///aggregated bit rate of non-gbr bearer per UE
-    uint64_t ue_AggregatedMaximumBitrateUL;
-    ///CQI scheduling interval in subframes.
-    uint16_t cqiSchedInterval;
-    ///Contention resolution timer used during random access
-    uint8_t mac_ContentionResolutionTimer;
-
-    uint16_t max_rbs_allowed_slice[NFAPI_CC_MAX][MAX_NUM_SLICES];
-    uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES];
-
-    uint8_t max_mcs[MAX_NUM_LCID];
-
-    uint16_t priority[MAX_NUM_LCID];
-
-    // resource scheduling information
-
-    /// Current DL harq round per harq_pid on each CC
-    uint8_t round[NFAPI_CC_MAX][10];
-    /// Current Active TBs per harq_pid on each CC
-    uint8_t tbcnt[NFAPI_CC_MAX][10];
-    /// Current UL harq round per harq_pid on each CC
-    uint8_t round_UL[NFAPI_CC_MAX][8];
-    uint8_t dl_pow_off[NFAPI_CC_MAX];
-    uint16_t pre_nb_available_rbs[NFAPI_CC_MAX];
-    unsigned char rballoc_sub_UE[NFAPI_CC_MAX][N_RBG_MAX];
-    uint16_t ta_timer;
-    int16_t ta_update;
-    uint16_t ul_consecutive_errors;
-    int32_t context_active_timer;
-    /// timer for regular CQI request on PUSCH
-    int32_t cqi_req_timer;
-    /// indicator that CQI was received on PUSCH when requested
-    int32_t cqi_received;
-    int32_t ul_inactivity_timer;
-    int32_t ul_failure_timer;
-    uint32_t ue_reestablishment_reject_timer;
-    uint32_t ue_reestablishment_reject_timer_thres;
-    int32_t ul_scheduled;
-    int32_t ra_pdcch_order_sent;
-    int32_t ul_out_of_sync;
-    int32_t phr_received;
-    uint8_t periodic_ri_received[NFAPI_CC_MAX];
-    uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
-    uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
-    uint8_t pucch1_snr[NFAPI_CC_MAX];
-    uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
-    uint8_t pucch2_snr[NFAPI_CC_MAX];
-    uint8_t pucch3_cqi_update[NFAPI_CC_MAX];
-    uint8_t pucch3_snr[NFAPI_CC_MAX];
-    uint8_t pusch_snr[NFAPI_CC_MAX];
-    uint16_t feedback_cnt[NFAPI_CC_MAX];
-    uint16_t timing_advance;
-    uint16_t timing_advance_r9;
-    uint8_t tpc_accumulated[NFAPI_CC_MAX];
-    uint8_t periodic_wideband_cqi[NFAPI_CC_MAX];
-    uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX];
-    uint8_t periodic_wideband_pmi[NFAPI_CC_MAX];
-    uint8_t periodic_subband_cqi[NFAPI_CC_MAX][16];
-    uint8_t periodic_subband_spatial_diffcqi[NFAPI_CC_MAX][16];
-    uint8_t aperiodic_subband_cqi0[NFAPI_CC_MAX][25];
-    uint8_t aperiodic_subband_pmi[NFAPI_CC_MAX][25];
-    uint8_t aperiodic_subband_diffcqi0[NFAPI_CC_MAX][25];
-    uint8_t aperiodic_subband_cqi1[NFAPI_CC_MAX][25];
-    uint8_t aperiodic_subband_diffcqi1[NFAPI_CC_MAX][25];
-    uint8_t aperiodic_wideband_cqi0[NFAPI_CC_MAX];
-    uint8_t aperiodic_wideband_pmi[NFAPI_CC_MAX];
-    uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX];
-    uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX];
-    uint8_t dl_cqi[NFAPI_CC_MAX];
-    int32_t uplane_inactivity_timer;
-    uint8_t crnti_reconfigurationcomplete_flag;
-    uint8_t cqi_req_flag;
-
-    /* HARQ RRT Timers */
-    /// (UL) HARQ RTT timers, especially used for CDRX operations, one timer per cell per harq process (and per user)
-    uint8_t harq_rtt_timer[NFAPI_CC_MAX][8];
-    uint8_t ul_harq_rtt_timer[NFAPI_CC_MAX][8]; // Note: UL HARQ RTT timers are only for asynchronous HARQ processes
-    uint8_t ul_synchronous_harq_timer[NFAPI_CC_MAX][8];  // These timers are used for UL synchronous HARQ processes
-
-    /* C-DRX related timers */
-    /* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
-    /// is TRUE if the cqi mask feature is activated by RRC configuration
-    boolean_t cqi_mask_boolean;
-    /// is TRUE if the following drx parameters are configured for UE
-    boolean_t cdrx_configured;
-    /* 
-     * if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge 
-     * the activation. This is needed, during the RRC configuration process, when the context is
-     * configured on the eNB side, but not yet on the UE side...
-     */
-    boolean_t cdrx_waiting_ack;
-    /*
-     * Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes). 
-     * When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
-     * a SR just after a periodic DCI0 ULSCH scheduling. Without CDRX there is no problem, but with CDRX this case would
-     * create a lost in timers synchronization.
-     */ 
-    uint8_t dci0_ongoing_timer;
-    /// is TRUE if the UE is in "Active Time", hence listening to PDCCH
-    boolean_t in_active_time;
-    /// OnDurationTimer
-    uint16_t  on_duration_timer;
-    uint16_t  on_duration_timer_thres;
-    /// drx-InactivityTimer
-    uint16_t  drx_inactivity_timer;
-    uint16_t  drx_inactivity_timer_thres;
-    /// is TRUE if UE is currently in short DRX cycle
-    boolean_t in_short_drx_cycle;
-    /// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
-    uint8_t  drx_shortCycle_timer_value;
-    /// shortDRX-Cycle (duration of one short DRX cycle)
-    uint16_t   short_drx_cycle_duration;
-    /// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
-    uint16_t  drx_shortCycle_timer;
-    uint16_t  drx_shortCycle_timer_thres;
-    /// is TRUE if UE is currently in long DRX cycle
-    boolean_t in_long_drx_cycle;
-    /// longDRX-CycleStartOffset (long DRX cycle timer)
-    uint16_t  drx_longCycle_timer;
-    uint16_t  drx_longCycle_timer_thres;
-    /// longDRX-CycleStartOffset (offset value)
-    uint16_t  drx_start_offset;
-    /// DRX retransmission timer, one per DL HARQ process
-    uint8_t   drx_retransmission_timer[8];
-    uint8_t   drx_retransmission_timer_thres[8];
-    /// DRX UL retransmission timer, one per UL HARQ process
-    /* Not implemented yet */
-    /* End of C-DRX related timers */
+  ///UL transmission bandwidth in RBs
+  uint8_t ul_bandwidth[MAX_NUM_LCID];
+  ///DL transmission bandwidth in RBs
+  uint8_t dl_bandwidth[MAX_NUM_LCID];
+
+  //To do GBR bearer
+  uint8_t min_ul_bandwidth[MAX_NUM_LCID];
+
+  uint8_t min_dl_bandwidth[MAX_NUM_LCID];
+
+  ///aggregated bit rate of non-gbr bearer per UE
+  uint64_t ue_AggregatedMaximumBitrateDL;
+  ///aggregated bit rate of non-gbr bearer per UE
+  uint64_t ue_AggregatedMaximumBitrateUL;
+  ///CQI scheduling interval in subframes.
+  uint16_t cqiSchedInterval;
+  ///Contention resolution timer used during random access
+  uint8_t mac_ContentionResolutionTimer;
+
+  uint16_t max_rbs_allowed_slice[NFAPI_CC_MAX][MAX_NUM_SLICES];
+  uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES];
+
+  uint8_t max_mcs[MAX_NUM_LCID];
+
+  uint16_t priority[MAX_NUM_LCID];
+
+  // resource scheduling information
+
+  /// Current DL harq round per harq_pid on each CC
+  uint8_t round[NFAPI_CC_MAX][10];
+  /// Current Active TBs per harq_pid on each CC
+  uint8_t tbcnt[NFAPI_CC_MAX][10];
+  /// Current UL harq round per harq_pid on each CC
+  uint8_t round_UL[NFAPI_CC_MAX][8];
+  uint8_t dl_pow_off[NFAPI_CC_MAX];
+  uint16_t pre_nb_available_rbs[NFAPI_CC_MAX];
+  unsigned char rballoc_sub_UE[NFAPI_CC_MAX][N_RBG_MAX];
+  uint16_t ta_timer;
+  int16_t ta_update;
+  uint16_t ul_consecutive_errors;
+  int32_t context_active_timer;
+  /// timer for regular CQI request on PUSCH
+  int32_t cqi_req_timer;
+  /// indicator that CQI was received on PUSCH when requested
+  int32_t cqi_received;
+  int32_t ul_inactivity_timer;
+  int32_t ul_failure_timer;
+  uint32_t ue_reestablishment_reject_timer;
+  uint32_t ue_reestablishment_reject_timer_thres;
+  int32_t ul_scheduled;
+  int32_t ra_pdcch_order_sent;
+  int32_t ul_out_of_sync;
+  int32_t phr_received;
+  uint8_t periodic_ri_received[NFAPI_CC_MAX];
+  uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
+  uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
+  uint8_t pucch1_snr[NFAPI_CC_MAX];
+  uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
+  uint8_t pucch2_snr[NFAPI_CC_MAX];
+  uint8_t pucch3_cqi_update[NFAPI_CC_MAX];
+  uint8_t pucch3_snr[NFAPI_CC_MAX];
+  uint8_t pusch_snr[NFAPI_CC_MAX];
+  uint16_t feedback_cnt[NFAPI_CC_MAX];
+  uint16_t timing_advance;
+  uint16_t timing_advance_r9;
+  uint8_t tpc_accumulated[NFAPI_CC_MAX];
+  uint8_t periodic_wideband_cqi[NFAPI_CC_MAX];
+  uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX];
+  uint8_t periodic_wideband_pmi[NFAPI_CC_MAX];
+  uint8_t periodic_subband_cqi[NFAPI_CC_MAX][16];
+  uint8_t periodic_subband_spatial_diffcqi[NFAPI_CC_MAX][16];
+  uint8_t aperiodic_subband_cqi0[NFAPI_CC_MAX][25];
+  uint8_t aperiodic_subband_pmi[NFAPI_CC_MAX][25];
+  uint8_t aperiodic_subband_diffcqi0[NFAPI_CC_MAX][25];
+  uint8_t aperiodic_subband_cqi1[NFAPI_CC_MAX][25];
+  uint8_t aperiodic_subband_diffcqi1[NFAPI_CC_MAX][25];
+  uint8_t aperiodic_wideband_cqi0[NFAPI_CC_MAX];
+  uint8_t aperiodic_wideband_pmi[NFAPI_CC_MAX];
+  uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX];
+  uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX];
+  uint8_t dl_cqi[NFAPI_CC_MAX];
+  int32_t uplane_inactivity_timer;
+  uint8_t crnti_reconfigurationcomplete_flag;
+  uint8_t cqi_req_flag;
+
+  /* HARQ RRT Timers */
+  /// (UL) HARQ RTT timers, especially used for CDRX operations, one timer per cell per harq process (and per user)
+  uint8_t harq_rtt_timer[NFAPI_CC_MAX][8];
+  uint8_t ul_harq_rtt_timer[NFAPI_CC_MAX][8]; // Note: UL HARQ RTT timers are only for asynchronous HARQ processes
+  uint8_t ul_synchronous_harq_timer[NFAPI_CC_MAX][8];  // These timers are used for UL synchronous HARQ processes
+
+  /* C-DRX related timers */
+  /* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
+  /// is TRUE if the cqi mask feature is activated by RRC configuration
+  boolean_t cqi_mask_boolean;
+  /// is TRUE if the following drx parameters are configured for UE
+  boolean_t cdrx_configured;
+  /*
+   * if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
+   * the activation. This is needed, during the RRC configuration process, when the context is
+   * configured on the eNB side, but not yet on the UE side...
+   */
+  boolean_t cdrx_waiting_ack;
+  /*
+   * Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes).
+   * When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
+   * a SR just after a periodic DCI0 ULSCH scheduling. Without CDRX there is no problem, but with CDRX this case would
+   * create a lost in timers synchronization.
+   */
+  uint8_t dci0_ongoing_timer;
+  /// is TRUE if the UE is in "Active Time", hence listening to PDCCH
+  boolean_t in_active_time;
+  /// OnDurationTimer
+  uint16_t  on_duration_timer;
+  uint16_t  on_duration_timer_thres;
+  /// drx-InactivityTimer
+  uint16_t  drx_inactivity_timer;
+  uint16_t  drx_inactivity_timer_thres;
+  /// is TRUE if UE is currently in short DRX cycle
+  boolean_t in_short_drx_cycle;
+  /// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
+  uint8_t  drx_shortCycle_timer_value;
+  /// shortDRX-Cycle (duration of one short DRX cycle)
+  uint16_t   short_drx_cycle_duration;
+  /// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
+  uint16_t  drx_shortCycle_timer;
+  uint16_t  drx_shortCycle_timer_thres;
+  /// is TRUE if UE is currently in long DRX cycle
+  boolean_t in_long_drx_cycle;
+  /// longDRX-CycleStartOffset (long DRX cycle timer)
+  uint16_t  drx_longCycle_timer;
+  uint16_t  drx_longCycle_timer_thres;
+  /// longDRX-CycleStartOffset (offset value)
+  uint16_t  drx_start_offset;
+  /// DRX retransmission timer, one per DL HARQ process
+  uint8_t   drx_retransmission_timer[8];
+  uint8_t   drx_retransmission_timer_thres[8];
+  /// DRX UL retransmission timer, one per UL HARQ process
+  /* Not implemented yet */
+  /* End of C-DRX related timers */
 } UE_sched_ctrl_t;
 
 /*! \brief eNB template for the Random access information */
@@ -1124,7 +1105,6 @@ typedef struct {
   int msg4_TBsize;
   /// MCS used for Msg4
   int msg4_mcs;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t rach_resource_type;
   uint8_t msg2_mpdcch_repetition_cnt;
   int     msg2_mpdcch_done;
@@ -1133,7 +1113,7 @@ typedef struct {
   uint8_t msg2_narrowband;
   uint8_t msg34_narrowband;
   int     msg4_rrc_sdu_length;
-#endif
+
   int32_t  crnti_rrc_mui;
   int8_t   crnti_harq_pid;
 } RA_t;
@@ -1141,11 +1121,11 @@ typedef struct {
 
 /*! \brief subband bitmap confguration (for ALU icic algo purpose), in test phase */
 typedef struct {
-    uint8_t sbmap[13];	//13 = number of SB MAX for 100 PRB
-    uint8_t periodicity;
-    uint8_t first_subframe;
-    uint8_t sb_size;
-    uint8_t nb_active_sb;
+  uint8_t sbmap[13];  //13 = number of SB MAX for 100 PRB
+  uint8_t periodicity;
+  uint8_t first_subframe;
+  uint8_t sb_size;
+  uint8_t nb_active_sb;
 } SBMAP_CONF;
 /*! \brief UE list used by eNB to order UEs/CC for scheduling*/
 typedef struct {
@@ -1187,31 +1167,31 @@ typedef struct {
 
 /*! \brief deleting control information*/
 typedef struct {
-    ///rnti of UE
-    rnti_t rnti;
-    ///remove UE context flag
-    boolean_t removeContextFlg;
+  ///rnti of UE
+  rnti_t rnti;
+  ///remove UE context flag
+  boolean_t removeContextFlg;
 } UE_free_ctrl_t;
 /*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
 typedef struct {
-    /// deleting control info
-    UE_free_ctrl_t UE_free_ctrl[NUMBER_OF_UE_MAX+1];
-    int num_UEs;
-    int head_freelist; ///the head position of the delete list
-    int tail_freelist; ///the tail position of the delete list
+  /// deleting control info
+  UE_free_ctrl_t UE_free_ctrl[NUMBER_OF_UE_MAX+1];
+  int num_UEs;
+  int head_freelist; ///the head position of the delete list
+  int tail_freelist; ///the tail position of the delete list
 } UE_free_list_t;
 
 /// Structure for saving the output of each pre_processor instance
 typedef struct {
-    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
-    uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
-    uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
-    uint8_t  slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
-    uint8_t  MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX];
+  uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
+  uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
+  uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
+  uint8_t  slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
+  uint8_t  MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX];
 
-    uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID];
-    uint32_t wb_pmi[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
-    uint8_t  mcs[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
+  uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID];
+  uint32_t wb_pmi[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
+  uint8_t  mcs[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
 
 } pre_processor_results_t;
 
@@ -1225,34 +1205,34 @@ typedef void (*slice_scheduler_dl)(module_id_t mod_id,
                                    int        *mbsfn_flag);
 
 typedef struct {
-    slice_id_t id;
+  slice_id_t id;
 
-    /// RB share for each slice
-    float     pct;
+  /// RB share for each slice
+  float     pct;
 
-    /// whether this slice is isolated from the others
-    int       isol;
+  /// whether this slice is isolated from the others
+  int       isol;
 
-    int       prio;
+  int       prio;
 
-    /// Frequency ranges for slice positioning
-    int       pos_low;
-    int       pos_high;
+  /// Frequency ranges for slice positioning
+  int       pos_low;
+  int       pos_high;
 
-    // max mcs for each slice
-    int       maxmcs;
+  // max mcs for each slice
+  int       maxmcs;
 
-    /// criteria for sorting policies of the slices
-    uint32_t  sorting;
+  /// criteria for sorting policies of the slices
+  uint32_t  sorting;
 
-    /// Accounting policy (just greedy(1) or fair(0) setting for now)
-    int       accounting;
+  /// Accounting policy (just greedy(1) or fair(0) setting for now)
+  int       accounting;
 
-    /// name of available scheduler
-    char     *sched_name;
+  /// name of available scheduler
+  char     *sched_name;
 
-    /// pointer to the slice specific scheduler in DL
-    slice_scheduler_dl sched_cb;
+  /// pointer to the slice specific scheduler in DL
+  slice_scheduler_dl sched_cb;
 
 } slice_sched_conf_dl_t;
 
@@ -1264,137 +1244,126 @@ typedef void (*slice_scheduler_ul)(module_id_t   mod_id,
                                    uint16_t     *first_rb);
 
 typedef struct {
-    slice_id_t id;
+  slice_id_t id;
 
-    /// RB share for each slice
-    float     pct;
+  /// RB share for each slice
+  float     pct;
 
-    // MAX MCS for each slice
-    int       maxmcs;
+  // MAX MCS for each slice
+  int       maxmcs;
 
-    /// criteria for sorting policies of the slices
-    uint32_t  sorting;
+  /// criteria for sorting policies of the slices
+  uint32_t  sorting;
 
-    /// starting RB (RB offset) of UL scheduling
-    int       first_rb;
+  /// starting RB (RB offset) of UL scheduling
+  int       first_rb;
 
-    /// name of available scheduler
-    char     *sched_name;
+  /// name of available scheduler
+  char     *sched_name;
 
-    /// pointer to the slice specific scheduler in UL
-    slice_scheduler_ul sched_cb;
+  /// pointer to the slice specific scheduler in UL
+  slice_scheduler_ul sched_cb;
 
 } slice_sched_conf_ul_t;
 
 
 typedef struct {
-    /// counter used to indicate when all slices have pre-allocated UEs
-    //int      slice_counter;
+  /// counter used to indicate when all slices have pre-allocated UEs
+  //int      slice_counter;
 
-    /// indicates whether remaining RBs after first intra-slice allocation will
-    /// be allocated to UEs of the same slice
-    int       intraslice_share_active;
-    /// indicates whether remaining RBs after slice allocation will be
-    /// allocated to UEs of another slice. Isolated slices will be ignored
-    int       interslice_share_active;
+  /// indicates whether remaining RBs after first intra-slice allocation will
+  /// be allocated to UEs of the same slice
+  int       intraslice_share_active;
+  /// indicates whether remaining RBs after slice allocation will be
+  /// allocated to UEs of another slice. Isolated slices will be ignored
+  int       interslice_share_active;
 
-    /// number of active DL slices
-    int      n_dl;
-    slice_sched_conf_dl_t dl[MAX_NUM_SLICES];
+  /// number of active DL slices
+  int      n_dl;
+  slice_sched_conf_dl_t dl[MAX_NUM_SLICES];
 
-    /// number of active UL slices
-    int      n_ul;
-    slice_sched_conf_ul_t ul[MAX_NUM_SLICES];
+  /// number of active UL slices
+  int      n_ul;
+  slice_sched_conf_ul_t ul[MAX_NUM_SLICES];
 
-    pre_processor_results_t pre_processor_results[MAX_NUM_SLICES];
+  pre_processor_results_t pre_processor_results[MAX_NUM_SLICES];
 
-    /// common rb allocation list between slices
-    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX];
+  /// common rb allocation list between slices
+  uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX];
 } slice_info_t;
 
 /*! \brief eNB common channels */
 typedef struct {
-    int physCellId;
-    int p_eNB;
-    int Ncp;
-    int eutra_band;
-    uint32_t dl_CarrierFreq;
-    LTE_BCCH_BCH_Message_t *mib;
-    LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
-    LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
-#endif
-    LTE_TDD_Config_t *tdd_Config;
-    LTE_SchedulingInfoList_t *schedulingInfoList;
-    LTE_ARFCN_ValueEUTRA_t ul_CarrierFreq;
-    long ul_Bandwidth;
-    /// Outgoing MIB PDU for PHY
-    MIB_PDU MIB_pdu;
-    /// Outgoing BCCH pdu for PHY
-    BCCH_PDU BCCH_pdu;
-    /// Outgoing BCCH DCI allocation
-    uint32_t BCCH_alloc_pdu;
-    /// Outgoing CCCH pdu for PHY
-    CCCH_PDU CCCH_pdu;
-    /// Outgoing PCCH DCI allocation
-    uint32_t PCCH_alloc_pdu;
-    /// Outgoing PCCH pdu for PHY
-    PCCH_PDU PCCH_pdu;
-    /// Outgoing RAR pdu for PHY
-    RAR_PDU RAR_pdu;
-    /// Template for RA computations
-    RA_t ra[NB_RA_PROC_MAX];
-    /// VRB map for common channels
-    uint8_t vrb_map[100];
-    /// VRB map for common channels and retransmissions by PHICH
-    uint8_t vrb_map_UL[100];
-    /// MBSFN SubframeConfig
-    struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
-#endif
-    /// number of subframe allocation pattern available for MBSFN sync area
-    uint8_t num_sf_allocation_pattern;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    /// MBMS Flag
-    uint8_t MBMS_flag;
-    /// Outgoing MCCH pdu for PHY
-    MCCH_PDU MCCH_pdu;
-    /// MCCH active flag
-    uint8_t msi_active;
-    /// MCCH active flag
-    uint8_t mcch_active;
-    /// MTCH active flag
-    uint8_t mtch_active;
-    /// number of active MBSFN area
-    uint8_t num_active_mbsfn_area;
-    /// MBSFN Area Info
-    struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
-    /// PMCH Config
-    struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
-    /// MBMS session info list
-    struct LTE_MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
-    /// Outgoing MCH pdu for PHY
-    MCH_PDU MCH_pdu;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-    /// Rel13 parameters from SIB1
-    LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
-    /// Counter for SIB1-BR scheduling
-    int SIB1_BR_cnt;
-    /// Outgoing BCCH-BR pdu for PHY
-    BCCH_PDU BCCH_BR_pdu[20];
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    BCCH_PDU BCCH_MBMS_pdu;
-    uint8_t FeMBMS_flag;
-#endif
-
+  int physCellId;
+  int p_eNB;
+  int Ncp;
+  int eutra_band;
+  uint32_t dl_CarrierFreq;
+  LTE_BCCH_BCH_Message_t *mib;
+  LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
+  LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
+  LTE_SchedulingInfoList_MBMS_r14_t *schedulingInfoList_MBMS;
+  LTE_TDD_Config_t *tdd_Config;
+  LTE_SchedulingInfoList_t *schedulingInfoList;
+  LTE_ARFCN_ValueEUTRA_t ul_CarrierFreq;
+  long ul_Bandwidth;
+  /// Outgoing MIB PDU for PHY
+  MIB_PDU MIB_pdu;
+  /// Outgoing BCCH pdu for PHY
+  BCCH_PDU BCCH_pdu;
+  /// Outgoing BCCH DCI allocation
+  uint32_t BCCH_alloc_pdu;
+  /// Outgoing CCCH pdu for PHY
+  CCCH_PDU CCCH_pdu;
+  /// Outgoing PCCH DCI allocation
+  uint32_t PCCH_alloc_pdu;
+  /// Outgoing PCCH pdu for PHY
+  PCCH_PDU PCCH_pdu;
+  /// Outgoing RAR pdu for PHY
+  RAR_PDU RAR_pdu;
+  /// Template for RA computations
+  RA_t ra[NB_RA_PROC_MAX];
+  /// VRB map for common channels
+  uint8_t vrb_map[100];
+  /// VRB map for common channels and retransmissions by PHICH
+  uint8_t vrb_map_UL[100];
+  /// MBSFN SubframeConfig
+  struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
+  struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
+  /// number of subframe allocation pattern available for MBSFN sync area
+  uint8_t num_sf_allocation_pattern;
+  /// MBMS Flag
+  uint8_t MBMS_flag;
+  /// Outgoing MCCH pdu for PHY
+  MCCH_PDU MCCH_pdu;
+  /// MCCH active flag
+  uint8_t msi_active;
+  /// MCCH active flag
+  uint8_t mcch_active;
+  /// MTCH active flag
+  uint8_t mtch_active;
+  /// number of active MBSFN area
+  uint8_t num_active_mbsfn_area;
+  /// MBSFN Area Info
+  struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
+  /// PMCH Config
+  struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
+  /// MBMS session info list
+  struct LTE_MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
+  /// Outgoing MCH pdu for PHY
+  MCH_PDU MCH_pdu;
+  /// Rel13 parameters from SIB1
+  LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
+  /// Counter for SIB1-BR scheduling
+  int SIB1_BR_cnt;
+  /// Outgoing BCCH-BR pdu for PHY
+  BCCH_PDU BCCH_BR_pdu[20];
+  BCCH_PDU BCCH_MBMS_pdu;
+  uint8_t FeMBMS_flag;
 } COMMON_channels_t;
 /*! \brief top level eNB MAC structure */
 typedef struct eNB_MAC_INST_s {
-    /// Ethernet parameters for northbound midhaul interface
+  /// Ethernet parameters for northbound midhaul interface
   eth_params_t eth_params_n;
   /// Ethernet parameters for fronthaul interface
   eth_params_t eth_params_s;
@@ -1410,7 +1379,7 @@ typedef struct eNB_MAC_INST_s {
   COMMON_channels_t common_channels[NFAPI_CC_MAX];
   /// current PDU index (BCH,MCH,DLSCH)
   int16_t pdu_index[NFAPI_CC_MAX];
-  
+
   /// NFAPI Config Request Structure
   nfapi_config_request_t config[NFAPI_CC_MAX];
   /// Preallocated DL pdu list
@@ -1460,9 +1429,7 @@ typedef struct eNB_MAC_INST_s {
   time_stats_t eNB_scheduler;
   /// processing time of eNB scheduler for SI
   time_stats_t schedule_si;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   time_stats_t schedule_si_mbms;
-#endif
   /// processing time of eNB scheduler for Random access
   time_stats_t schedule_ra;
   /// processing time of eNB ULSCH scheduler
@@ -1472,11 +1439,11 @@ typedef struct eNB_MAC_INST_s {
   /// processing time of eNB MAC preprocessor
   time_stats_t schedule_dlsch_preprocessor;
   /// processing time of eNB DLSCH scheduler
-  time_stats_t schedule_dlsch;	// include rlc_data_req + MAC header + preprocessor
+  time_stats_t schedule_dlsch;  // include rlc_data_req + MAC header + preprocessor
   /// processing time of eNB MCH scheduler
   time_stats_t schedule_mch;
   /// processing time of eNB ULSCH reception
-  time_stats_t rx_ulsch_sdu;	// include rlc_data_ind
+  time_stats_t rx_ulsch_sdu;  // include rlc_data_ind
   /// processing time of eNB PCH scheduler
   time_stats_t schedule_pch;
 
@@ -1493,126 +1460,125 @@ typedef struct eNB_MAC_INST_s {
  */
 
 typedef enum {
-    TYPE0,
-    TYPE1,
-    TYPE1A,
-    TYPE2,
-    TYPE2A,
-    TYPEUESPEC
+  TYPE0,
+  TYPE1,
+  TYPE1A,
+  TYPE2,
+  TYPE2A,
+  TYPEUESPEC
 } MPDCCH_TYPES_t;
 
 /*!\brief UE layer 2 status */
 typedef enum {
-    CONNECTION_OK = 0,
-    CONNECTION_LOST,
-    PHY_RESYNCH,
-    PHY_HO_PRACH
+  CONNECTION_OK = 0,
+  CONNECTION_LOST,
+  PHY_RESYNCH,
+  PHY_HO_PRACH
 } UE_L2_STATE_t;
 
 /*!\brief UE scheduling info */
 typedef struct {
-    /// buffer status for each lcgid
-    uint8_t BSR[MAX_NUM_LCGID];	// should be more for mesh topology
-    /// keep the number of bytes in rlc buffer for each lcgid
-    int32_t BSR_bytes[MAX_NUM_LCGID];
-    /// after multiplexing buffer remain for each lcid
-    int32_t LCID_buffer_remain[MAX_NUM_LCID];
-    /// sum of all lcid buffer size
-    uint16_t All_lcid_buffer_size_lastTTI;
-    /// buffer status for each lcid
-    uint8_t LCID_status[MAX_NUM_LCID];
-    /// SR pending as defined in 36.321
-    uint8_t SR_pending;
-    /// SR_COUNTER as defined in 36.321
-    uint16_t SR_COUNTER;
-    /// logical channel group ide for each LCID
-    uint8_t LCGID[MAX_NUM_LCID];
-    /// retxBSR-Timer, default value is sf2560
-    uint16_t retxBSR_Timer;
-    /// retxBSR_SF, number of subframe before triggering a regular BSR
-    uint16_t retxBSR_SF;
-    /// periodicBSR-Timer, default to infinity
-    uint16_t periodicBSR_Timer;
-    /// periodicBSR_SF, number of subframe before triggering a periodic BSR
-    uint16_t periodicBSR_SF;
-    /// default value is 0: not configured
-    uint16_t sr_ProhibitTimer;
-    /// sr ProhibitTime running
-    uint8_t sr_ProhibitTimer_Running;
-    ///  default value to n5
-    uint16_t maxHARQ_Tx;
-    /// default value is false
-    uint16_t ttiBundling;
-    /// default value is release
-    struct LTE_DRX_Config *drx_config;
-    /// default value is release
-    struct LTE_MAC_MainConfig__phr_Config *phr_config;
-    ///timer before triggering a periodic PHR
-    uint16_t periodicPHR_Timer;
-    ///timer before triggering a prohibit PHR
-    uint16_t prohibitPHR_Timer;
-    ///DL Pathloss change value
-    uint16_t PathlossChange;
-    ///number of subframe before triggering a periodic PHR
-    int16_t periodicPHR_SF;
-    ///number of subframe before triggering a prohibit PHR
-    int16_t prohibitPHR_SF;
-    ///DL Pathloss Change in db
-    uint16_t PathlossChange_db;
-
-    /// default value is false
-    uint16_t extendedBSR_Sizes_r10;
-    /// default value is false
-    uint16_t extendedPHR_r10;
-
-    //Bj bucket usage per  lcid
-    int16_t Bj[MAX_NUM_LCID];
-    // Bucket size per lcid
-    int16_t bucket_size[MAX_NUM_LCID];
+  /// buffer status for each lcgid
+  uint8_t BSR[MAX_NUM_LCGID]; // should be more for mesh topology
+  /// keep the number of bytes in rlc buffer for each lcgid
+  int32_t BSR_bytes[MAX_NUM_LCGID];
+  /// after multiplexing buffer remain for each lcid
+  int32_t LCID_buffer_remain[MAX_NUM_LCID];
+  /// sum of all lcid buffer size
+  uint16_t All_lcid_buffer_size_lastTTI;
+  /// buffer status for each lcid
+  uint8_t LCID_status[MAX_NUM_LCID];
+  /// SR pending as defined in 36.321
+  uint8_t SR_pending;
+  /// SR_COUNTER as defined in 36.321
+  uint16_t SR_COUNTER;
+  /// logical channel group ide for each LCID
+  uint8_t LCGID[MAX_NUM_LCID];
+  /// retxBSR-Timer, default value is sf2560
+  uint16_t retxBSR_Timer;
+  /// retxBSR_SF, number of subframe before triggering a regular BSR
+  uint16_t retxBSR_SF;
+  /// periodicBSR-Timer, default to infinity
+  uint16_t periodicBSR_Timer;
+  /// periodicBSR_SF, number of subframe before triggering a periodic BSR
+  uint16_t periodicBSR_SF;
+  /// default value is 0: not configured
+  uint16_t sr_ProhibitTimer;
+  /// sr ProhibitTime running
+  uint8_t sr_ProhibitTimer_Running;
+  ///  default value to n5
+  uint16_t maxHARQ_Tx;
+  /// default value is false
+  uint16_t ttiBundling;
+  /// default value is release
+  struct LTE_DRX_Config *drx_config;
+  /// default value is release
+  struct LTE_MAC_MainConfig__phr_Config *phr_config;
+  ///timer before triggering a periodic PHR
+  uint16_t periodicPHR_Timer;
+  ///timer before triggering a prohibit PHR
+  uint16_t prohibitPHR_Timer;
+  ///DL Pathloss change value
+  uint16_t PathlossChange;
+  ///number of subframe before triggering a periodic PHR
+  int16_t periodicPHR_SF;
+  ///number of subframe before triggering a prohibit PHR
+  int16_t prohibitPHR_SF;
+  ///DL Pathloss Change in db
+  uint16_t PathlossChange_db;
+
+  /// default value is false
+  uint16_t extendedBSR_Sizes_r10;
+  /// default value is false
+  uint16_t extendedPHR_r10;
+
+  //Bj bucket usage per  lcid
+  int16_t Bj[MAX_NUM_LCID];
+  // Bucket size per lcid
+  int16_t bucket_size[MAX_NUM_LCID];
 } UE_SCHEDULING_INFO;
 /*!\brief Top level UE MAC structure */
 
 typedef struct {
-    uint16_t Node_id;
-    /// RX frame counter
-    frame_t rxFrame;
-    /// RX subframe counter
-    sub_frame_t rxSubframe;
-    /// TX frame counter
-    frame_t txFrame;
-    /// TX subframe counter
-    sub_frame_t txSubframe;
-    /// C-RNTI of UE
-    uint16_t crnti;
-    /// C-RNTI of UE before HO
-    rnti_t crnti_before_ho;	///user id (rnti) of connected UEs
-    /// uplink active flag
-    uint8_t ul_active;
-    /// pointer to RRC PHY configuration
-    LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
-    /// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
-    struct LTE_RACH_ConfigDedicated *rach_ConfigDedicated;
-    /// pointer to RRC PHY configuration
-    struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+  uint16_t Node_id;
+  /// RX frame counter
+  frame_t rxFrame;
+  /// RX subframe counter
+  sub_frame_t rxSubframe;
+  /// TX frame counter
+  frame_t txFrame;
+  /// TX subframe counter
+  sub_frame_t txSubframe;
+  /// C-RNTI of UE
+  uint16_t crnti;
+  /// C-RNTI of UE before HO
+  rnti_t crnti_before_ho; ///user id (rnti) of connected UEs
+  /// uplink active flag
+  uint8_t ul_active;
+  /// pointer to RRC PHY configuration
+  LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
+  /// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
+  struct LTE_RACH_ConfigDedicated *rach_ConfigDedicated;
+  /// pointer to RRC PHY configuration
+  struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
   /// pointer to RRC PHY configuration SCEll
   struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
   /// Preconfiguration for Sidelink
   struct LTE_SL_Preconfiguration_r12 *SL_Preconfiguration;
   /// RX Pool for Sidelink from SIB18
-  LTE_SL_CommRxPoolList_r12_t	 commRxPool_r12;
+  LTE_SL_CommRxPoolList_r12_t  commRxPool_r12;
   /// TX Pool Normal for Sidelink from SIB18
-  struct LTE_SL_CommTxPoolList_r12	*commTxPoolNormalCommon_r12;
+  struct LTE_SL_CommTxPoolList_r12  *commTxPoolNormalCommon_r12;
   /// TX Pool Exceptional for Sidelink from SIB18
-  struct LTE_SL_CommTxPoolList_r12	*commTxPoolExceptional_r12;
+  struct LTE_SL_CommTxPoolList_r12  *commTxPoolExceptional_r12;
   /// Common Sync Config for Sidelink from SIB18
-  struct LTE_SL_SyncConfigList_r12	*commSyncConfig_r12;
+  struct LTE_SL_SyncConfigList_r12  *commSyncConfig_r12;
   /// Dedicated Sync TX control for Sidelink
   struct LTE_SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
   /// Dedicated Discovery TX control for Sidelink
-  struct LTE_SL_DiscConfig_r12	*sl_DiscConfig_r12;
+  struct LTE_SL_DiscConfig_r12  *sl_DiscConfig_r12;
   /// Dedicated TX config for Sidelink
-  struct LTE_SL_CommConfig_r12	*sl_CommConfig_r12;
+  struct LTE_SL_CommConfig_r12  *sl_CommConfig_r12;
   //SL sourceL2ID
   uint32_t sourceL2Id;
   //SL groupL2Id
@@ -1623,117 +1589,107 @@ typedef struct {
   uint32_t destinationList[MAX_NUM_DEST];
   uint8_t numCommFlows;
   uint32_t  SL_LCID[MAX_NUM_LCID];
-
-#endif
-    /// pointer to TDD Configuration (NULL for FDD)
-    LTE_TDD_Config_t *tdd_Config;
-    /// Number of adjacent cells to measure
-    uint8_t n_adj_cells;
-    /// Array of adjacent physical cell ids
-    uint32_t adj_cell_id[6];
-    /// Pointer to RRC MAC configuration
-    LTE_MAC_MainConfig_t *macConfig;
-    /// Pointer to RRC Measurement gap configuration
-    LTE_MeasGapConfig_t *measGapConfig;
-    /// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
-    LTE_LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
-    /// Scheduling Information
-    UE_SCHEDULING_INFO scheduling_info;
-    /// Outgoing CCCH pdu for PHY
-    CCCH_PDU CCCH_pdu;
-    /// Outgoing RAR pdu for PHY
-    RAR_PDU RAR_pdu;
-    /// Incoming DLSCH pdu for PHY
-    DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    int sltx_active;
-    SLSCH_t slsch;
-    SLDCH_t sldch;
-    ULSCH_PDU slsch_pdu;
-    int slsch_lcid;
-#endif
-    /// number of attempt for rach
-    uint8_t RA_attempt_number;
-    /// Random-access procedure flag
-    uint8_t RA_active;
-    /// Random-access window counter
-    int8_t RA_window_cnt;
-    /// Random-access Msg3 size in bytes
-    uint8_t RA_Msg3_size;
-    /// Random-access prachMaskIndex
-    uint8_t RA_prachMaskIndex;
-    /// Flag indicating Preamble set (A,B) used for first Msg3 transmission
-    uint8_t RA_usedGroupA;
-    /// Random-access Resources
-    PRACH_RESOURCES_t RA_prach_resources;
-    /// Random-access PREAMBLE_TRANSMISSION_COUNTER
-    uint8_t RA_PREAMBLE_TRANSMISSION_COUNTER;
-    /// Random-access backoff counter
-    int16_t RA_backoff_cnt;
-    /// Random-access variable for window calculation (frame of last change in window counter)
-    uint32_t RA_tx_frame;
-    /// Random-access variable for window calculation (subframe of last change in window counter)
-    uint8_t RA_tx_subframe;
-    /// Random-access Group B maximum path-loss
-    /// Random-access variable for backoff (frame of last change in backoff counter)
-    uint32_t RA_backoff_frame;
-    /// Random-access variable for backoff (subframe of last change in backoff counter)
-    uint8_t RA_backoff_subframe;
-    /// Random-access Group B maximum path-loss
-    uint16_t RA_maxPL;
-    /// Random-access Contention Resolution Timer active flag
-    uint8_t RA_contention_resolution_timer_active;
-    /// Random-access Contention Resolution Timer count value
-    uint8_t RA_contention_resolution_cnt;
-    /// power headroom reporitng reconfigured
-    uint8_t PHR_reconfigured;
-    /// power headroom state as configured by the higher layers
-    uint8_t PHR_state;
-    /// power backoff due to power management (as allowed by P-MPRc) for this cell
-    uint8_t PHR_reporting_active;
-    /// power backoff due to power management (as allowed by P-MPRc) for this cell
-    uint8_t power_backoff_db[MAX_eNB];
-    /// BSR report falg management
-    uint8_t BSR_reporting_active;
-    /// retxBSR-Timer expires flag
-    uint8_t retxBSRTimer_expires_flag;
-    /// periodBSR-Timer expires flag
-    uint8_t periodBSRTimer_expires_flag;
-
-    /// MBSFN_Subframe Configuration
-    struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];	// FIXME replace 8 by MAX_MBSFN_AREA?
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
-#endif
-    /// number of subframe allocation pattern available for MBSFN sync area
-    uint8_t num_sf_allocation_pattern;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-    /// number of active MBSFN area
-    uint8_t num_active_mbsfn_area;
-    /// MBSFN Area Info
-    struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
-    /// PMCH Config
-    struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
-    /// MCCH status
-    uint8_t mcch_status;
-    /// MSI status
-    uint8_t msi_status_v[28];
-    uint8_t msi_current_alloc;
-    uint8_t msi_pmch;
-
-    struct LTE_MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
-    uint8_t commonSF_AllocPeriod_r9;
-    int common_num_sf_alloc;
-
-    uint8_t pmch_lcids[28];
-    uint16_t pmch_stop_mtch[28];
-#endif
-  //#ifdef CBA
+  /// pointer to TDD Configuration (NULL for FDD)
+  LTE_TDD_Config_t *tdd_Config;
+  /// Number of adjacent cells to measure
+  uint8_t n_adj_cells;
+  /// Array of adjacent physical cell ids
+  uint32_t adj_cell_id[6];
+  /// Pointer to RRC MAC configuration
+  LTE_MAC_MainConfig_t *macConfig;
+  /// Pointer to RRC Measurement gap configuration
+  LTE_MeasGapConfig_t *measGapConfig;
+  /// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
+  LTE_LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
+  /// Scheduling Information
+  UE_SCHEDULING_INFO scheduling_info;
+  /// Outgoing CCCH pdu for PHY
+  CCCH_PDU CCCH_pdu;
+  /// Outgoing RAR pdu for PHY
+  RAR_PDU RAR_pdu;
+  /// Incoming DLSCH pdu for PHY
+  DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
+  int sltx_active;
+  SLSCH_t slsch;
+  SLDCH_t sldch;
+  ULSCH_PDU slsch_pdu;
+  int slsch_lcid;
+  /// number of attempt for rach
+  uint8_t RA_attempt_number;
+  /// Random-access procedure flag
+  uint8_t RA_active;
+  /// Random-access window counter
+  int8_t RA_window_cnt;
+  /// Random-access Msg3 size in bytes
+  uint8_t RA_Msg3_size;
+  /// Random-access prachMaskIndex
+  uint8_t RA_prachMaskIndex;
+  /// Flag indicating Preamble set (A,B) used for first Msg3 transmission
+  uint8_t RA_usedGroupA;
+  /// Random-access Resources
+  PRACH_RESOURCES_t RA_prach_resources;
+  /// Random-access PREAMBLE_TRANSMISSION_COUNTER
+  uint8_t RA_PREAMBLE_TRANSMISSION_COUNTER;
+  /// Random-access backoff counter
+  int16_t RA_backoff_cnt;
+  /// Random-access variable for window calculation (frame of last change in window counter)
+  uint32_t RA_tx_frame;
+  /// Random-access variable for window calculation (subframe of last change in window counter)
+  uint8_t RA_tx_subframe;
+  /// Random-access Group B maximum path-loss
+  /// Random-access variable for backoff (frame of last change in backoff counter)
+  uint32_t RA_backoff_frame;
+  /// Random-access variable for backoff (subframe of last change in backoff counter)
+  uint8_t RA_backoff_subframe;
+  /// Random-access Group B maximum path-loss
+  uint16_t RA_maxPL;
+  /// Random-access Contention Resolution Timer active flag
+  uint8_t RA_contention_resolution_timer_active;
+  /// Random-access Contention Resolution Timer count value
+  uint8_t RA_contention_resolution_cnt;
+  /// power headroom reporitng reconfigured
+  uint8_t PHR_reconfigured;
+  /// power headroom state as configured by the higher layers
+  uint8_t PHR_state;
+  /// power backoff due to power management (as allowed by P-MPRc) for this cell
+  uint8_t PHR_reporting_active;
+  /// power backoff due to power management (as allowed by P-MPRc) for this cell
+  uint8_t power_backoff_db[MAX_eNB];
+  /// BSR report falg management
+  uint8_t BSR_reporting_active;
+  /// retxBSR-Timer expires flag
+  uint8_t retxBSRTimer_expires_flag;
+  /// periodBSR-Timer expires flag
+  uint8_t periodBSRTimer_expires_flag;
+
+  /// MBSFN_Subframe Configuration
+  struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
+  struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
+  /// number of subframe allocation pattern available for MBSFN sync area
+  uint8_t num_sf_allocation_pattern;
+  /// number of active MBSFN area
+  uint8_t num_active_mbsfn_area;
+  /// MBSFN Area Info
+  struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
+  /// PMCH Config
+  struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
+  /// MCCH status
+  uint8_t mcch_status;
+  /// MSI status
+  uint8_t msi_status_v[28];
+  uint8_t msi_current_alloc;
+  uint8_t msi_pmch;
+
+  struct LTE_MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
+  uint8_t commonSF_AllocPeriod_r9;
+  int common_num_sf_alloc;
+
+  uint8_t pmch_lcids[28];
+  uint16_t pmch_stop_mtch[28];
   /// CBA RNTI for each group
   uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
   /// last SFN for CBA channel access
   uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
-  //#endif
   /// total UE scheduler processing time
   time_stats_t ue_scheduler; // total
   /// UE ULSCH tx  processing time inlcuding RLC interface (rlc_data_req) and mac header generation
@@ -1758,33 +1714,33 @@ typedef struct {
   /// after the reception of NFAPI_UL_CONFIG_ULSCH_PDU_TYPE.
   uint8_t first_ULSCH_Tx;
   uint8_t SI_Decoded;
-  int ra_frame; 	// This variable keeps the frame in which the RA started for the specific UE. It is used in order
-                    // to make sure that different UEs RA starts within a number of frames difference.
+  int ra_frame;   // This variable keeps the frame in which the RA started for the specific UE. It is used in order
+  // to make sure that different UEs RA starts within a number of frames difference.
 
   eth_params_t         eth_params_n;
 
 } UE_MAC_INST;
 /*! \brief ID of the neighboring cells used for HO*/
 typedef struct {
-    uint16_t cell_ids[6];
-    uint8_t n_adj_cells;
+  uint16_t cell_ids[6];
+  uint8_t n_adj_cells;
 } neigh_cell_id_t;
 
 typedef struct {
   volatile uint8_t flag;
   rnti_t rnti;
   mui_t  rrc_eNB_mui;
-}RRC_release_ctrl_t;
- 
+} RRC_release_ctrl_t;
+
 typedef struct {
-    uint16_t num_UEs;
-    RRC_release_ctrl_t RRC_release_ctrl[NUMBER_OF_UE_MAX];
+  uint16_t num_UEs;
+  RRC_release_ctrl_t RRC_release_ctrl[NUMBER_OF_UE_MAX];
 } RRC_release_list_t;
 
 typedef  struct {
   uint8_t                      rrc_mui_num;
   mui_t                        rrc_mui[128];
-}mac_rlc_am_muilist_t;
+} mac_rlc_am_muilist_t;
 
 #include "mac_proto.h"
 
diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h
index d5860949eb2537a98a05ae83a6af74f51733f8ce..cb93b76c91edfadbca9af9188a3793fde3cdaab9 100644
--- a/openair2/LAYER2/MAC/mac_proto.h
+++ b/openair2/LAYER2/MAC/mac_proto.h
@@ -46,7 +46,7 @@
 */
 
 void schedule_mib(module_id_t module_idP,
-		  frame_t frameP, sub_frame_t subframeP);
+                  frame_t frameP, sub_frame_t subframeP);
 
 /** \fn void schedule_RA(module_id_t module_idP,frame_t frameP,sub_frame_t subframe);
 \brief First stage of Random-Access Scheduling. Loops over the ras and checks if RAR, Msg3 or its retransmission are to be scheduled in the subframe.  It returns the total number of PRB used for RA SDUs.  For Msg3 it retrieves the L3msg from RRC and fills the appropriate buffers.  For the others it just computes the number of PRBs. Each DCI uses 3 PRBs (format 1A)
@@ -58,7 +58,7 @@ for the message.
 
 
 void schedule_RA(module_id_t module_idP, frame_t frameP,
-		 sub_frame_t subframe);
+                 sub_frame_t subframe);
 
 /** \brief First stage of SI Scheduling. Gets a SI SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length.  It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
 @param Mod_id Instance ID of eNB
@@ -66,17 +66,15 @@ void schedule_RA(module_id_t module_idP, frame_t frameP,
 @param subframe Subframe number on which to act
 */
 void schedule_SI(module_id_t module_idP, frame_t frameP,
-		 sub_frame_t subframeP);
+                 sub_frame_t subframeP);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 /** \brief First stage of SI Scheduling. Gets a SI SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length.  It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
 @param Mod_id Instance ID of eNB
 @param frame Frame index
 @param subframe Subframe number on which to act
 */
 void schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
-                sub_frame_t subframeP);
-#endif
+                      sub_frame_t subframeP);
 
 
 /** \brief MBMS scheduling: Checking the position for MBSFN subframes. Create MSI, transfer MCCH from RRC to MAC, transfer MTCHs from RLC to MAC. Multiplexing MSI,MCCH&MTCHs. Return 1 if there are MBSFN data being allocated, otherwise return 0;
@@ -85,7 +83,7 @@ void schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
 @param subframe Subframe number on which to act
 */
 int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
-		  sub_frame_t subframe);
+                  sub_frame_t subframe);
 
 /** \brief check the mapping between sf allocation and sync area, Currently only supports 1:1 mapping
 @param Mod_id Instance ID of eNB
@@ -93,7 +91,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
 @param[out] index of sf pattern
 */
 int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
-			      uint8_t mbsfn_sync_area);
+                              uint8_t mbsfn_sync_area);
 
 /** \brief check the mapping between sf allocation and sync area, Currently only supports 1:1 mapping
 @param Mod_id Instance ID of eNB
@@ -102,8 +100,8 @@ int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
 @param[out] index of sf pattern
 */
 int8_t ue_get_mbsfn_sf_alloction(module_id_t module_idP,
-				 uint8_t mbsfn_sync_area,
-				 unsigned char eNB_index);
+                                 uint8_t mbsfn_sync_area,
+                                 unsigned char eNB_index);
 
 /** \brief top ULSCH Scheduling for TDD (config 1-6).
 @param Mod_id Instance ID of eNB
@@ -111,7 +109,7 @@ int8_t ue_get_mbsfn_sf_alloction(module_id_t module_idP,
 @param subframe Subframe number on which to act
 */
 void schedule_ulsch(module_id_t module_idP, frame_t frameP,
-		    sub_frame_t subframe);
+                    sub_frame_t subframe);
 
 /** \brief ULSCH Scheduling per RNTI
 @param Mod_id Instance ID of eNB
@@ -121,15 +119,15 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP,
 @param sched_subframe Subframe number where PUSCH is transmitted (for DAI lookup)
 */
 void schedule_ulsch_rnti(module_id_t module_idP, int slice_idx, frame_t frameP,
-			 sub_frame_t subframe,
-			 unsigned char sched_subframe,
-			 uint16_t * first_rb);
+                         sub_frame_t subframe,
+                         unsigned char sched_subframe,
+                         uint16_t *first_rb);
 
 void schedule_ulsch_rnti_emtc(module_id_t   module_idP,
-			      frame_t       frameP,
-			      sub_frame_t   subframeP,
-			      unsigned char sched_subframeP,
-			      int          *emtc_active);
+                              frame_t       frameP,
+                              sub_frame_t   subframeP,
+                              unsigned char sched_subframeP,
+                              int          *emtc_active);
 
 /** \brief Second stage of DLSCH scheduling, after schedule_SI, schedule_RA and schedule_dlsch have been called.  This routine first allocates random frequency assignments for SI and RA SDUs using distributed VRB allocations and adds the corresponding DCI SDU to the DCI buffer for PHY.  It then loops over the UE specific DCIs previously allocated and fills in the remaining DCI fields related to frequency allocation.  It assumes localized allocation of type 0 (DCI.rah=0).  The allocation is done for tranmission modes 1,2,4.
 @param Mod_id Instance of eNB
@@ -147,13 +145,13 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,i
 @param mbsfn_flag  Indicates that MCH/MCCH is in this subframe
 */
 void schedule_dlsch(module_id_t module_idP, frame_t frameP,
-		      sub_frame_t subframe, int *mbsfn_flag);
+                    sub_frame_t subframe, int *mbsfn_flag);
 
 void schedule_ue_spec(module_id_t module_idP, int slice_idxP,
-		      frame_t frameP,sub_frame_t subframe, int *mbsfn_flag);
+                      frame_t frameP,sub_frame_t subframe, int *mbsfn_flag);
 void schedule_ue_spec_br(module_id_t   module_idP,
-			 frame_t       frameP,
-			 sub_frame_t   subframeP);
+                         frame_t       frameP,
+                         sub_frame_t   subframeP);
 void schedule_ue_spec_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,int *mbsfn_flag);
 void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP);
 
@@ -178,10 +176,10 @@ int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id);
 int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id);
 
 uint16_t mac_computeRIV(uint16_t N_RB_DL, uint16_t RBstart,
-			uint16_t Lcrbs);
+                        uint16_t Lcrbs);
 
-void add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
-	      sub_frame_t subframeP);
+void add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
+              sub_frame_t subframeP);
 
 //main.c
 
@@ -190,7 +188,7 @@ void init_UE_list(UE_list_t *UE_list);
 void init_slice_info(slice_info_t *sli);
 
 int mac_top_init(int eMBMS_active, char *uecap_xer,
-		 uint8_t cba_group_active, uint8_t HO_active);
+                 uint8_t cba_group_active, uint8_t HO_active);
 
 void mac_top_init_eNB(void);
 
@@ -207,10 +205,10 @@ int mac_init_global_param(void);
 void mac_top_cleanup(void);
 
 void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
-			    uint16_t eNB_index);
+                            uint16_t eNB_index);
 
-void clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP,
-			     frame_t frameP, sub_frame_t subframeP);
+void clear_nfapi_information(eNB_MAC_INST *eNB, int CC_idP,
+                             frame_t frameP, sub_frame_t subframeP);
 
 
 // eNB functions
@@ -231,74 +229,74 @@ void dlsch_scheduler_pre_processor(module_id_t module_idP,
                                    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]);
 
 void dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
-                                         int slice_idx,
-                                         frame_t frameP,
-                                         sub_frame_t subframeP,
-                                         int min_rb_unit[NFAPI_CC_MAX],
-                                         uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                         uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
-                                         uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX],
-                                         int *mbsfn_flag);
+    int slice_idx,
+    frame_t frameP,
+    sub_frame_t subframeP,
+    int min_rb_unit[NFAPI_CC_MAX],
+    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
+    uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX],
+    int *mbsfn_flag);
 
 void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id,
-                                                int slice_idx,
-                                                const uint8_t rbs_retx[NFAPI_CC_MAX]);
+    int slice_idx,
+    const uint8_t rbs_retx[NFAPI_CC_MAX]);
 
 void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
-                                              int slice_idx,
-                                              frame_t frameP,
-                                              sub_frame_t subframeP,
-                                              int min_rb_unit[NFAPI_CC_MAX],
-                                              uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                              uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]);
+    int slice_idx,
+    frame_t frameP,
+    sub_frame_t subframeP,
+    int min_rb_unit[NFAPI_CC_MAX],
+    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]);
 
 void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
-                                               int slice_idx,
-                                               int min_rb_unit[NFAPI_CC_MAX],
-                                               uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                               uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                               uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                               uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
-                                               uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
+    int slice_idx,
+    int min_rb_unit[NFAPI_CC_MAX],
+    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
+    uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
 
 void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
-                                                      int slice_idx,
-                                                      int min_rb_unit[NFAPI_CC_MAX],
-                                                      uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                                      uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                                      uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                                      uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
-                                                      uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
+    int slice_idx,
+    int min_rb_unit[NFAPI_CC_MAX],
+    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
+    uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
 
 void slice_priority_sort(module_id_t Mod_id, int slice_list[MAX_NUM_SLICES]);
 
 void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id,
-                                             int frameP,
-                                             sub_frame_t subframeP,
-                                             uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]);
+    int frameP,
+    sub_frame_t subframeP,
+    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]);
 
 void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id,
                                       int frameP,
                                       sub_frame_t subframeP);
 
 void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
-                                            int UE_id,
-                                            uint8_t CC_id,
-                                            int N_RBG,
-                                            int min_rb_unit,
-                                            uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                            uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
-                                            uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
-                                            uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX],
-                                            uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
+    int UE_id,
+    uint8_t CC_id,
+    int N_RBG,
+    int min_rb_unit,
+    uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
+    uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
+    uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX],
+    uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
 
 /* \brief Function to trigger the eNB scheduling procedure.  It is called by PHY at the beginning of each subframe, \f$n$\f
-   and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. 
+   and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
 @param Mod_id Instance ID of eNB
 @param subframe Index of current subframe
 @param calibration_flag Flag to indicate that eNB scheduler should schedule TDD auto-calibration PUSCH.
 */
-void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);	//, int calibration_flag);
+void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);  //, int calibration_flag);
 
 /* \brief Function to indicate a received preamble on PRACH.  It initiates the RA procedure.
 @param Mod_id Instance ID of eNB
@@ -308,12 +306,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
 @param rach_resource type (0=non BL/CE,1 CE level 0,2 CE level 1, 3 CE level 2,4 CE level 3)
 */
 void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
-		      sub_frame_t subframeP, uint16_t preamble_index,
-		      int16_t timing_offset, uint16_t rnti
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-		      , uint8_t rach_resource_type
-#endif
-    );
+                      sub_frame_t subframeP, uint16_t preamble_index,
+                      int16_t timing_offset, uint16_t rnti,
+                      uint8_t rach_resource_type
+                     );
 
 /* \brief Function in eNB to fill RAR pdu when requested by PHY.  This provides a single RAR SDU for the moment and returns the t-CRNTI.
 @param Mod_id Instance ID of eNB
@@ -322,29 +318,28 @@ void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
 @returns t_CRNTI
 */
 unsigned short fill_rar(const module_id_t module_idP,
-			const int CC_id,
-			RA_t *ra,
-			const frame_t frameP,
-			uint8_t * const dlsch_buffer,
-			const uint16_t N_RB_UL,
-			const uint8_t input_buffer_length);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-unsigned short fill_rar_br(eNB_MAC_INST * eNB,
-			   int CC_id,
-			   RA_t * ra,
-			   const frame_t frameP,
-			   const sub_frame_t subframeP,
-			   uint8_t * const dlsch_buffer,
-			   const uint8_t ce_level);
-#endif
+                        const int CC_id,
+                        RA_t *ra,
+                        const frame_t frameP,
+                        uint8_t *const dlsch_buffer,
+                        const uint16_t N_RB_UL,
+                        const uint8_t input_buffer_length);
+
+unsigned short fill_rar_br(eNB_MAC_INST *eNB,
+                           int CC_id,
+                           RA_t *ra,
+                           const frame_t frameP,
+                           const sub_frame_t subframeP,
+                           uint8_t *const dlsch_buffer,
+                           const uint8_t ce_level);
+
 
 /* \brief Function to indicate a failed RA response.  It removes all temporary variables related to the initial connection of a UE
 @param Mod_id Instance ID of eNB
 @param preamble_index index of the received RA request.
 */
 void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
-		    uint16_t preamble_index);
+                    uint16_t preamble_index);
 
 /* \brief Function used by PHY to inform MAC that an uplink is scheduled
           for Msg3 in given subframe. This is used so that the MAC
@@ -361,10 +356,10 @@ void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
 void clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP);
 
 void set_msg3_subframe(module_id_t Mod_id,
-		       int CC_id,
-		       int frame,
-		       int subframe,
-		       int rnti, int Msg3_frame, int Msg3_subframe);
+                       int CC_id,
+                       int frame,
+                       int subframe,
+                       int rnti, int Msg3_frame, int Msg3_subframe);
 
 /* \brief Function to indicate a received SDU on ULSCH.
 @param Mod_id Instance ID of eNB
@@ -376,13 +371,13 @@ void set_msg3_subframe(module_id_t Mod_id,
 @param ul_cqi Uplink CQI estimate after this pdu (SNR quantized to 8 bits, -64 ... 63.5 dB in .5dB steps)
 */
 void rx_sdu(const module_id_t enb_mod_idP,
-	    const int CC_idP,
-	    const frame_t frameP,
-	    const sub_frame_t subframeP,
-	    const rnti_t rntiP,
-	    uint8_t * sduP,
-	    const uint16_t sdu_lenP,
-	    const uint16_t timing_advance, const uint8_t ul_cqi);
+            const int CC_idP,
+            const frame_t frameP,
+            const sub_frame_t subframeP,
+            const rnti_t rntiP,
+            uint8_t *sduP,
+            const uint16_t sdu_lenP,
+            const uint16_t timing_advance, const uint8_t ul_cqi);
 
 
 /* \brief Function to indicate a scheduled schduling request (SR) was received by eNB.
@@ -394,7 +389,7 @@ void rx_sdu(const module_id_t enb_mod_idP,
 @param ul_cqi SNR measurement of PUCCH (SNR quantized to 8 bits, -64 ... 63.5 dB in .5dB steps)
 */
 void SR_indication(module_id_t module_idP, int CC_id, frame_t frameP,
-		   sub_frame_t subframe, rnti_t rnti, uint8_t ul_cqi);
+                   sub_frame_t subframe, rnti_t rnti, uint8_t ul_cqi);
 
 /* \brief Function to indicate a UL failure was detected by eNB PHY.
 @param Mod_id Instance ID of eNB
@@ -404,7 +399,7 @@ void SR_indication(module_id_t module_idP, int CC_id, frame_t frameP,
 @param subframe Index of subframe where SR was received
 */
 void UL_failure_indication(module_id_t Mod_id, int CC_id, frame_t frameP,
-			   rnti_t rnti, sub_frame_t subframe);
+                           rnti_t rnti, sub_frame_t subframe);
 
 /* \brief Function to indicate an HARQ ACK/NAK.
 @param Mod_id Instance ID of eNB
@@ -414,8 +409,8 @@ void UL_failure_indication(module_id_t Mod_id, int CC_id, frame_t frameP,
 @param harq_pdu NFAPI HARQ PDU descriptor
 */
 void harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
-		     sub_frame_t subframeP,
-		     nfapi_harq_indication_pdu_t * harq_pdu);
+                     sub_frame_t subframeP,
+                     nfapi_harq_indication_pdu_t *harq_pdu);
 
 /* \brief Function to indicate a received CQI pdu
 @param Mod_id Instance ID of eNB
@@ -426,12 +421,12 @@ void harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
 @param ul_cqi_information NFAPI UL CQI measurement
 */
 void cqi_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
-		    sub_frame_t subframeP, rnti_t rntiP,
-		    nfapi_cqi_indication_rel9_t * rel9, uint8_t * pdu,
-		    nfapi_ul_cqi_information_t * ul_cqi_information);
+                    sub_frame_t subframeP, rnti_t rntiP,
+                    nfapi_cqi_indication_rel9_t *rel9, uint8_t *pdu,
+                    nfapi_ul_cqi_information_t *ul_cqi_information);
 
 uint8_t *get_dlsch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
-		       rnti_t rnti, uint8_t TBindex);
+                       rnti_t rnti, uint8_t TBindex);
 
 /* \brief Function to retrieve MCH transport block and MCS used for MCH in this MBSFN subframe.  Returns null if no MCH is to be transmitted
 @param Mod_id Instance ID of eNB
@@ -441,7 +436,7 @@ uint8_t *get_dlsch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
 @returns Pointer to MCH transport block and mcs for subframe
 */
 MCH_PDU *get_mch_sdu(module_id_t Mod_id, int CC_id, frame_t frame,
-		     sub_frame_t subframe);
+                     sub_frame_t subframe);
 
 
 
@@ -451,9 +446,9 @@ void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index);
 void ue_init_mac(module_id_t module_idP);
 void init_ue_sched_info(void);
 void add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id,
-		       sub_frame_t subframe, UE_ULSCH_STATUS status);
+                       sub_frame_t subframe, UE_ULSCH_STATUS status);
 void add_ue_dlsch_info(module_id_t module_idP, int CC_id, int UE_id,
-		                   sub_frame_t subframe, UE_DLSCH_STATUS status, rnti_t rnti);
+                       sub_frame_t subframe, UE_DLSCH_STATUS status, rnti_t rnti);
 int find_UE_id(module_id_t module_idP, rnti_t rnti);
 int find_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP);
 rnti_t UE_RNTI(module_id_t module_idP, int UE_id);
@@ -467,23 +462,23 @@ int8_t find_active_UEs_with_traffic(module_id_t module_idP);
 void init_CCE_table(int *CCE_table);
 
 int get_nCCE_offset(int *CCE_table,
-		    const unsigned char L,
-		    const int nCCE,
-		    const int common_dci,
-		    const unsigned short rnti,
-		    const unsigned char subframe);
+                    const unsigned char L,
+                    const int nCCE,
+                    const int common_dci,
+                    const unsigned short rnti,
+                    const unsigned char subframe);
 
 int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
 
 boolean_t CCE_allocation_infeasible(int module_idP,
-				    int CC_idP,
-				    int common_flag,
-				    int subframe,
-				    int aggregation, int rnti);
+                                    int CC_idP,
+                                    int common_flag,
+                                    int subframe,
+                                    int aggregation, int rnti);
 
 void set_ue_dai(sub_frame_t subframeP,
-		int UE_id,
-		uint8_t CC_id, uint8_t tdd_config, UE_list_t * UE_list);
+                int UE_id,
+                uint8_t CC_id, uint8_t tdd_config, UE_list_t *UE_list);
 
 uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
 /** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length.  It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
@@ -495,16 +490,16 @@ uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP
 void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP);
 
 uint8_t find_num_active_UEs_in_cbagroup(module_id_t module_idP,
-					unsigned char group_id);
+                                        unsigned char group_id);
 uint8_t UE_is_to_be_scheduled(module_id_t module_idP, int CC_id,
-			      uint8_t UE_id);
+                              uint8_t UE_id);
 /** \brief Round-robin scheduler for ULSCH traffic.
 @param Mod_id Instance ID for eNB
 @param subframe Subframe number on which to act
 @returns UE index that is to be scheduled if needed/room
 */
 module_id_t schedule_next_ulue(module_id_t module_idP, int UE_id,
-			       sub_frame_t subframe);
+                               sub_frame_t subframe);
 
 /** \brief Round-robin scheduler for DLSCH traffic.
 @param Mod_id Instance ID for eNB
@@ -512,7 +507,7 @@ module_id_t schedule_next_ulue(module_id_t module_idP, int UE_id,
 @returns UE index that is to be scheduled if needed/room
 */
 int schedule_next_dlue(module_id_t module_idP, int CC_id,
-		       sub_frame_t subframe);
+                       sub_frame_t subframe);
 
 /* \brief Allocates a set of PRBS for a particular UE.  This is a simple function for the moment, later it should process frequency-domain CQI information and/or PMI information.  Currently it just returns the first PRBS that are available in the subframe based on the number requested.
 @param UE_id Index of UE on which to act
@@ -522,7 +517,7 @@ int schedule_next_dlue(module_id_t module_idP, int CC_id,
 @returns an rballoc bitmap for resource type 0 allocation (DCI).
 */
 uint32_t allocate_prbs(int UE_id, uint8_t nb_rb, int N_RB_DL,
-		       uint32_t * rballoc);
+                       uint32_t *rballoc);
 
 /* \fn uint32_t req_new_ulsch(module_id_t module_idP)
 \brief check for a new transmission in any drb
@@ -540,41 +535,38 @@ uint32_t req_new_ulsch(module_id_t module_idP);
 @returns 0 for no SR, 1 for SR
 */
 uint32_t ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP,
-		   uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe);
+                   uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe);
 
 uint8_t get_ue_weight(module_id_t module_idP, int CC_id, int UE_id);
 
 // UE functions
 void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
-			 uint16_t CH_index);
+                         uint16_t CH_index);
 
 void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
-		  uint8_t CH_index, void *pdu, uint16_t len);
+                  uint8_t CH_index, void *pdu, uint16_t len);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frame,
-                 uint8_t CH_index, void *pdu, uint16_t len);
-#endif
+                       uint8_t CH_index, void *pdu, uint16_t len);
 
 void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
-		 uint8_t CH_index, void *pdu, uint16_t len);
+                 uint8_t CH_index, void *pdu, uint16_t len);
 
 
 void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
-		 sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
-		 uint8_t CH_index);
+                 sub_frame_t subframe, uint8_t *sdu, uint16_t sdu_len,
+                 uint8_t CH_index);
 
 void ue_send_sl_sdu(module_id_t module_idP,
-		    uint8_t CC_id,
-		    frame_t frameP,
-		    sub_frame_t subframeP,
-		    uint8_t* sdu,
-		    uint16_t sdu_len,
-		    uint8_t eNB_index,
-	       sl_discovery_flag_t sl_discovery_flag
-		    );
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+                    uint8_t CC_id,
+                    frame_t frameP,
+                    sub_frame_t subframeP,
+                    uint8_t *sdu,
+                    uint16_t sdu_len,
+                    uint8_t eNB_index,
+                    sl_discovery_flag_t sl_discovery_flag
+                   );
+
 /* \brief Called by PHY to transfer MCH transport block to ue MAC.
 @param Mod_id Index of module instance
 @param frame Frame index
@@ -584,8 +576,8 @@ void ue_send_sl_sdu(module_id_t module_idP,
 @param sync_area the index of MBSFN sync area
 */
 void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
-		     uint8_t * sdu, uint16_t sdu_len, uint8_t eNB_index,
-		     uint8_t sync_area);
+                     uint8_t *sdu, uint16_t sdu_len, uint8_t eNB_index,
+                     uint8_t sync_area);
 
 /*\brief Function to check if UE PHY needs to decode MCH for MAC.
 @param Mod_id Index of protocol instance
@@ -596,10 +588,9 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
 @param[out] mcch_active flag indicating whether this MCCH is active in this SF
 */
 int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
-		 sub_frame_t subframe, uint8_t eNB_index,
-		 uint8_t * sync_area, uint8_t * mcch_active);
+                 sub_frame_t subframe, uint8_t eNB_index,
+                 uint8_t *sync_area, uint8_t *mcch_active);
 
-#endif
 
 /* \brief Called by PHY to get sdu for PUSCH transmission.  It performs the following operations: Checks BSR for DCCH, DCCH1 and DTCH corresponding to previous values computed either in SR or BSR procedures.  It gets rlc status indications on DCCH,DCCH1 and DTCH and forms BSR elements and PHR in MAC header.  CRNTI element is not supported yet.  It computes transport block for up to 3 SDUs and generates header and forms the complete MAC SDU.
 @param Mod_id Instance id of UE in machine
@@ -608,9 +599,9 @@ int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
 @param subframe subframe number
 */
 void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
-		sub_frame_t subframe, uint8_t eNB_index,
-		uint8_t * ulsch_buffer, uint16_t buflen,
-		uint8_t * access_mode);
+                sub_frame_t subframe, uint8_t eNB_index,
+                uint8_t *ulsch_buffer, uint16_t buflen,
+                uint8_t *access_mode);
 
 /* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
 @param Mod_id Instance id of UE in machine
@@ -643,8 +634,8 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_fram
 @param subframe Index of subframe for PRACH transmission (0 ... 9)
 @returns A pointer to a PRACH_RESOURCES_t */
 PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
-			       frame_t frameP, uint8_t new_Msg3,
-			       sub_frame_t subframe);
+                               frame_t frameP, uint8_t new_Msg3,
+                               sub_frame_t subframe);
 
 /* \brief Function called by PHY to process the received RAR.  It checks that the preamble matches what was sent by the eNB and provides the timing advance and t-CRNTI.
 @param Mod_id Index of UE instance
@@ -660,13 +651,13 @@ random-access procedure
 */
 uint16_t
 ue_process_rar(const module_id_t module_idP,
-	       const int CC_id,
-	       const frame_t frameP,
-	       const rnti_t ra_rnti,
-	       uint8_t * const dlsch_buffer,
-	       rnti_t * const t_crnti,
-	       const uint8_t preamble_index,
-	       uint8_t * selected_rar_buffer);
+               const int CC_id,
+               const frame_t frameP,
+               const rnti_t ra_rnti,
+               uint8_t *const dlsch_buffer,
+               rnti_t *const t_crnti,
+               const uint8_t preamble_index,
+               uint8_t *selected_rar_buffer);
 
 
 /* \brief Generate header for UL-SCH.  This function parses the desired control elements and sdus and generates the header as described
@@ -685,17 +676,17 @@ in the ULSCH buffer.
 @param post_padding Number of bytes for padding at the end of MAC PDU
 @returns Number of bytes used for header
 */
-unsigned char generate_ulsch_header(uint8_t * mac_header,
-				    uint8_t num_sdus,
-				    uint8_t short_padding,
-				    uint16_t * sdu_lengths,
-				    uint8_t * sdu_lcids,
-				    POWER_HEADROOM_CMD * power_headroom,
-				    uint16_t * crnti,
-				    BSR_SHORT * truncated_bsr,
-				    BSR_SHORT * short_bsr,
-				    BSR_LONG * long_bsr,
-				    unsigned short post_padding);
+unsigned char generate_ulsch_header(uint8_t *mac_header,
+                                    uint8_t num_sdus,
+                                    uint8_t short_padding,
+                                    uint16_t *sdu_lengths,
+                                    uint8_t *sdu_lcids,
+                                    POWER_HEADROOM_CMD *power_headroom,
+                                    uint16_t *crnti,
+                                    BSR_SHORT *truncated_bsr,
+                                    BSR_SHORT *short_bsr,
+                                    BSR_LONG *long_bsr,
+                                    unsigned short post_padding);
 
 /* \brief Parse header for UL-SCH.  This function parses the received UL-SCH header as described
 in 36-321 MAC layer specifications.  It returns the number of bytes used for the header to be used as an offset for the payload
@@ -708,30 +699,26 @@ in the ULSCH buffer.
 @param rx_lengths Pointer to array of SDU lengths
 @returns Pointer to payload following header
 */
-uint8_t *parse_ulsch_header(uint8_t * mac_header,
-			    uint8_t * num_ce,
-			    uint8_t * num_sdu,
-			    uint8_t * rx_ces,
-			    uint8_t * rx_lcids,
-			    uint16_t * rx_lengths, uint16_t tx_lenght);
+uint8_t *parse_ulsch_header(uint8_t *mac_header,
+                            uint8_t *num_ce,
+                            uint8_t *num_sdu,
+                            uint8_t *rx_ces,
+                            uint8_t *rx_lcids,
+                            uint16_t *rx_lengths, uint16_t tx_lenght);
 
 int to_prb(int);
 int to_rbg(int);
 int mac_init(void);
-int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-	       , uint8_t rach_resource_type
-#endif
-    );
+int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid, uint8_t rach_resource_type);
 int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP);
 
 void store_dlsch_buffer(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframeP);
 void assign_rbs_required(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframe, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], int min_rb_unit[NFAPI_CC_MAX]);
 
-void swap_UEs(UE_list_t * listP, int nodeiP, int nodejP, int ul_flag);
-int prev(UE_list_t * listP, int nodeP, int ul_flag);
-void dump_ue_list(UE_list_t * listP, int ul_flag);
-int UE_num_active_CC(UE_list_t * listP, int ue_idP);
+void swap_UEs(UE_list_t *listP, int nodeiP, int nodejP, int ul_flag);
+int prev(UE_list_t *listP, int nodeP, int ul_flag);
+void dump_ue_list(UE_list_t *listP, int ul_flag);
+int UE_num_active_CC(UE_list_t *listP, int ue_idP);
 int UE_PCCID(module_id_t mod_idP, int ue_idP);
 rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP);
 
@@ -744,16 +731,16 @@ void set_ul_DAI(int module_idP,
                 int subframeP);
 
 void ulsch_scheduler_pre_processor(module_id_t module_idP, int slice_idx, int frameP,
-				   sub_frame_t subframeP,
+                                   sub_frame_t subframeP,
                                    int sched_frameP,
                                    unsigned char sched_subframeP,
-				   uint16_t * first_rb);
+                                   uint16_t *first_rb);
 void store_ulsch_buffer(module_id_t module_idP, int frameP,
-			sub_frame_t subframeP);
+                        sub_frame_t subframeP);
 void assign_max_mcs_min_rb(module_id_t module_idP, int slice_idx, int frameP,
-			   sub_frame_t subframeP, uint16_t * first_rb);
+                           sub_frame_t subframeP, uint16_t *first_rb);
 void adjust_bsr_info(int buffer_occupancy, uint16_t TBS,
-		     UE_TEMPLATE * UE_template);
+                     UE_TEMPLATE *UE_template);
 
 int phy_stats_exist(module_id_t Mod_id, int rnti);
 void sort_UEs(module_id_t Mod_idP, int slice_idx, int frameP, sub_frame_t subframeP);
@@ -770,12 +757,12 @@ void sort_UEs(module_id_t Mod_idP, int slice_idx, int frameP, sub_frame_t subfra
 @returns L2 state (CONNETION_OK or CONNECTION_LOST or PHY_RESYNCH)
 */
 UE_L2_STATE_t ue_scheduler(const module_id_t module_idP,
-			   const frame_t rxFrameP,
-			   const sub_frame_t rxSubframe,
-			   const frame_t txFrameP,
-			   const sub_frame_t txSubframe,
-			   const lte_subframe_t direction,
-			   const uint8_t eNB_index, const int CC_id);
+                           const frame_t rxFrameP,
+                           const sub_frame_t rxSubframe,
+                           const frame_t txFrameP,
+                           const sub_frame_t txSubframe,
+                           const lte_subframe_t direction,
+                           const uint8_t eNB_index, const int CC_id);
 
 /*! \fn  int cba_access(module_id_t module_idP,frame_t frameP,sub_frame_t subframe, uint8_t eNB_index,uint16_t buflen);
 \brief determine whether to use cba resource to transmit or not
@@ -786,7 +773,7 @@ UE_L2_STATE_t ue_scheduler(const module_id_t module_idP,
 \param[out] access(1) or postpone (0)
 */
 int cba_access(module_id_t module_idP, frame_t frameP,
-	       sub_frame_t subframe, uint8_t eNB_index, uint16_t buflen);
+               sub_frame_t subframe, uint8_t eNB_index, uint16_t buflen);
 
 /*! \fn  BSR_SHORT *  get_bsr_short(module_id_t module_idP, uint8_t bsr_len)
 \brief get short bsr level
@@ -810,7 +797,7 @@ BSR_LONG *get_bsr_long(module_id_t module_idP, uint8_t bsr_len);
 \param[in] frame Frame index
 */
 boolean_t update_bsr(module_id_t module_idP, frame_t frameP,
-		     sub_frame_t subframeP, eNB_index_t eNB_index);
+                     sub_frame_t subframeP, eNB_index_t eNB_index);
 
 /*! \fn  locate_BsrIndexByBufferSize (int *table, int size, int value)
    \brief locate the BSR level in the table as defined in 36.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
@@ -819,8 +806,8 @@ boolean_t update_bsr(module_id_t module_idP, frame_t frameP,
 \param[in] value Value of the buffer
 \return the index in the BSR_LEVEL table
 */
-uint8_t locate_BsrIndexByBufferSize(const uint32_t * table, int size,
-				    int value);
+uint8_t locate_BsrIndexByBufferSize(const uint32_t *table, int size,
+                                    int value);
 
 
 /*! \fn  int get_sf_periodicBSRTimer(uint8_t periodicBSR_Timer)
@@ -872,7 +859,7 @@ int get_db_dl_PathlossChange(uint8_t dl_PathlossChange);
 \return phr mapping
 */
 uint8_t get_phr_mapping(module_id_t module_idP, int CC_id,
-			uint8_t eNB_index);
+                        uint8_t eNB_index);
 
 /*! \fn  void update_phr (module_id_t module_idP)
    \brief update/reset the phr timers
@@ -887,7 +874,7 @@ void update_phr(module_id_t module_idP, int CC_id);
 \param[in] eNB_id Index of eNB
 */
 void Msg3_tx(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
-	     uint8_t eNB_id);
+             uint8_t eNB_id);
 
 
 /*! \brief Function to indicate the transmission of msg1/rach
@@ -896,11 +883,11 @@ void Msg3_tx(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
 */
 
 void Msg1_tx(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
-	     uint8_t eNB_id);
+             uint8_t eNB_id);
 
 void dl_phy_sync_success(module_id_t module_idP,
-			 frame_t frameP,
-			 unsigned char eNB_index, uint8_t first_sync);
+                         frame_t frameP,
+                         unsigned char eNB_index, uint8_t first_sync);
 
 int dump_eNB_l2_stats(char *buffer, int length);
 
@@ -918,10 +905,10 @@ void add_common_dci(DCI_PDU *DCI_pdu,
 */
 
 uint32_t allocate_prbs_sub(int nb_rb, int N_RB_DL, int N_RBG,
-			   uint8_t * rballoc);
+                           uint8_t *rballoc);
 
 void update_ul_dci(module_id_t module_idP, uint8_t CC_id, rnti_t rnti,
-		   uint8_t dai, sub_frame_t subframe);
+                   uint8_t dai, sub_frame_t subframe);
 
 int get_bw_index(module_id_t module_id, uint8_t CC_id);
 
@@ -970,73 +957,51 @@ int generate_dlsch_header(unsigned char *mac_header,
 @param mbsfn_SubframeConfigList pointer to mbsfn subframe configuration list from SIB2
 @param mbsfn_AreaInfoList pointer to MBSFN Area Info list from SIB13
 @param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message)
-@param sib1_ext_r13 SI Scheduling information for SI-BR UEs         
+@param sib1_ext_r13 SI Scheduling information for SI-BR UEs
 @param mib_fembms pointer to FeMBMS MIB
 @param FeMBMS_Flag indicates FeMBMS transmission
 @param schedulingInfo_fembms pointer to FeMBMS SI Scheduling Information
-@param non_MBSFN_SubframeConfig pointer to FeMBMS Non MBSFN Subframe Config 
+@param non_MBSFN_SubframeConfig pointer to FeMBMS Non MBSFN Subframe Config
 @param sib1_mbms_r14_fembms pointer SI Scheduling infomration for SI-MBMS
 @param mbsfn_AreaInfoList_fembms pointer to FeMBMS MBSFN Area Info list from SIB1-MBMS
 */
 
 int rrc_mac_config_req_eNB(module_id_t module_idP,
-			   int CC_id,
-			   int physCellId,
-			   int p_eNB,
-			   int Ncp,
-			   int eutra_band, uint32_t dl_CarrierFreq,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			   int pbch_repetition,
-#endif
-			   rnti_t rntiP,
-			   LTE_BCCH_BCH_Message_t * mib,
-			   LTE_RadioResourceConfigCommonSIB_t *
-			   radioResourceConfigCommon,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			   LTE_RadioResourceConfigCommonSIB_t *
-			   LTE_radioResourceConfigCommon_BR,
-#endif
-			   struct LTE_PhysicalConfigDedicated
-			   *physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-			   LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
-			   //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
-			   LTE_MeasObjectToAddMod_t ** measObj,
-			   LTE_MAC_MainConfig_t * mac_MainConfig,
-			   long logicalChannelIdentity,
-			   LTE_LogicalChannelConfig_t * logicalChannelConfig,
-			   LTE_MeasGapConfig_t * measGapConfig,
-			   LTE_TDD_Config_t * tdd_Config,
-			   LTE_MobilityControlInfo_t * mobilityControlInfo,
-			   LTE_SchedulingInfoList_t * schedulingInfoList,
-			   uint32_t ul_CarrierFreq,
-			   long *ul_Bandwidth,
-			   LTE_AdditionalSpectrumEmission_t *
-			   additionalSpectrumEmission,
-			   struct LTE_MBSFN_SubframeConfigList
-			   *mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-			   ,
-			   uint8_t MBMS_Flag,
-			   LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
-			   LTE_PMCH_InfoList_r9_t * pmch_InfoList
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-			   ,
-			   LTE_SystemInformationBlockType1_v1310_IEs_t *
-			   sib1_ext_r13
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           ,
+                           int CC_id,
+                           int physCellId,
+                           int p_eNB,
+                           int Ncp,
+                           int eutra_band, uint32_t dl_CarrierFreq,
+                           int pbch_repetition,
+                           rnti_t rntiP,
+                           LTE_BCCH_BCH_Message_t *mib,
+                           LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
+                           LTE_RadioResourceConfigCommonSIB_t *LTE_radioResourceConfigCommon_BR,
+                           struct LTE_PhysicalConfigDedicated  *physicalConfigDedicated,
+                           LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
+                           LTE_MeasObjectToAddMod_t **measObj,
+                           LTE_MAC_MainConfig_t *mac_MainConfig,
+                           long logicalChannelIdentity,
+                           LTE_LogicalChannelConfig_t *logicalChannelConfig,
+                           LTE_MeasGapConfig_t *measGapConfig,
+                           LTE_TDD_Config_t *tdd_Config,
+                           LTE_MobilityControlInfo_t *mobilityControlInfo,
+                           LTE_SchedulingInfoList_t *schedulingInfoList,
+                           uint32_t ul_CarrierFreq,
+                           long *ul_Bandwidth,
+                           LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
+                           struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
+                           uint8_t MBMS_Flag,
+                           LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
+                           LTE_PMCH_InfoList_r9_t *pmch_InfoList,
+                           LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_ext_r13,
                            uint8_t FeMBMS_Flag,
-                           LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
-                           LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
-                           struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
-                           LTE_SystemInformationBlockType1_MBMS_r14_t *  sib1_mbms_r14_fembms,
-                           LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
-#endif
-    );
+                           LTE_BCCH_DL_SCH_Message_MBMS_t *mib_fembms,
+                           LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
+                           struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
+                           LTE_SystemInformationBlockType1_MBMS_r14_t   *sib1_mbms_r14_fembms,
+                           LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
+                          );
 
 /** \brief RRC eNB Configuration primitive for PHY/MAC.  Allows configuration of PHY/MAC resources based on System Information (SI), RRCConnectionSetup and RRCConnectionReconfiguration messages.
 @param Mod_id Instance ID of ue
@@ -1059,53 +1024,39 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
 @param pmch_InfoList pointer to PMCH_InfoList from MBSFNAreaConfiguration Message (MCCH Message)
 */
 int rrc_mac_config_req_ue(module_id_t module_idP,
-			  int CC_id,
-			  uint8_t eNB_index,
-			  LTE_RadioResourceConfigCommonSIB_t *
-			  radioResourceConfigCommon,
-			  struct LTE_PhysicalConfigDedicated
-			  *physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-			  LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
-			  //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
-			  LTE_MeasObjectToAddMod_t ** measObj,
-			  LTE_MAC_MainConfig_t * mac_MainConfig,
-			  long logicalChannelIdentity,
-			  LTE_LogicalChannelConfig_t * logicalChannelConfig,
-			  LTE_MeasGapConfig_t * measGapConfig,
-			  LTE_TDD_Config_t * tdd_Config,
-			  LTE_MobilityControlInfo_t * mobilityControlInfo,
-			  uint8_t * SIwindowsize,
-			  uint16_t * SIperiod,
-			  LTE_ARFCN_ValueEUTRA_t * ul_CarrierFreq,
-			  long *ul_Bandwidth,
-			  LTE_AdditionalSpectrumEmission_t *
-			  additionalSpectrumEmission,
-			  struct LTE_MBSFN_SubframeConfigList
-			  *mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-			  ,
-			  uint8_t MBMS_Flag,
-			  LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
-			  LTE_PMCH_InfoList_r9_t * pmch_InfoList
-#endif
+                          int CC_id,
+                          uint8_t eNB_index,
+                          LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
+                          struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
+                          LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
+                          LTE_MeasObjectToAddMod_t **measObj,
+                          LTE_MAC_MainConfig_t *mac_MainConfig,
+                          long logicalChannelIdentity,
+                          LTE_LogicalChannelConfig_t *logicalChannelConfig,
+                          LTE_MeasGapConfig_t *measGapConfig,
+                          LTE_TDD_Config_t *tdd_Config,
+                          LTE_MobilityControlInfo_t *mobilityControlInfo,
+                          uint8_t *SIwindowsize,
+                          uint16_t *SIperiod,
+                          LTE_ARFCN_ValueEUTRA_t *ul_CarrierFreq,
+                          long *ul_Bandwidth,
+                          LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
+                          struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
+                          uint8_t MBMS_Flag,
+                          LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
+                          LTE_PMCH_InfoList_r9_t *pmch_InfoList
 #ifdef CBA
-			  ,
-			  uint8_t num_active_cba_groups, uint16_t cba_rnti
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			  ,config_action_t config_action
-			  ,const uint32_t * const sourceL2Id
-			  ,const uint32_t * const destinationL2Id
+  ,
+  uint8_t num_active_cba_groups, uint16_t cba_rnti
 #endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           ,
-                           uint8_t FeMBMS_Flag,
-                           struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
-                           LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
-#endif
-			  );
+
+                          ,config_action_t config_action,
+                          const uint32_t *const sourceL2Id,
+                          const uint32_t *const destinationL2Id,
+                          uint8_t FeMBMS_Flag,
+                          struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
+                          LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
+                         );
 
 
 uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
@@ -1113,24 +1064,24 @@ uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
 int get_subbandsize(uint8_t dl_bandwidth);
 
 
-void get_Msg3allocret(COMMON_channels_t * cc,
-		      sub_frame_t current_subframe,
-		      frame_t current_frame,
-		      frame_t * frame, sub_frame_t * subframe);
+void get_Msg3allocret(COMMON_channels_t *cc,
+                      sub_frame_t current_subframe,
+                      frame_t current_frame,
+                      frame_t *frame, sub_frame_t *subframe);
 
-void get_Msg3alloc(COMMON_channels_t * cc,
-		   sub_frame_t current_subframe,
-		   frame_t current_frame,
-		   frame_t * frame, sub_frame_t * subframe);
+void get_Msg3alloc(COMMON_channels_t *cc,
+                   sub_frame_t current_subframe,
+                   frame_t current_frame,
+                   frame_t *frame, sub_frame_t *subframe);
 
 uint16_t mac_computeRIV(uint16_t N_RB_DL, uint16_t RBstart,
-			uint16_t Lcrbs);
+                        uint16_t Lcrbs);
 
-int get_phich_resource_times6(COMMON_channels_t * cc);
+int get_phich_resource_times6(COMMON_channels_t *cc);
 
 uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
 
-uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
+uint8_t ul_subframe2_k_phich(COMMON_channels_t *cc, sub_frame_t ul_subframe);
 
 unsigned char ul_ACK_subframe2M(LTE_TDD_Config_t *tdd_Config,unsigned char subframe);
 
@@ -1138,172 +1089,167 @@ int to_rbg(int dl_Bandwidth);
 
 int to_prb(int dl_Bandwidth);
 
-uint8_t get_Msg3harqpid(COMMON_channels_t * cc,
-			frame_t frame, sub_frame_t current_subframe);
+uint8_t get_Msg3harqpid(COMMON_channels_t *cc,
+                        frame_t frame, sub_frame_t current_subframe);
 
-uint32_t pdcchalloc2ulframe(COMMON_channels_t * ccP, uint32_t frame,
-			    uint8_t n);
+uint32_t pdcchalloc2ulframe(COMMON_channels_t *ccP, uint32_t frame,
+                            uint8_t n);
 
-uint8_t pdcchalloc2ulsubframe(COMMON_channels_t * ccP, uint8_t n);
+uint8_t pdcchalloc2ulsubframe(COMMON_channels_t *ccP, uint8_t n);
 
-int is_UL_sf(COMMON_channels_t * ccP, sub_frame_t subframeP);
+int is_UL_sf(COMMON_channels_t *ccP, sub_frame_t subframeP);
 
 uint8_t getQm(uint8_t mcs);
 
-uint8_t subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
-			 sub_frame_t subframe);
+uint8_t subframe2harqpid(COMMON_channels_t *cc, frame_t frame,
+                         sub_frame_t subframe);
 
 
-void get_srs_pos(COMMON_channels_t * cc, uint16_t isrs,
-		 uint16_t * psrsPeriodicity, uint16_t * psrsOffset);
+void get_srs_pos(COMMON_channels_t *cc, uint16_t isrs,
+                 uint16_t *psrsPeriodicity, uint16_t *psrsOffset);
 
-void get_csi_params(COMMON_channels_t * cc,
-		    struct LTE_CQI_ReportPeriodic *cqi_PMI_ConfigIndex,
-		    uint16_t * Npd, uint16_t * N_OFFSET_CQI, int *H);
+void get_csi_params(COMMON_channels_t *cc,
+                    struct LTE_CQI_ReportPeriodic *cqi_PMI_ConfigIndex,
+                    uint16_t *Npd, uint16_t *N_OFFSET_CQI, int *H);
 
-uint8_t get_rel8_dl_cqi_pmi_size(UE_sched_ctrl_t * sched_ctl, int CC_idP,
-				 COMMON_channels_t * cc, uint8_t tmode,
-				 struct LTE_CQI_ReportPeriodic
-				 *cqi_ReportPeriodic);
+uint8_t get_rel8_dl_cqi_pmi_size(UE_sched_ctrl_t *sched_ctl, int CC_idP,
+                                 COMMON_channels_t *cc, uint8_t tmode,
+                                 struct LTE_CQI_ReportPeriodic
+                                 *cqi_ReportPeriodic);
 
-uint8_t get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
-				  uint8_t ri,
-				  LTE_CQI_ReportModeAperiodic_t *
-				  cqi_ReportModeAperiodic);
+uint8_t get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc, uint8_t tmode,
+                                  uint8_t ri,
+                                  LTE_CQI_ReportModeAperiodic_t *
+                                  cqi_ReportModeAperiodic);
 void extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
-		       frame_t frameP, sub_frame_t subframeP,
-		       uint8_t * pdu, uint8_t length);
+                       frame_t frameP, sub_frame_t subframeP,
+                       uint8_t *pdu, uint8_t length);
 
 void extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
-		       frame_t frameP, sub_frame_t subframeP,
-		       uint8_t * pdu, uint8_t length);
+                       frame_t frameP, sub_frame_t subframeP,
+                       uint8_t *pdu, uint8_t length);
 
-uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body,
-			   uint16_t absSF, uint16_t pdu_length,
-			   int16_t pdu_index, uint8_t * pdu);
+uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,
+                           uint16_t absSF, uint16_t pdu_length,
+                           int16_t pdu_index, uint8_t *pdu);
 
 void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
-					  ul_config_pdu, uint8_t cqi_req,
-					  COMMON_channels_t * cc,
-					  struct LTE_PhysicalConfigDedicated
-					  *physicalConfigDedicated,
-					  uint8_t tmode, uint32_t handle,
-					  uint16_t rnti,
-					  uint8_t resource_block_start,
-					  uint8_t
-					  number_of_resource_blocks,
-					  uint8_t mcs,
-					  uint8_t cyclic_shift_2_for_drms,
-					  uint8_t
-					  frequency_hopping_enabled_flag,
-					  uint8_t frequency_hopping_bits,
-					  uint8_t new_data_indication,
-					  uint8_t redundancy_version,
-					  uint8_t harq_process_number,
-					  uint8_t ul_tx_mode,
-					  uint8_t current_tx_nb,
-					  uint8_t n_srs, uint16_t size);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+    ul_config_pdu, uint8_t cqi_req,
+    COMMON_channels_t *cc,
+    struct LTE_PhysicalConfigDedicated
+    *physicalConfigDedicated,
+    uint8_t tmode, uint32_t handle,
+    uint16_t rnti,
+    uint8_t resource_block_start,
+    uint8_t
+    number_of_resource_blocks,
+    uint8_t mcs,
+    uint8_t cyclic_shift_2_for_drms,
+    uint8_t
+    frequency_hopping_enabled_flag,
+    uint8_t frequency_hopping_bits,
+    uint8_t new_data_indication,
+    uint8_t redundancy_version,
+    uint8_t harq_process_number,
+    uint8_t ul_tx_mode,
+    uint8_t current_tx_nb,
+    uint8_t n_srs, uint16_t size);
+
 void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
-					  ul_config_pdu, uint8_t ue_type,
-					  uint16_t
-					  total_number_of_repetitions,
-					  uint16_t repetition_number,
-					  uint16_t
-					  initial_transmission_sf_io);
-#endif
+    ul_config_pdu, uint8_t ue_type,
+    uint16_t
+    total_number_of_repetitions,
+    uint16_t repetition_number,
+    uint16_t
+    initial_transmission_sf_io);
 
 void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
-			  frame_t frameP, sub_frame_t subframeP,
-			  uint8_t cce_idx);
-
-void fill_nfapi_dlsch_config(eNB_MAC_INST * eNB,
-			     nfapi_dl_config_request_body_t * dl_req,
-			     uint16_t length, int16_t pdu_index,
-			     uint16_t rnti,
-			     uint8_t resource_allocation_type,
-			     uint8_t
-			     virtual_resource_block_assignment_flag,
-			     uint16_t resource_block_coding,
-			     uint8_t modulation,
-			     uint8_t redundancy_version,
-			     uint8_t transport_blocks,
-			     uint8_t transport_block_to_codeword_swap_flag,
-			     uint8_t transmission_scheme,
-			     uint8_t number_of_layers,
-			     uint8_t number_of_subbands,
-			     //                      uint8_t codebook_index,
-			     uint8_t ue_category_capacity,
-			     uint8_t pa,
-			     uint8_t delta_power_offset_index,
-			     uint8_t ngap,
-			     uint8_t nprb,
-			     uint8_t transmission_mode,
-			     uint8_t num_bf_prb_per_subband,
-			     uint8_t num_bf_vector);
+                          frame_t frameP, sub_frame_t subframeP,
+                          uint8_t cce_idx);
+
+void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
+                             nfapi_dl_config_request_body_t *dl_req,
+                             uint16_t length, int16_t pdu_index,
+                             uint16_t rnti,
+                             uint8_t resource_allocation_type,
+                             uint8_t
+                             virtual_resource_block_assignment_flag,
+                             uint16_t resource_block_coding,
+                             uint8_t modulation,
+                             uint8_t redundancy_version,
+                             uint8_t transport_blocks,
+                             uint8_t transport_block_to_codeword_swap_flag,
+                             uint8_t transmission_scheme,
+                             uint8_t number_of_layers,
+                             uint8_t number_of_subbands,
+                             //                      uint8_t codebook_index,
+                             uint8_t ue_category_capacity,
+                             uint8_t pa,
+                             uint8_t delta_power_offset_index,
+                             uint8_t ngap,
+                             uint8_t nprb,
+                             uint8_t transmission_mode,
+                             uint8_t num_bf_prb_per_subband,
+                             uint8_t num_bf_vector);
 
 void fill_nfapi_harq_information(module_id_t module_idP,
-				 int CC_idP,
-				 uint16_t rntiP,
-				 nfapi_ul_config_harq_information *
-				 harq_information, uint8_t cce_idxP);
+                                 int CC_idP,
+                                 uint16_t rntiP,
+                                 nfapi_ul_config_harq_information *
+                                 harq_information, uint8_t cce_idxP);
 
 void fill_nfapi_ulsch_harq_information(module_id_t module_idP,
-				       int CC_idP,
-				       uint16_t rntiP,
-				       nfapi_ul_config_ulsch_harq_information
-				       * harq_information,
-				       sub_frame_t subframeP);
+                                       int CC_idP,
+                                       uint16_t rntiP,
+                                       nfapi_ul_config_ulsch_harq_information
+                                       * harq_information,
+                                       sub_frame_t subframeP);
 
 uint16_t fill_nfapi_uci_acknak(module_id_t module_idP,
-							int CC_idP,
-							uint16_t rntiP,
-							uint16_t absSFP,
-							uint8_t cce_idxP);
-
-void fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t * dl_config_pdu,
-			  uint8_t aggregation_level,
-			  uint16_t rnti,
-			  uint8_t rnti_type,
-			  uint8_t harq_process,
-			  uint8_t tpc,
-			  uint16_t resource_block_coding,
-			  uint8_t mcs,
-			  uint8_t ndi, uint8_t rv, uint8_t vrb_flag);
+                               int CC_idP,
+                               uint16_t rntiP,
+                               uint16_t absSFP,
+                               uint8_t cce_idxP);
+
+void fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
+                          uint8_t aggregation_level,
+                          uint16_t rnti,
+                          uint8_t rnti_type,
+                          uint8_t harq_process,
+                          uint8_t tpc,
+                          uint16_t resource_block_coding,
+                          uint8_t mcs,
+                          uint8_t ndi, uint8_t rv, uint8_t vrb_flag);
 
 nfapi_ul_config_request_pdu_t *has_ul_grant(module_id_t module_idP,
-					    int CC_idP, uint16_t subframeP,
-					    uint16_t rnti);
+    int CC_idP, uint16_t subframeP,
+    uint16_t rnti);
 
 uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP);
 
 uint8_t get_ul_req_index(module_id_t module_idP, int CC_idP,
-			 sub_frame_t subframeP);
+                         sub_frame_t subframeP);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int get_numnarrowbandbits(long dl_Bandwidth);
 
-int mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP,
-			sub_frame_t subframeP, int rmax,
-			MPDCCH_TYPES_t mpdcch_type, int UE_id);
+int mpdcch_sf_condition(eNB_MAC_INST *eNB, int CC_id, frame_t frameP,
+                        sub_frame_t subframeP, int rmax,
+                        MPDCCH_TYPES_t mpdcch_type, int UE_id);
 
 int get_numnarrowbands(long dl_Bandwidth);
 
-int narrowband_to_first_rb(COMMON_channels_t * cc, int nb_index);
-
-#endif
+int narrowband_to_first_rb(COMMON_channels_t *cc, int nb_index);
 
 int l2_init_eNB(void);
 
 void Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
-		      frame_t frameP, uint8_t eNB_id);
+                      frame_t frameP, uint8_t eNB_id);
 void Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
-		      frame_t frameP, uint8_t eNB_id);
+                      frame_t frameP, uint8_t eNB_id);
 uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn);
 int32_t get_uldl_offset(int eutra_bandP);
 int l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
-	       uint8_t HO_active);
+               uint8_t HO_active);
 #if defined(PRE_SCD_THREAD)
 void pre_scd_nb_rbs_required(    module_id_t     module_idP,
                                  frame_t         frameP,
@@ -1322,6 +1268,6 @@ int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
 void eNB_Config_Local_DRX(module_id_t Mod_id, rnti_t rnti, LTE_DRX_Config_t *drx_Configuration);
 
 /* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
-uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
+uint8_t ul_subframe2_k_phich(COMMON_channels_t *cc, sub_frame_t ul_subframe);
 #endif
 /** @}*/
diff --git a/openair2/LAYER2/MAC/mac_vars.h b/openair2/LAYER2/MAC/mac_vars.h
index 7126301a7c82292a399914bb455f713059912b39..d9b4b9f907cd168fa605492e2aeaf15cfb5ca8f7 100644
--- a/openair2/LAYER2/MAC/mac_vars.h
+++ b/openair2/LAYER2/MAC/mac_vars.h
@@ -36,29 +36,29 @@
 #include "mac.h"
 #include "COMMON/mac_rrc_primitives.h"
 
-const uint32_t BSR_TABLE[BSR_TABLE_SIZE] =
-    { 0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
-    105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
-	967, 1132,
-    1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
-	8787, 10287, 12043, 14099,
-    16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
-	79846, 93479, 109439, 128125, 150000, 300000
+const uint32_t BSR_TABLE[BSR_TABLE_SIZE] = {
+  0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
+  105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
+  967, 1132,
+  1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
+  8787, 10287, 12043, 14099,
+  16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
+  79846, 93479, 109439, 128125, 150000, 300000
 };
 
-// extended bsr table--currently not used                                                                                 
-const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
-    { 0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
-    181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
-    1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
-    11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
-    59039, 72598, 89272, 109774, 134986, 165989, 204111,
-    250990, 308634, 379519, 466683, 573866, 705666, 867737,
-    1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
-    6000000
+// extended bsr table--currently not used
+const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] = {
+  0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
+  181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
+  1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
+  11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
+  59039, 72598, 89272, 109774, 134986, 165989, 204111,
+  250990, 308634, 379519, 466683, 573866, 705666, 867737,
+  1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
+  6000000
 };
 
-//#define MAX_SIZE_OF_AGG3   576 
+//#define MAX_SIZE_OF_AGG3   576
 //#define MAX_SIZE_OF_AGG2   288
 //#define MAX_SIZE_OF_AGG1   144
 //#define MAX_SIZE_OF_AGG0   72
@@ -69,25 +69,25 @@ const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
  */
 // the follwoing three tables are calibrated for TXMODE 1 and 2
 const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
-    {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},	// 1.4_DCI0_CRC_Size= 37 bits
-    //{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
-    {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},	// 5_DCI0_CRC_SIZE = 41
-    {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0},	// 10_DCI0_CRC_SIZE = 43
-    {3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}	// 20_DCI0_CRC_SIZE = 44
+  {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
+  //{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
+  {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
+  {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
+  {3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}  // 20_DCI0_CRC_SIZE = 44
 };
 
 const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
-    {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},	// 1.4_DCI0_CRC_Size < 38 bits
-    {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},	// 5_DCI0_CRC_SIZE  < 43
-    {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0},	// 10_DCI0_CRC_SIZE  < 47
-    {3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}	// 20_DCI0_CRC_SIZE  < 55
+  {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
+  {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE  < 43
+  {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE  < 47
+  {3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}  // 20_DCI0_CRC_SIZE  < 55
 };
 
 const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
-    {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},	// 1.4_DCI0_CRC_Size= 47 bits
-    {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},	// 5_DCI0_CRC_SIZE = 55
-    {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0},	// 10_DCI0_CRC_SIZE = 59
-    {3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0}	// 20_DCI0_CRC_SIZE = 64
+  {3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
+  {3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
+  {3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
+  {3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0}  // 20_DCI0_CRC_SIZE = 64
 };
 
 //uint32_t EBSR_Level[63]={0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181};
@@ -95,7 +95,7 @@ const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
 
 uint32_t RRC_CONNECTION_FLAG;
 
-UE_MAC_INST *UE_mac_inst = NULL;	//[NB_MODULE_MAX];
+UE_MAC_INST *UE_mac_inst = NULL;  //[NB_MODULE_MAX];
 MAC_RLC_XFACE *Mac_rlc_xface;
 
 /// Primary component carrier index of eNB
@@ -103,16 +103,16 @@ int pCC_id[NUMBER_OF_eNB_MAX];
 
 
 
-eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB];	// eNBxUE = 8x8
-eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB];	// eNBxUE = 8x8
+eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
+eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
 
 
 #ifdef OPENAIR2
-unsigned char NB_eNB_INST = 0;
-uint16_t NB_UE_INST = 0;
-uint16_t NB_THREAD_INST = 0;
-unsigned char NB_RN_INST = 0;
-unsigned char NB_INST = 0;
+  unsigned char NB_eNB_INST = 0;
+  uint16_t NB_UE_INST = 0;
+  uint16_t NB_THREAD_INST = 0;
+  unsigned char NB_RN_INST = 0;
+  unsigned char NB_INST = 0;
 #endif
 
 
@@ -124,10 +124,8 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
 
 DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
 DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 DCI1C_5MHz_t MCCH_alloc_pdu;
-#endif
+
 
 DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
 
diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c
index 0dc11b0e45a4fa7f35c7964615065435e4794eeb..1f34ab3df2e4b2a7ff19523e06b3f824108ec762 100644
--- a/openair2/LAYER2/MAC/pre_processor.c
+++ b/openair2/LAYER2/MAC/pre_processor.c
@@ -127,10 +127,7 @@ store_dlsch_buffer(module_id_t Mod_id,
 
     for (lcid = 0; lcid < MAX_NUM_LCID; ++lcid) {    // loop over all the logical channels
       rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
-                                      ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0
-    #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                      ,0, 0
-    #endif
+                                      ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0,0, 0
                                      );
       UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer;    //storing the dlsch buffer for each logical channel
       UE_template->dl_pdus_in_buffer[lcid] = rlc_status.pdus_in_buffer;
@@ -141,8 +138,8 @@ store_dlsch_buffer(module_id_t Mod_id,
       UE_template->dl_buffer_head_sdu_is_segmented[lcid] = rlc_status.head_sdu_is_segmented;
       UE_template->dl_buffer_total += UE_template->dl_buffer_info[lcid];    //storing the total dlsch buffer
       UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[lcid];
+#ifdef DEBUG_eNB_SCHEDULER
 
-      #ifdef DEBUG_eNB_SCHEDULER
       /* note for dl_buffer_head_sdu_remaining_size_to_send[lcid] :
        * 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent
        */
@@ -155,8 +152,8 @@ store_dlsch_buffer(module_id_t Mod_id,
               UE_template->dl_buffer_head_sdu_creation_time[lcid],
               UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid],
               UE_template->dl_buffer_head_sdu_is_segmented[lcid]);
-      #endif
 
+#endif
     }
 
     if (UE_template->dl_buffer_total > 0)
@@ -280,8 +277,10 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
   for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
     cc = &RC.mac[Mod_id]->common_channels[CC_id];
     UE_id = find_UE_id(Mod_id, rnti);
+
     if(UE_id == -1)
-        continue;
+      continue;
+
     harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame,subframe);
     round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid];
 
@@ -295,7 +294,7 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
 
 int
 maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
-         sub_frame_t sched_subframe) {
+            sub_frame_t sched_subframe) {
   uint8_t round, round_max = 0, UE_id;
   int CC_id, harq_pid;
   UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
@@ -304,8 +303,10 @@ maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
   for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
     cc = &RC.mac[Mod_id]->common_channels[CC_id];
     UE_id = find_UE_id(Mod_id, rnti);
+
     if(UE_id == -1)
       continue;
+
     harq_pid = subframe2harqpid(cc, sched_frame, sched_subframe);
     round = UE_list->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid];
 
@@ -508,7 +509,6 @@ void sort_UEs(module_id_t Mod_idP,
   UE_sched_ctrl_t *UE_scheduling_control = NULL;
 
   for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
-
     UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
 
     /* Check CDRX configuration and if UE is in active time for this subframe */
@@ -763,11 +763,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
     uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
   int UE_id, CC_id;
   int i;
-
-  #ifdef TM5
+#ifdef TM5
   uint8_t transmission_mode;
-  #endif
-
+#endif
   uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
   int N_RBG[NFAPI_CC_MAX];
   UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
@@ -789,10 +787,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
     for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) {
       CC_id = UE_list->ordered_CCids[i][UE_id];
       nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id];
-
-      #ifdef TM5
+#ifdef TM5
       transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
-      #endif
+#endif
 
       if (nb_rbs_required[CC_id][UE_id] > 0)
         LOG_D(MAC,
@@ -817,8 +814,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
                                              rballoc_sub,
                                              slice_allocation_mask,
                                              MIMO_mode_indicator);
+#ifdef TM5
 
-      #ifdef TM5
       // data chanel TM5: to be revisited
       if ((round == 0) &&
           (transmission_mode == 5) &&
@@ -962,6 +959,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
                         ue_sched_ctl2->pre_nb_available_rbs
                         [CC_id] + 4;
                     }
+
                     break;
                   }
                 }
@@ -970,8 +968,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
           }
         }
       }
-      #endif
 
+#endif
     }
   }
 }
@@ -986,11 +984,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
     uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
   int UE_id, CC_id;
   int i;
-
-  #ifdef TM5
+#ifdef TM5
   uint8_t transmission_mode;
-  #endif
-
+#endif
   UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
   int N_RBG[NFAPI_CC_MAX];
   slice_info_t *sli = &RC.mac[Mod_id]->slice_info;
@@ -1018,9 +1014,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
       if (nb_rbs_remaining[CC_id][UE_id] < 0)
         abort();
 
-      #ifdef TM5
+#ifdef TM5
       transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
-      #endif
+#endif
 
       if (nb_rbs_required[CC_id][UE_id] > 0)
         LOG_D(MAC,
@@ -1045,8 +1041,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
                                              rballoc_sub,
                                              slice_allocation_mask,
                                              MIMO_mode_indicator);
+#ifdef TM5
 
-      #ifdef TM5
       // data chanel TM5: to be revisited
       if ((round == 0) &&
           (transmission_mode == 5) &&
@@ -1199,8 +1195,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
           }
         }
       }
-      #endif
 
+#endif
     }
   }
 }
@@ -1217,14 +1213,12 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
   uint8_t CC_id;
   uint16_t i, j;
   int min_rb_unit[NFAPI_CC_MAX];
-
   eNB_MAC_INST *eNB = RC.mac[Mod_id];
   slice_info_t *sli = &eNB->slice_info;
   uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB]  = sli->pre_processor_results[slice_idx].nb_rbs_required;
   uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_accounted;
   uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_remaining;
   uint8_t  (*MIMO_mode_indicator)[N_RBG_MAX]     = sli->pre_processor_results[slice_idx].MIMO_mode_indicator;
-
   UE_list_t *UE_list = &eNB->UE_list;
   UE_sched_ctrl_t *ue_sched_ctl;
   //  int rrc_status = RRC_IDLE;
@@ -1256,7 +1250,6 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
                      slice_idx,
                      frameP,
                      subframeP);
-
   // Calculate the number of RBs required by each UE on the basis of logical channel's buffer
   assign_rbs_required(Mod_id,
                       slice_idx,
@@ -1264,44 +1257,42 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
                       subframeP,
                       nb_rbs_required,
                       min_rb_unit);
-
   // Sorts the user on the basis of dlsch logical channel buffer and CQI
   sort_UEs(Mod_id,
            slice_idx,
            frameP,
            subframeP);
-
   // ACCOUNTING
   // This procedure decides the number of RBs to allocate
   dlsch_scheduler_pre_processor_accounting(Mod_id,
-                                           slice_idx,
-                                           frameP,
-                                           subframeP,
-                                           min_rb_unit,
-                                           nb_rbs_required,
-                                           nb_rbs_accounted);
+      slice_idx,
+      frameP,
+      subframeP,
+      min_rb_unit,
+      nb_rbs_required,
+      nb_rbs_accounted);
   // POSITIONING
   // This procedure does the main allocation of the RBs
   dlsch_scheduler_pre_processor_positioning(Mod_id,
-                                            slice_idx,
-                                            min_rb_unit,
-                                            nb_rbs_required,
-                                            nb_rbs_accounted,
-                                            nb_rbs_remaining,
-                                            rballoc_sub,
-                                            MIMO_mode_indicator);
+      slice_idx,
+      min_rb_unit,
+      nb_rbs_required,
+      nb_rbs_accounted,
+      nb_rbs_remaining,
+      rballoc_sub,
+      MIMO_mode_indicator);
 
   // SHARING
   // If there are available RBs left in the slice, allocate them to the highest priority UEs
   if (eNB->slice_info.intraslice_share_active) {
     dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id,
-                                                     slice_idx,
-                                                     min_rb_unit,
-                                                     nb_rbs_required,
-                                                     nb_rbs_accounted,
-                                                     nb_rbs_remaining,
-                                                     rballoc_sub,
-                                                     MIMO_mode_indicator);
+        slice_idx,
+        min_rb_unit,
+        nb_rbs_required,
+        nb_rbs_accounted,
+        nb_rbs_remaining,
+        rballoc_sub,
+        MIMO_mode_indicator);
   }
 
 #ifdef TM5
@@ -1333,8 +1324,8 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
     } else if (i3 == N_RBG && i1 == 0 && i2 == 0) {
       PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + 1;
     }
-    PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
 
+    PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
   }
 
 #endif
@@ -1689,10 +1680,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
   int N_RB_UL = 0;
   uint16_t available_rbs, first_rb_offset;
   rnti_t rntiTable[MAX_MOBILES_PER_ENB];
-
   // sort ues
   LOG_D(MAC, "In ulsch_preprocessor: sort ue \n");
-   sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
+  sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
   // maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB
   LOG_D(MAC, "In ulsch_preprocessor: assign max mcs min rb\n");
   assign_max_mcs_min_rb(module_idP, slice_idx, frameP, subframeP, first_rb);
@@ -1722,6 +1712,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
 
   // step 2: calculate the average rb per UE
   LOG_D(MAC, "In ulsch_preprocessor: step2 \n");
+
   for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
     if (UE_list->UE_template[CC_id][UE_id].rach_resource_type > 0) continue;
 
@@ -1781,7 +1772,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
   // step 3: assigne RBS
   for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
     // if (continueTable[UE_id]) continue;
-
     for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
       // This is the actual CC_id in the list
       CC_id = UE_list->ordered_ULCCids[n][UE_id];
@@ -1811,7 +1801,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
   // step 4: assigne the remaining RBs and set the pre_allocated rbs accordingly
   for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
     // if (continueTable[UE_id]) continue;
-
     ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
 
     for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
@@ -1897,9 +1886,10 @@ assign_max_mcs_min_rb(module_id_t module_idP,
       Ncp = eNB->common_channels[CC_id].Ncp;
       N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
       ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
-
       int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
+
       if (bytes_to_schedule < 0) bytes_to_schedule = 0;
+
       int bits_to_schedule = bytes_to_schedule * 8;
 
       // if this UE has UL traffic
@@ -2045,7 +2035,6 @@ void sort_ue_ul(module_id_t module_idP,
   UE_sched_ctrl_t *UE_scheduling_control = NULL;
 
   for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
-
     UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
 
     /* Check CDRX configuration and if UE is in active time for this subframe */
@@ -2056,6 +2045,7 @@ void sort_ue_ul(module_id_t module_idP,
     }
 
     rntiTable[i] = UE_RNTI(module_idP, i);
+
     // Valid element and is not the actual CC_id in the list
     if (UE_list->active[i] == TRUE &&
         rntiTable[i] != NOT_A_RNTI &&
@@ -2068,14 +2058,12 @@ void sort_ue_ul(module_id_t module_idP,
   qsort_r(list, list_size, sizeof(int), ue_ul_compare, &params);
 
   if (list_size) { // At mimimum one list element
-    
     for (int i = 0; i < list_size - 1; i++) {
       UE_list->next_ul[list[i]] = list[i + 1];
     }
 
     UE_list->next_ul[list[list_size - 1]] = -1;
     UE_list->head_ul = list[0];
-
   } else { // No element
     UE_list->head_ul = -1;
   }
diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c
index 70cee3e24bc26f41a600f6cb0d1083ae6508e501..b6bab6e3d72a684767465d0e52038b74fd079542 100644
--- a/openair2/LAYER2/MAC/ra_procedures.c
+++ b/openair2/LAYER2/MAC/ra_procedures.c
@@ -404,10 +404,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
         LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
             UE_mac_inst[module_idP].crnti,
             eNB_indexP, frameP, subframeP,
-            ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-            ,0, 0
-#endif
+            ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6,0, 0
                                                                               );
 
         if (UE_mac_inst[module_idP].crnti_before_ho)
@@ -424,11 +421,8 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
                 dcch_header_len);
 
         sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
-                                       (char *) &ulsch_buff[0]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                       ,0,
+                                       (char *) &ulsch_buff[0],0,
                                        0
-#endif
                                       );
 
         if(sdu_lengths > 0)
diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c
index 284c0af19e0a96c52466b821031c8eca895b8f33..44561a70111c29a527031d38a8ea3bd89780b2b5 100644
--- a/openair2/LAYER2/MAC/rar_tools.c
+++ b/openair2/LAYER2/MAC/rar_tools.c
@@ -49,66 +49,65 @@ extern RAN_CONTEXT_t RC;
 //------------------------------------------------------------------------------
 unsigned short
 fill_rar(const module_id_t module_idP,
-	 const int CC_id,
-	 RA_t * ra,
-	 const frame_t frameP,
-	 uint8_t * const dlsch_buffer,
-	 const uint16_t N_RB_UL, const uint8_t input_buffer_length)
+         const int CC_id,
+         RA_t *ra,
+         const frame_t frameP,
+         uint8_t *const dlsch_buffer,
+         const uint16_t N_RB_UL, const uint8_t input_buffer_length)
 //------------------------------------------------------------------------------
 {
-
-    RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
-    uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
-
-
-    // subheader fixed
-    rarh->E = 0;		// First and last RAR
-    rarh->T = 1;		// 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
-    rarh->RAPID = ra->preamble_index;	// Respond to Preamble 0 only for the moment
-    rar[4] = (uint8_t) (ra->rnti >> 8);
-    rar[5] = (uint8_t) (ra->rnti & 0xff);
-    //ra->timing_offset = 0;
-    ra->timing_offset /= 16;	//T_A = N_TA/16, where N_TA should be on a 30.72Msps
-    rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4));	// 7 MSBs of timing advance + divide by 4
-    rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0;	// 4 LSBs of timing advance + divide by 4
-    COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
-    if(N_RB_UL == 25){
-      ra->msg3_first_rb = 1;
-    }else{
-      if (cc->tdd_Config && N_RB_UL == 100) {
-        ra->msg3_first_rb = 3;
-      } else {
-        ra->msg3_first_rb = 2;
-      }
-    }
-    ra->msg3_nb_rb = 1;
-    uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb);	// first PRB only for UL Grant
-    rar[1] |= (rballoc >> 7) & 7;	// Hopping = 0 (bit 3), 3 MSBs of rballoc
-    rar[2] = ((uint8_t) (rballoc & 0xff)) << 1;	// 7 LSBs of rballoc
-    ra->msg3_mcs = 10;
-    ra->msg3_TPC = 3;
-    ra->msg3_ULdelay = 0;
-    ra->msg3_cqireq = 0;
-    ra->msg3_round = 0;
-    rar[2] |= ((ra->msg3_mcs & 0x8) >> 3);	// mcs 10
-    rar[3] =
-	(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
-	((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
-
-    if (opt_enabled) {
-	trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, module_idP,  WS_RA_RNTI , 1,
-		  RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
-		  0, 0);
-	LOG_D(OPT,
-	      "[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and  rapid %d size %d\n",
-	      module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
-	      input_buffer_length);
+  RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
+  uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
+  // subheader fixed
+  rarh->E = 0;    // First and last RAR
+  rarh->T = 1;    // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
+  rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
+  rar[4] = (uint8_t) (ra->rnti >> 8);
+  rar[5] = (uint8_t) (ra->rnti & 0xff);
+  //ra->timing_offset = 0;
+  ra->timing_offset /= 16;  //T_A = N_TA/16, where N_TA should be on a 30.72Msps
+  rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4));  // 7 MSBs of timing advance + divide by 4
+  rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
+  COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
+
+  if(N_RB_UL == 25) {
+    ra->msg3_first_rb = 1;
+  } else {
+    if (cc->tdd_Config && N_RB_UL == 100) {
+      ra->msg3_first_rb = 3;
+    } else {
+      ra->msg3_first_rb = 2;
     }
+  }
+
+  ra->msg3_nb_rb = 1;
+  uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb);  // first PRB only for UL Grant
+  rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
+  rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
+  ra->msg3_mcs = 10;
+  ra->msg3_TPC = 3;
+  ra->msg3_ULdelay = 0;
+  ra->msg3_cqireq = 0;
+  ra->msg3_round = 0;
+  rar[2] |= ((ra->msg3_mcs & 0x8) >> 3);  // mcs 10
+  rar[3] =
+    (((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
+    ((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
 
-    return (ra->rnti);
+  if (opt_enabled) {
+    trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP,  WS_RA_RNTI, 1,
+              RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
+              0, 0);
+    LOG_D(OPT,
+          "[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and  rapid %d size %d\n",
+          module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
+          input_buffer_length);
+  }
+
+  return (ra->rnti);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 //------------------------------------------------------------------------------
 /*
  * Fill the RAR buffer (header + PDU) for LTE-M devices
@@ -118,14 +117,13 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
                            RA_t *ra,
                            const frame_t frameP,
                            const sub_frame_t subframeP,
-                           uint8_t* const dlsch_buffer,
+                           uint8_t *const dlsch_buffer,
                            const uint8_t ce_level)
 //------------------------------------------------------------------------------
 {
   RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
   COMMON_channels_t *cc = &eNB->common_channels[CC_id];
   uint8_t *rar = (uint8_t *)(dlsch_buffer + 1);
-
   uint32_t rballoc = 0;
   uint32_t reps = 0;
   uint32_t ULdelay = 0;
@@ -134,30 +132,24 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
   uint32_t TPC = 0;
   int input_buffer_length = 0;
   int N_NB_index = 0;
-
   AssertFatal(ra != NULL, "RA is null \n");
-  
   /* Subheader fixed */
-  rarh->E = 0;		// First and last RAR
-  rarh->T = 1;		// 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
-  rarh->RAPID = ra->preamble_index;	// Respond to Preamble
-
+  rarh->E = 0;    // First and last RAR
+  rarh->T = 1;    // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
+  rarh->RAPID = ra->preamble_index; // Respond to Preamble
   /* RAR PDU */
   /* TA Command */
-  ra->timing_offset /= 16;	// T_A = N_TA/16, where N_TA should be on a 30.72Msps
-  rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f;	// 7 MSBs of timing advance
-  rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4;	// 4 LSBs of timing advance
-  
+  ra->timing_offset /= 16;  // T_A = N_TA/16, where N_TA should be on a 30.72Msps
+  rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
+  rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
   /* Copy the Msg2 narrowband */
   ra->msg34_narrowband = ra->msg2_narrowband;
   ra->msg3_first_rb    = 0;
   ra->msg3_nb_rb       = 2;
 
-  if (ce_level < 2) {	// CE Level 0, 1 (CEmodeA)
+  if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
     input_buffer_length = 6;
-    
     N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
-
     /* UL Grant */
     reps = 0;
     ra->msg3_mcs = 7;
@@ -166,7 +158,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
     cqireq = 0;
     mpdcch_nb_index = 0;
     rballoc = mac_computeRIV(6, ra->msg3_first_rb, ra->msg3_nb_rb);
-
     uint32_t buffer = 0;
     buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
     buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
@@ -176,21 +167,15 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
     buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
     buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index)));
     buffer |= (mpdcch_nb_index << (4 - N_NB_index));
-
     rar[1] |= (uint8_t) (buffer >> 16) & 0x0F;
     rar[2] = (uint8_t) (buffer >> 8) & 0xFF;
     rar[3] = (uint8_t) buffer & 0xFF;
-
     /* RA CRNTI */
     rar[4] = (uint8_t)(ra->rnti >> 8);
     rar[5] = (uint8_t)(ra->rnti & 0xff);
-  
   } else { // CE level 2, 3 (CEModeB)
-
     AssertFatal(1 == 0, "Shouldn't get here ...\n");
-
     input_buffer_length = 5;
-
     rar[3] = (uint8_t)(ra->rnti >> 8);
     rar[4] = (uint8_t)(ra->rnti & 0xff);
   }
@@ -198,7 +183,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
   LOG_I(MAC, "[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x, preamble %d/%d, TIMING OFFSET %d\n",
         frameP,
         subframeP,
-        *(uint8_t*) rarh,
+        *(uint8_t *) rarh,
         rar[0],
         rar[1],
         rar[2],
@@ -212,25 +197,23 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
         ra->timing_offset);
 
   if (opt_enabled) {
-    trace_pdu(DIRECTION_DOWNLINK, 
-              dlsch_buffer, 
-              input_buffer_length, 
-              eNB->Mod_id,  
-              WS_RA_RNTI, 
-              1, 
-              eNB->frame, 
-              eNB->subframe, 
-              0, 
+    trace_pdu(DIRECTION_DOWNLINK,
+              dlsch_buffer,
+              input_buffer_length,
+              eNB->Mod_id,
+              WS_RA_RNTI,
+              1,
+              eNB->frame,
+              eNB->subframe,
+              0,
               0);
-
     LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
-	        frameP, 
-          ra->rnti, 
-          rarh->RAPID, 
+          frameP,
+          ra->rnti,
+          rarh->RAPID,
           input_buffer_length);
   }
 
   return (ra->rnti);
 }
-#endif
 
diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c
index 3089438a0ee8b971540df9fe120a947a97a78ac0..504faabef53eaac94989f647e832fb82a574b81a 100644
--- a/openair2/LAYER2/MAC/ue_procedures.c
+++ b/openair2/LAYER2/MAC/ue_procedures.c
@@ -163,15 +163,6 @@ void ue_init_mac(module_id_t module_idP) {
     tx_request_pdu_list = NULL;
     tx_req_num_elems = 0;
   }
-
-#ifdef CBA
-
-  for (i = 0; i < NUM_MAX_CBA_GROUP; i++) {
-    UE_mac_inst[module_idP].cba_last_access[i] =
-      round(uniform_rngen(1, 30));
-  }
-
-#endif
 }
 
 
@@ -595,44 +586,40 @@ ue_send_sdu(module_id_t module_idP,
 #endif
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-void
-ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
-            uint8_t eNB_index, void *pdu, uint16_t len)
-{
+void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
+                       uint8_t eNB_index, void *pdu, uint16_t len) {
 #if UE_TIMING_TRACE
-    start_meas(&UE_mac_inst[module_idP].rx_si);
+  start_meas(&UE_mac_inst[module_idP].rx_si);
 #endif
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
-       (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
-
-    LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
-         module_idP, frameP, BCCH, len);
-
-    mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0,  // unknown subframe
-                    SI_RNTI,
-                    BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
-                    0);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
-       (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
+  (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
+  LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
+        module_idP, frameP, BCCH, len);
+  mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0,  // unknown subframe
+                      SI_RNTI,
+                      BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
+                      0);
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
+  (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
 #if UE_TIMING_TRACE
-    stop_meas(&UE_mac_inst[module_idP].rx_si);
+  stop_meas(&UE_mac_inst[module_idP].rx_si);
 #endif
-    if (opt_enabled == 1) {
-       trace_pdu(DIRECTION_UPLINK,
-                 (uint8_t *) pdu,
-                 len,
-                 module_idP,
-                 WS_SI_RNTI,
-                 0xffff,
-                 UE_mac_inst[module_idP].rxFrame,
-                 UE_mac_inst[module_idP].rxSubframe, 0, 0);
-       LOG_D(OPT,
-             "[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
-             module_idP, frameP, CC_id, 0xffff, len);
-    }
+
+  if (opt_enabled == 1) {
+    trace_pdu(DIRECTION_UPLINK,
+              (uint8_t *) pdu,
+              len,
+              module_idP,
+              WS_SI_RNTI,
+              0xffff,
+              UE_mac_inst[module_idP].rxFrame,
+              UE_mac_inst[module_idP].rxSubframe, 0, 0);
+    LOG_D(OPT,
+          "[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
+          module_idP, frameP, CC_id, 0xffff, len);
+  }
 }
-#endif
+
 
 void
 ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
@@ -705,7 +692,6 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
   }
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 unsigned char *parse_mch_header(unsigned char *mac_header,
                                 unsigned char *num_sdu,
                                 unsigned char *rx_lcids,
@@ -1571,8 +1557,6 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
   }
 }
 
-#endif
-
 unsigned char
 generate_ulsch_header(uint8_t *mac_header,
                       uint8_t num_sdus,
@@ -1894,27 +1878,6 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
 #endif
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
   (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_IN);
-#ifdef CBA
-
-  if (*access_mode == CBA_ACCESS) {
-    LOG_D(MAC, "[UE %d] frameP %d subframe %d try CBA transmission\n",
-          module_idP, frameP, subframe);
-
-    //if (UE_mac_inst[module_idP].scheduling_info.LCID_status[DTCH] == LCID_EMPTY)
-    if (cba_access(module_idP, frameP, subframe, eNB_index, buflen) ==
-        0) {
-      *access_mode = POSTPONED_ACCESS;
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
-      (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_OUT);
-      return;
-    }
-
-    LOG_I(MAC,
-          "[UE %d] frameP %d subframe %d CBA transmission oppurtunity, tbs %d\n",
-          module_idP, frameP, subframe, buflen);
-  }
-
-#endif
   bsr_header_len = 0;
   phr_header_len = 1;   //sizeof(SCH_SUBHEADER_FIXED);
 
@@ -2067,11 +2030,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
                                 MBMS_FLAG_NO,
                                 lcid,
                                 buflen_remain,
-                                (char *)&ulsch_buff[sdu_length_total]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,0,
+                                (char *)&ulsch_buff[sdu_length_total],0,
                                 0
-#endif
                                                 );
         AssertFatal(buflen_remain >= sdu_lengths[num_sdus],
                     "LCID=%d RLC has segmented %d bytes but MAC has max=%d\n",
@@ -2820,160 +2780,6 @@ ue_scheduler(const module_id_t module_idP,
 }
 
 // to be improved
-#ifdef CBA
-extern int cba_backoff;
-double uniform_rngen(int min, int max) {
-  double random = (double) taus() / ((double) 0xffffffff);
-  return (max - min) * random + min;
-}
-
-int
-cba_access(module_id_t module_idP, frame_t frameP,
-           sub_frame_t subframe, uint8_t eNB_index, uint16_t buflen) {
-  mac_rlc_status_resp_t rlc_status;
-  int header_offset = 4;
-  int rv = 0;
-
-  /*
-     if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
-     //  && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
-     && (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) { // backoff
-     //  LOG_D(MAC,"[UE %d] Frame %d Subframe %d: the current CBA backoff is %d \n", module_idP, frameP, subframe,
-     //  UE_mac_inst[module_idP].cba_last_access[0] );
-
-     UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,40));
-     LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff  %d UL active state %d \n", module_idP, frameP, subframe,
-     UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
-
-     rv=1;
-     } else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 ))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 ))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
-     // && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
-     && (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
-
-     UE_mac_inst[module_idP].cba_last_access[0]-=1;
-     LOG_D(MAC,"[UE %d] Frame %d Subframe %d: CBA backoff is decreased by one to %d UL active state %d \n",
-     module_idP, frameP, subframe,
-     UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
-
-     } else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] == 0 ))   &&
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] == 0 ))   &&
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] ==  0 )) )
-     && (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
-     UE_mac_inst[module_idP].cba_last_access[0]-=1;
-     } */
-
-  if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] > 0)
-      && (UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] < 64)) {
-    return 0;
-  }
-
-  if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] <= 0) &&
-      (UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] <= 0) &&
-      (UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] <= 0)) {
-    return 0;
-  }
-
-  if (cba_backoff == 0) { // apply probablisitc method
-    UE_mac_inst[module_idP].cba_last_access[0] = uniform_rngen(0, 1);
-
-    if (uniform_rngen(0, 1) > 0.6) {
-      LOG_I(MAC,
-            "[UE %d] Frame %d Subframe %d: CBA probability-based backoff (%d), UL active state %d \n",
-            module_idP, frameP, subframe, cba_backoff,
-            UE_mac_inst[module_idP].ul_active);
-      rv = 1;
-    }
-  } else {
-    if (UE_mac_inst[module_idP].cba_last_access[0] <= 0) {
-      UE_mac_inst[module_idP].cba_last_access[0] =
-        round(uniform_rngen(1, cba_backoff));
-      LOG_I(MAC,
-            "[UE %d] Frame %d Subframe %d: start a new CBA backoff  %d/%d UL active state %d \n",
-            module_idP, frameP, subframe,
-            UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,
-            UE_mac_inst[module_idP].ul_active);
-      rv = 1;
-      /*
-         rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
-         DTCH,
-         0);
-
-         if ((
-         //  (rlc_status.pdus_in_buffer > 0 )           &&
-         // (UE_mac_inst[module_idP].ul_active == 0)  && // check if the ul is acrtive
-         (rlc_status.head_sdu_is_segmented  == 0 )          &&
-         ((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
-         )){
-         rv = 1;
-
-         UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
-         LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff  %d UL active state %d \n", module_idP, frameP, subframe,
-         UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
-       */
-    } else {
-      UE_mac_inst[module_idP].cba_last_access[0] -= 1;
-      LOG_D(MAC,
-            "[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
-            module_idP, frameP, subframe,
-            UE_mac_inst[module_idP].cba_last_access[0],
-            UE_mac_inst[module_idP].ul_active);
-    }
-  }
-
-  return rv;
-  /*
-     if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
-     //  && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
-     && (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) {
-
-     UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,cba_backoff));
-
-     LOG_I(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff  %d/%d UL active state %d \n", module_idP, frameP, subframe,
-     UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,UE_mac_inst[module_idP].ul_active);
-
-     rv = 1;
-
-     rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
-     DTCH,
-     0);
-
-     if ((
-     // (rlc_status.pdus_in_buffer > 0 )           &&
-     // (UE_mac_inst[module_idP].ul_active == 0)  && // check if the ul is acrtive
-     (rlc_status.head_sdu_is_segmented  == 0 )          &&
-     ((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
-     )){
-     rv = 1;
-
-     UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
-     LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff  %d UL active state %d \n", module_idP, frameP, subframe,
-     UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
-     } else
-     UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,5));
-
-
-     } else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 ))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 ))   ||
-     ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
-     // && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
-     && (UE_mac_inst[module_idP].cba_last_access[0]> 0) )
-     {
-
-     UE_mac_inst[module_idP].cba_last_access[0]-=1;
-     LOG_D(MAC,"[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
-     module_idP, frameP, subframe,
-     UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
-     }
-     }
-   */
-}
-#endif
 
 
 boolean_t
@@ -3019,10 +2825,8 @@ update_bsr(module_id_t module_idP, frame_t frameP,
 
       rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
                                       lcid,
-                                      0xFFFF //TBS is not used in RLC at this step, set a special value for debug
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                      ,0, 0
-#endif
+                                      0xFFFF, //TBS is not used in RLC at this step, set a special value for debug
+                                      0, 0
                                      );
       lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
 
@@ -3421,11 +3225,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
                                     MBMS_FLAG_NO,
                                     ue->slsch_lcid,
                                     req,
-                                    (char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                    ,ue->sourceL2Id,
+                                    (char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG)),
+                                    ue->sourceL2Id,
                                     ue->destinationL2Id
-#endif
                                    );
 
       // Notes: 1. hard-coded to 24-bit destination format for now
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index f9cddb432799d422dfb61ccd791ec0ec5091113b..ec212078dd89aa16eb30721626858bc44f7d54a8 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -268,13 +268,8 @@ int8_t nr_ue_decode_mib(
 	    
         uint32_t is_condition_A = (ssb_subcarrier_offset == 0);   //  38.213 ch.13
         frequency_range_t frequency_range = FR1;
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
         uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero);
         uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
-#else
-        uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1 >> 4) & 0xf;
-        uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1 & 0xf);
-#endif
         int32_t num_rbs = -1;
         int32_t num_symbols = -1;
         int32_t rb_offset = -1;
@@ -590,11 +585,7 @@ int8_t nr_ue_decode_mib(
 	    mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
 	    mac->phy_config.config_req.pbch_config.ssb_subcarrier_offset = ssb_subcarrier_offset;  //  after calculation
 	    mac->phy_config.config_req.pbch_config.dmrs_type_a_position = mac->mib->dmrs_TypeA_Position;
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
 	    mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero) * 16 + (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
-#else
-	    mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = mac->mib->pdcch_ConfigSIB1;
-#endif
 	    mac->phy_config.config_req.pbch_config.cell_barred = mac->mib->cellBarred;
 	    mac->phy_config.config_req.pbch_config.intra_frequency_reselection = mac->mib->intraFreqReselection;
 	    mac->phy_config.config_req.pbch_config.half_frame_bit = half_frame_bit;
diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c
index 42a2111e68c5c09012511d345494505a8772a272..438dd24ecfeffa13cc1359325801dde87ec20340 100644
--- a/openair2/LAYER2/NR_MAC_gNB/config.c
+++ b/openair2/LAYER2/NR_MAC_gNB/config.c
@@ -174,11 +174,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
                mib->message.choice.mib->subCarrierSpacingCommon,
                mib->message.choice.mib->ssb_SubcarrierOffset,
                mib->message.choice.mib->dmrs_TypeA_Position,
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero,
-#else
-               mib->message.choice.mib->pdcch_ConfigSIB1,
-#endif
                mib->message.choice.mib->cellBarred,
                mib->message.choice.mib->intraFreqReselection
                );
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
index 83567e310a58f80db25fc10d2db9a69ace7842e3..8d741c1bb5412c6cb54fd2e56403b8c341c41a35 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
@@ -46,10 +46,9 @@
 #include "LTE_DRB-ToAddModList.h"
 #include "LTE_SRB-ToAddMod.h"
 #include "LTE_SRB-ToAddModList.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  #include "LTE_MBMS-SessionInfoList-r9.h"
-  #include "LTE_PMCH-InfoList-r9.h"
-#endif
+#include "LTE_MBMS-SessionInfoList-r9.h"
+#include "LTE_PMCH-InfoList-r9.h"
+
 
 typedef rlc_op_status_t  (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
     const srb_flag_t, const MBMS_flag_t,
@@ -220,12 +219,11 @@ typedef struct pdcp_s {
 
 } pdcp_t;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 typedef struct pdcp_mbms_s {
   boolean_t instanciated_instance;
   rb_id_t   rb_id;
 } pdcp_mbms_t;
-#endif
+
 /*
  * Following symbolic constant alters the behaviour of PDCP
  * and makes it linked to PDCP test code under targets/TEST/PDCP/
@@ -256,11 +254,9 @@ boolean_t pdcp_data_req(
   const confirm_t confirmP, \
   const sdu_size_t sdu_buffer_size,
   unsigned char *const sdu_buffer,
-  const pdcp_transmission_mode_t mode
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t *const sourceL2Id
-  ,const uint32_t *const destinationL2Id
-#endif
+  const pdcp_transmission_mode_t mode,
+  const uint32_t *const sourceL2Id,
+  const uint32_t *const destinationL2Id
 );
 
 /*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
@@ -323,11 +319,9 @@ boolean_t rrc_pdcp_config_asn1_req (
   const uint8_t                   security_modeP,
   uint8_t                  *const kRRCenc,
   uint8_t                  *const kRRCint,
-  uint8_t                  *const kUPenc
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  ,LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9
-#endif
-  ,rb_id_t                 *const defaultDRB
+  uint8_t                  *const kUPenc,
+  LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9,
+  rb_id_t                 *const defaultDRB
 );
 
 /*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t  action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
@@ -427,10 +421,8 @@ typedef struct pdcp_data_req_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_req_header_t;
 
 typedef struct pdcp_data_ind_header_s {
@@ -438,10 +430,8 @@ typedef struct pdcp_data_ind_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   dummy_traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_ind_header_t;
 
 struct pdcp_netlink_element_s {
@@ -452,7 +442,6 @@ struct pdcp_netlink_element_s {
 };
 
 //TTN for D2D (PC5S)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 #define PDCP_SOCKET_PORT_NO 9999 //temporary value
 #define PC5_SIGNALLING_PAYLOAD_SIZE   100  //should be updated with a correct value
 int pdcp_pc5_sockfd;
@@ -485,8 +474,6 @@ typedef struct {
 } __attribute__((__packed__)) sidelink_pc5s_element;
 
 
-#endif
-
 /*
  * PDCP limit values
  */
@@ -511,10 +498,10 @@ pdcp_stats_t              eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
 rnti_t                 pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
 rnti_t                 pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
 unsigned int           pdcp_eNB_UE_instance_to_rnti_index;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  pdcp_mbms_t               pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH];   // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
-  pdcp_mbms_t               pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
-#endif
+
+pdcp_mbms_t               pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH];   // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
+pdcp_mbms_t               pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
+
 sdu_size_t             pdcp_output_sdu_bytes_to_write;
 sdu_size_t             pdcp_output_header_bytes_to_write;
 list_t                 pdcp_sdu_list;
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h
index 676ece7b3a1863eeeae9bb15323ff7aa7cacce44..b9f62acc3c96b91eb14b462196eeb7d18e2a1607 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h
@@ -35,34 +35,30 @@
 #    include "mem_block.h"
 
 #ifdef ROHC
-extern void     pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP);
-extern void     pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
-extern void     send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
+extern void     pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP);
+extern void     pdcp_data_req (struct pdcp_entity *pdcpP, mem_block *sduP);
+extern void     send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
 extern void     control_pdcp (struct pdcp_entity *pdcpP);
 extern void pdcp_process_input_sdus_high(struct pdcp_entity *pdcpP);
-extern void     pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
-extern void     pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
-extern void   pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block * sduP, uint16_t data_sizeP,  uint16_t rb_idP);
-extern void     pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
-extern void     pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
+extern void     pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
+extern void     pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
+extern void   pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block *sduP, uint16_t data_sizeP,  uint16_t rb_idP);
+extern void     pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
+extern void     pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
 extern void     init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
-extern void    *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
+extern void    *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
 extern int  reception_from_rohc_mt(void);
 extern int  reception_from_rohc_bs(void);
 #else
-extern BOOL     pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
-extern BOOL     pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
-                               uint8_t is_data_pdu
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,const uint32_t * const sourceL2Id
-                               ,const uint32_t * const destinationL2Id
-#endif
-                               );
+extern BOOL     pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP, uint8_t is_data_plane);
+extern BOOL     pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char *sdu_buffer,
+                               uint8_t is_data_pdu,const uint32_t *const sourceL2Id,const uint32_t *const destinationL2Id
+                              );
 //extern BOOL     pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
-extern void     send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
+extern void     send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
 extern void     control_pdcp (struct pdcp_entity *pdcpP);
 extern void     pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP);
-extern void     pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
+extern void     pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
 extern void     pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP);
 extern void     pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
 extern void     init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
diff --git a/openair2/LAYER2/PROTO_AGENT/cu_test.c b/openair2/LAYER2/PROTO_AGENT/cu_test.c
index 78467d68f0a88b38c7d9d4f0df247931146b2ecb..a26b06dd413299037cbd5fbf90d2cb849e23a189 100644
--- a/openair2/LAYER2/PROTO_AGENT/cu_test.c
+++ b/openair2/LAYER2/PROTO_AGENT/cu_test.c
@@ -12,28 +12,25 @@
 int recv_client = 0;
 FILE *output;
 
-void usage(char *prg_name)
-{
+void usage(char *prg_name) {
   fprintf(stderr, "usage: %s <file or ->\n", prg_name);
   fprintf(stderr, " - is stdin\n");
   fprintf(stderr, " received packets are written to stdout\n");
 }
 
-long uelapsed(struct timeval *s, struct timeval *e)
-{
+long uelapsed(struct timeval *s, struct timeval *e) {
   return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
 }
 
 boolean_t
 pdcp_data_ind(
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t   srb_flagP,
   const MBMS_flag_t  MBMS_flagP,
   const rb_id_t      rb_idP,
   const sdu_size_t   sdu_buffer_sizeP,
-  mem_block_t* const sdu_buffer_pP
-)
-{
+  mem_block_t *const sdu_buffer_pP
+) {
   fwrite(sdu_buffer_pP->data, sdu_buffer_sizeP, 1, stdout);
   fflush(stdout);
   free_mem_block(sdu_buffer_pP, __func__);
@@ -43,20 +40,17 @@ pdcp_data_ind(
   return 0;
 }
 
-void close_proto_agent(void)
-{
+void close_proto_agent(void) {
   proto_agent_stop(0);
 }
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
   const cudu_params_t params = {
     .local_ipv4_address = "192.168.12.45",
     .local_port = 6464,
     .remote_ipv4_address = "192.168.12.45",
     .remote_port = 6465
   };
-
   protocol_ctxt_t p;
   memset(&p, 0, sizeof p);
   mem_block_t mem;
@@ -75,31 +69,36 @@ int main(int argc, char *argv[])
   } else {
     f = fopen(argv[1], "r");
   }
+
   if (!f) {
     fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
     return 2;
   }
 
   pool_buffer_init();
+
   if (proto_agent_start(0, &params) != 0) {
     fprintf(stderr, "error on proto_agent_start()\n");
     fclose(f);
     return 3;
   }
+
   atexit(close_proto_agent);
 
   /* wait for first packet of client */
   while (!recv_client) sleep(1);
-  fprintf(stderr, "reading file\n");
 
+  fprintf(stderr, "reading file\n");
   /* now send back at the same time */
   gettimeofday(&t_start, NULL);
+
   while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
     usleep(10);
     totsize += size;
     mem.data = &s[0];
     proto_agent_send_rlc_data_req(&p, 0, 0, 0, 0, 0, size, &mem);
   }
+
   gettimeofday(&t_end, NULL);
   fclose(f);
   long us = uelapsed(&t_start, &t_end);
@@ -107,7 +106,6 @@ int main(int argc, char *argv[])
           totsize, us / 1000, ((float) totsize ) / us,
           ((float) totsize) / us * 8);
   fprintf(stderr, "check files using 'diff afile bfile'\n");
-
   /* give some time in case the other direction is slower */
   sleep(5);
   return 0;
@@ -119,20 +117,17 @@ int main(int argc, char *argv[])
  *********************************************************
  */
 
-rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxt_pP,
+rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
                                   const srb_flag_t   srb_flagP,
                                   const MBMS_flag_t  MBMS_flagP,
                                   const rb_id_t      rb_idP,
                                   const mui_t        muiP,
                                   confirm_t    confirmP,
                                   sdu_size_t   sdu_sizeP,
-                                  mem_block_t *sdu_pP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                  ,const uint32_t * const sourceL2Id
-                                  ,const uint32_t * const destinationL2Id
-#endif
-                                  )
-{
+                                  mem_block_t *sdu_pP,
+                                  const uint32_t *const sourceL2Id,
+                                  const uint32_t *const destinationL2Id
+                                 ) {
   fprintf(stderr, "This should never be called on the CU\n");
   exit(1);
 }
@@ -141,18 +136,21 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
   pthread_t t;
   pthread_attr_t att;
 
-  if (pthread_attr_init(&att)){
+  if (pthread_attr_init(&att)) {
     fprintf(stderr, "pthread_attr_init err\n");
     exit(1);
   }
+
   if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
     fprintf(stderr, "pthread_attr_setdetachstate err\n");
     exit(1);
   }
+
   if (pthread_create(&t, &att, f, b)) {
     fprintf(stderr, "pthread_create err\n");
     exit(1);
   }
+
   if (pthread_attr_destroy(&att)) {
     fprintf(stderr, "pthread_attr_destroy err\n");
     exit(1);
@@ -161,17 +159,14 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
   return t;
 }
 
-int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format)
-{
+int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
   return 0;
 }
 
-int config_get(paramdef_t *params,int numparams, char *prefix)
-{
+int config_get(paramdef_t *params,int numparams, char *prefix) {
   return 0;
 }
 
-int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
-{
+int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
   return 0;
 }
diff --git a/openair2/LAYER2/PROTO_AGENT/du_test.c b/openair2/LAYER2/PROTO_AGENT/du_test.c
index 9ff7662ab1884c8df1f8266cf3304a3877da7c8f..ee622984387d17eae2159680592d38649049dc66 100644
--- a/openair2/LAYER2/PROTO_AGENT/du_test.c
+++ b/openair2/LAYER2/PROTO_AGENT/du_test.c
@@ -10,33 +10,28 @@
 
 #define BUF_MAX 1400
 
-void usage(char *prg_name)
-{
+void usage(char *prg_name) {
   fprintf(stderr, "usage: %s <file or ->\n", prg_name);
   fprintf(stderr, " - is stdin\n");
   fprintf(stderr, " received packets are written to stdout\n");
 }
 
-long uelapsed(struct timeval *s, struct timeval *e)
-{
+long uelapsed(struct timeval *s, struct timeval *e) {
   return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
 }
 
 
-rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxt_pP,
+rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
                                   const srb_flag_t   srb_flagP,
                                   const MBMS_flag_t  MBMS_flagP,
                                   const rb_id_t      rb_idP,
                                   const mui_t        muiP,
                                   confirm_t    confirmP,
                                   sdu_size_t   sdu_sizeP,
-                                  mem_block_t *sdu_pP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                  ,const uint32_t * const sourceL2Id
-                                  ,const uint32_t * const destinationL2Id
-#endif
-                                  )
-{
+                                  mem_block_t *sdu_pP,
+                                  const uint32_t *const sourceL2Id,
+                                  const uint32_t *const destinationL2Id
+                                 ) {
   fwrite(sdu_pP->data, sdu_sizeP, 1, stdout);
   fflush(stdout);
   free_mem_block(sdu_pP, __func__);
@@ -44,20 +39,17 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxt_pP,
   return 0;
 }
 
-void close_proto_agent(void)
-{
+void close_proto_agent(void) {
   proto_agent_stop(0);
 }
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
   const cudu_params_t params = {
     .local_ipv4_address = "192.168.12.45",
     .local_port = 6465,
     .remote_ipv4_address = "192.168.12.45",
     .remote_port = 6464
   };
-
   protocol_ctxt_t p;
   memset(&p, 0, sizeof p);
   mem_block_t mem;
@@ -76,26 +68,30 @@ int main(int argc, char *argv[])
   } else {
     f = fopen(argv[1], "r");
   }
+
   if (!f) {
     fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
     return 2;
   }
 
   pool_buffer_init();
+
   if (proto_agent_start(0, &params) != 0) {
     fprintf(stderr, "error on proto_agent_start()\n");
     fclose(f);
     return 3;
   }
-  atexit(close_proto_agent);
 
+  atexit(close_proto_agent);
   gettimeofday(&t_start, NULL);
+
   while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
     usleep(10);
     totsize += size;
     mem.data = &s[0];
     proto_agent_send_pdcp_data_ind(&p, 0, 0, 0, size, &mem);
   }
+
   gettimeofday(&t_end, NULL);
   fclose(f);
   long us = uelapsed(&t_start, &t_end);
@@ -103,7 +99,6 @@ int main(int argc, char *argv[])
           totsize, us / 1000, ((float) totsize ) / us,
           ((float) totsize) / us * 8);
   fprintf(stderr, "check files using 'diff afile bfile'\n");
-
   /* wait, we are possibly receiving data */
   sleep(5);
   return 0;
@@ -117,14 +112,13 @@ int main(int argc, char *argv[])
 
 boolean_t
 pdcp_data_ind(
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t   srb_flagP,
   const MBMS_flag_t  MBMS_flagP,
   const rb_id_t      rb_idP,
   const sdu_size_t   sdu_buffer_sizeP,
-  mem_block_t* const sdu_buffer_pP
-)
-{
+  mem_block_t *const sdu_buffer_pP
+) {
   fprintf(stderr, "This should never be called on the DU\n");
   exit(1);
 }
@@ -133,18 +127,21 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
   pthread_t t;
   pthread_attr_t att;
 
-  if (pthread_attr_init(&att)){
+  if (pthread_attr_init(&att)) {
     fprintf(stderr, "pthread_attr_init err\n");
     exit(1);
   }
+
   if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
     fprintf(stderr, "pthread_attr_setdetachstate err\n");
     exit(1);
   }
+
   if (pthread_create(&t, &att, f, b)) {
     fprintf(stderr, "pthread_create err\n");
     exit(1);
   }
+
   if (pthread_attr_destroy(&att)) {
     fprintf(stderr, "pthread_attr_destroy err\n");
     exit(1);
@@ -153,17 +150,14 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
   return t;
 }
 
-int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format)
-{
+int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
   return 0;
 }
 
-int config_get(paramdef_t *params,int numparams, char *prefix)
-{
+int config_get(paramdef_t *params,int numparams, char *prefix) {
   return 0;
 }
 
-int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
-{
+int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
   return 0;
 }
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
index 835686fab1f55ec0b055ff04be07a23a48d06996..02e1b63129668e97eb6dae7a98ee0990be15f499 100644
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
+++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
@@ -51,8 +51,7 @@
  */
 
 // Function to fill in the dl_data header (32bits) with the appropriate fields (doing bitwise operations)
-void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header)
-{
+void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header) {
   uint32_t type = pdu_type;
   uint32_t spare_ = spare;
   uint32_t seq = seq_no;
@@ -65,8 +64,7 @@ void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header)
 
 
 // Function to retrieve data from the dl_data header (32bits) (doing bitwise operations)
-void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header)
-{
+void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header) {
   *pdu_type = header;
   *spare = header;
   *seqno = header;
@@ -78,137 +76,117 @@ void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header)
   return;
 }
 
-int f1u_serialize_message(Protocol__F1uMessage *msg, void **buf,int *size)
-{
+int f1u_serialize_message(Protocol__F1uMessage *msg, void **buf,int *size) {
   *size = protocol__f1u_message__get_packed_size(msg);
-
   *buf = malloc(*size);
+
   if (!(*buf))
     goto error;
 
   protocol__f1u_message__pack(msg, *buf);
-
   return 0;
-
- error:
+error:
   LOG_E(F1U, "an error occured\n");
   return -1;
-
 }
 
-int f1u_deserialize_message(void *data, int size, Protocol__F1uMessage **msg)
-{
+int f1u_deserialize_message(void *data, int size, Protocol__F1uMessage **msg) {
   *msg = protocol__f1u_message__unpack(NULL, size, data);
+
   if (*msg == NULL)
     goto error;
 
   return 0;
-
- error:
+error:
   LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int f1u_dl_data_create_header(uint32_t pdu_type, uint32_t f1u_sn, Protocol__DlDataHeader **header)
-{
+int f1u_dl_data_create_header(uint32_t pdu_type, uint32_t f1u_sn, Protocol__DlDataHeader **header) {
   *header = malloc(sizeof(Protocol__DlDataHeader));
+
   if(*header == NULL)
     goto error;
 
   protocol__dl_data_header__init(*header);
   LOG_D(F1U, "Initialized the DL Data User header\n");
-
   fill_dl_data_header(pdu_type, 0, f1u_sn, &(*header)->fields);
   return 0;
-
- error:
+error:
   LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int f1u_dl_data(const void *params, Protocol__F1uMessage **msg)
-{
+int f1u_dl_data(const void *params, Protocol__F1uMessage **msg) {
   // Initialize the PDCP params
   dl_data_args *args = (dl_data_args *)params;
-
   Protocol__DlDataHeader *header;
 
   if (f1u_dl_data_create_header(args->pdu_type, args->sn, &header) != 0)
-     goto error;
-
+    goto error;
 
   Protocol__DlUserData *dl_data = NULL;
-
   *msg = malloc(sizeof(Protocol__DlUserData));
 
   if(*msg == NULL)
     goto error;
 
-
   // FIXME: Is the following used? It seems to be overwritten by the function
   // protocol__dl_user_data__init() anyway
   //dl_data = *msg;
-
   protocol__dl_user_data__init(dl_data);
-
-
   // Copy data to the bytes structure
   dl_data->pdu.data = malloc(args->sdu_size);
   dl_data->pdu.len = args->sdu_size;
   memcpy(dl_data->pdu.data, args->sdu_p, args->sdu_size);
-
   dl_data->frame = args->frame;
   dl_data->subframe = args->subframe;
   dl_data->rnti = args->rnti;
-
   dl_data->header = header;
-
   return 0;
+error:
+
+  if(header != NULL)
+    free(header);
+
+  if(*msg != NULL)
+    free(*msg);
 
-  error:
-    if(header != NULL)
-      free(header);
-    if(*msg != NULL)
-      free(*msg);
-    LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+  LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
-int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size)
-{
+int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size) {
   *size = protocol__flexsplit_message__get_packed_size(msg);
-
   *buf = malloc(*size);
+
   if (!(*buf))
     goto error;
 
   protocol__flexsplit_message__pack(msg, *buf);
-
   return 0;
-
- error:
+error:
   LOG_E(MAC, "an error occured\n");
   return -1;
 }
 
 /* We assume that the buffer size is equal to the message size.
    Should be chekced durint Tx/Rx */
-int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg) {
   *msg = protocol__flexsplit_message__unpack(NULL, size, data);
+
   if (*msg == NULL)
     goto error;
 
   return 0;
-
- error:
+error:
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int fsp_create_header(xid_t xid, Protocol__FspType type,  Protocol__FspHeader **header)
-{
+int fsp_create_header(xid_t xid, Protocol__FspType type,  Protocol__FspHeader **header) {
   *header = malloc(sizeof(Protocol__FspHeader));
+
   if(*header == NULL)
     goto error;
 
@@ -216,65 +194,54 @@ int fsp_create_header(xid_t xid, Protocol__FspType type,  Protocol__FspHeader **
   LOG_D(PROTO_AGENT, "Initialized the PROTOBUF message header\n");
   (*header)->version = FLEXSPLIT_VERSION;
   LOG_D(PROTO_AGENT, "Set the vversion to FLEXSPLIT_VERSION\n");
-
   (*header)->has_version = 1;
   (*header)->type = type;
   (*header)->has_type = 1;
   (*header)->xid = xid;
   (*header)->has_xid = 1;
   return 0;
-
- error:
+error:
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
-    return 1;
+int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
+  return 1;
 }
 
-int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   Protocol__FspCtxt *ctxt = NULL;
   Protocol__FspRlcPdu *pdu = NULL;
   Protocol__FspRlcData *rlc_data = NULL;
   Protocol__FspRlcDataReq *data_req = NULL;
-
   // Initialize the PDCP params
   data_req_args *args = (data_req_args *)params;
-
   // Create the protobuf header
   Protocol__FspHeader *header;
   xid_t xid = mod_id;
   LOG_D(PROTO_AGENT, "creating the data_req message\n");
 
   if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_RLC_DATA_REQ, &header) != 0)
-     goto error;
+    goto error;
 
   /* Begin constructing the messages. They are defined as follows:
   *  1) fspRlcPdu is storing the bytes of the packet
   *  2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
   *  3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
   */
-
   ctxt = malloc(sizeof(Protocol__FspCtxt));
   pdu = malloc(sizeof(Protocol__FspRlcPdu));
   rlc_data = malloc(sizeof(Protocol__FspRlcData));
   data_req = malloc(sizeof(Protocol__FspRlcDataReq));
-
   protocol__fsp_ctxt__init(ctxt);
   protocol__fsp_rlc_pdu__init(pdu);
   protocol__fsp_rlc_data__init(rlc_data);
   protocol__fsp_rlc_data_req__init(data_req);
-
   // Copy data to the RlcPdu structure
   pdu->fsp_pdu_data.data =  malloc(args->sdu_size);
   pdu->fsp_pdu_data.len = args->sdu_size;
-
   memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
   pdu->has_fsp_pdu_data = 1;
-
   // Copy data to the ctxt structure
   ctxt->fsp_mod_id = args->ctxt->module_id;
   ctxt->fsp_enb_flag = args->ctxt->enb_flag;
@@ -283,7 +250,6 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
   ctxt->fsp_frame = args->ctxt->frame;
   ctxt->fsp_subframe = args->ctxt->subframe;
   ctxt->fsp_enb_index = args->ctxt->eNB_index;
-
   ctxt->has_fsp_mod_id = 1;
   ctxt->has_fsp_enb_flag = 1;
   ctxt->has_fsp_instance = 1;
@@ -291,7 +257,6 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
   ctxt->has_fsp_frame = 1;
   ctxt->has_fsp_subframe = 1;
   ctxt->has_fsp_enb_index = 1;
-
   rlc_data->fsp_ctxt = ctxt;
   rlc_data->fsp_srb_flag = args->srb_flag;
   rlc_data->fsp_mbms_flag = args->MBMS_flag;
@@ -300,49 +265,48 @@ int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__Fle
   rlc_data->fsp_confirm = args->confirm;
   rlc_data->fsp_sdu_buffer_size = args->sdu_size;
   rlc_data->fsp_pdu = pdu;
-
   rlc_data->has_fsp_srb_flag = 1;
   rlc_data->has_fsp_mbms_flag = 1;
   rlc_data->has_fsp_rb_id = 1;
   rlc_data->has_fsp_muip = 1;
   rlc_data->has_fsp_confirm = 1;
   rlc_data->has_fsp_sdu_buffer_size = 1;
-
   // Up to here, everything is a signle message that is packed inside another. The final data_req
   // will be created later, after the setting of all variables
-
   data_req->header = header;
   data_req->enb_id = mod_id;
   data_req->has_enb_id = 1;
   data_req->pdcp_data = rlc_data;
-
   *msg = malloc(sizeof(Protocol__FlexsplitMessage));
 
   if(*msg == NULL)
     goto error;
 
   protocol__flexsplit_message__init(*msg);
-
   (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_MSG;
   (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
   (*msg)->has_msg_dir = 1;
   (*msg)->data_req_msg = data_req;
-
   return 0;
+error:
+
+  if(header != NULL)
+    free(header);
+
+  if(pdu!=NULL)
+    free(pdu);
+
+  if(rlc_data!=NULL)
+    free(rlc_data);
 
-  error:
-    if(header != NULL)
-      free(header);
-    if(pdu!=NULL)
-      free(pdu);
-    if(rlc_data!=NULL)
-      free(rlc_data);
-    if(data_req!= NULL)
-      free(data_req);
-    if(*msg != NULL)
-      free(*msg);
-    LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+  if(data_req!= NULL)
+    free(data_req);
+
+  if(*msg != NULL)
+    free(*msg);
+
+  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
 int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
@@ -357,14 +321,12 @@ int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
   free(msg->data_req_msg);
   free(msg);
   return 0;
-
-  error:
-    LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+error:
+  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
-int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   rlc_op_status_t result = 0;
   //printf("PROTO_AGENT: handling the data_req_ack message\n");
   Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
@@ -373,23 +335,17 @@ int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__Fl
   //printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
   ack_result = result;
   return 0;
-
 }
 
 
-int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   rlc_op_status_t result = 0;
-
   Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
   Protocol__FspRlcDataReq *data_req = input->data_req_msg;
-
   Protocol__FspCtxt *ctxt = NULL;
   Protocol__FspRlcData *rlc_data = NULL;
-
   rlc_data = data_req->pdcp_data;
   ctxt = rlc_data->fsp_ctxt;
-
   protocol_ctxt_t  ctxt_pP;
   srb_flag_t       srb_flagP = 0;
   rb_id_t          rb_idP = 0;
@@ -398,7 +354,6 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
   MBMS_flag_t      flag_MBMS = 0;
   sdu_size_t       pdcp_pdu_size = 0;
   mem_block_t     *pdcp_pdu_p = NULL;
-
   // Create a new protocol context for handling the packet
   ctxt_pP.module_id = ctxt->fsp_mod_id;
   ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
@@ -407,7 +362,6 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
   ctxt_pP.frame = ctxt->fsp_frame;
   ctxt_pP.subframe = ctxt->fsp_subframe;
   ctxt_pP.eNB_index = ctxt->fsp_enb_index;
-
   srb_flagP = rlc_data->fsp_srb_flag;
   flag_MBMS = rlc_data->fsp_mbms_flag;
   rb_idP = rlc_data->fsp_rb_id;
@@ -415,9 +369,10 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
   confirmP = rlc_data->fsp_confirm;
   pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
   pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
+
   if (!pdcp_pdu_p) goto error;
-  memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
 
+  memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
   result = rlc_data_req(&ctxt_pP
                         ,srb_flagP
                         ,flag_MBMS
@@ -426,24 +381,20 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
                         ,confirmP
                         ,pdcp_pdu_size
                         ,pdcp_pdu_p
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                         ,NULL
                         ,NULL
-  #endif
-                        );
-
+                       );
   return result;
+error:
 
-  error:
-    if (pdcp_pdu_p)
-      free_mem_block(pdcp_pdu_p, __func__);
-    LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+  if (pdcp_pdu_p)
+    free_mem_block(pdcp_pdu_p, __func__);
 
+  LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
-int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg)
-{
+int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
   if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG)
     goto error;
 
@@ -455,53 +406,44 @@ int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg)
   free(msg->data_ind_msg);
   free(msg);
   return 0;
-
-  error:
-    LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+error:
+  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
-int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   Protocol__FspCtxt *ctxt = NULL;
   Protocol__FspRlcPdu *pdu = NULL;
   Protocol__FspRlcData *rlc_data = NULL;
   Protocol__FspPdcpDataInd *data_ind = NULL;
-
   // Initialize the PDCP params
   data_req_args *args = (data_req_args *)params;
-
   // Create the protobuf header
   Protocol__FspHeader *header;
   xid_t xid = mod_id;
   LOG_D(PROTO_AGENT, "creating the data_ind message\n");
 
   if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_PDCP_DATA_IND, &header) != 0)
-     goto error;
+    goto error;
 
   /* Begin constructing the messages. They are defined as follows:
   *  1) fspRlcPdu is storing the bytes of the packet
   *  2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
   *  3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
   */
-
   ctxt = malloc(sizeof(Protocol__FspCtxt));
   pdu = malloc(sizeof(Protocol__FspRlcPdu));
   rlc_data = malloc(sizeof(Protocol__FspRlcData));
   data_ind = malloc(sizeof(Protocol__FspPdcpDataInd));
-
   protocol__fsp_ctxt__init(ctxt);
   protocol__fsp_rlc_pdu__init(pdu);
   protocol__fsp_rlc_data__init(rlc_data);
   protocol__fsp_pdcp_data_ind__init(data_ind);
-
   // Copy data to the RlcPdu structure
   pdu->fsp_pdu_data.data =  malloc(args->sdu_size);
   pdu->fsp_pdu_data.len = args->sdu_size;
-
   memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
   pdu->has_fsp_pdu_data = 1;
-
   // Copy data to the ctxt structure
   ctxt->fsp_mod_id = args->ctxt->module_id;
   ctxt->fsp_enb_flag = args->ctxt->enb_flag;
@@ -510,7 +452,6 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
   ctxt->fsp_frame = args->ctxt->frame;
   ctxt->fsp_subframe = args->ctxt->subframe;
   ctxt->fsp_enb_index = args->ctxt->eNB_index;
-
   ctxt->has_fsp_mod_id = 1;
   ctxt->has_fsp_enb_flag = 1;
   ctxt->has_fsp_instance = 1;
@@ -518,28 +459,22 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
   ctxt->has_fsp_frame = 1;
   ctxt->has_fsp_subframe = 1;
   ctxt->has_fsp_enb_index = 1;
-
   rlc_data->fsp_ctxt = ctxt;
   rlc_data->fsp_srb_flag = args->srb_flag;
   rlc_data->fsp_mbms_flag = args->MBMS_flag;
   rlc_data->fsp_rb_id = args->rb_id;
-
   rlc_data->fsp_sdu_buffer_size = args->sdu_size;
   rlc_data->fsp_pdu = pdu;
   rlc_data->has_fsp_srb_flag = 1;
   rlc_data->has_fsp_mbms_flag = 1;
   rlc_data->has_fsp_rb_id = 1;
   rlc_data->has_fsp_sdu_buffer_size = 1;
-
   // Up to here, everything is a signle message that is packed inside another. The final data_req
   // will be created later, after the setting of all variables
-
   data_ind->header = header;
   data_ind->enb_id = mod_id;
   data_ind->has_enb_id = 1;
   data_ind->rlc_data = rlc_data;
-
-
   *msg = malloc(sizeof(Protocol__FlexsplitMessage));
 
   if(*msg == NULL)
@@ -547,49 +482,47 @@ int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__Fle
 
   protocol__flexsplit_message__init(*msg);
   LOG_D(PROTO_AGENT,"setting the message case to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG);
-
   (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG;
   (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
   (*msg)->has_msg_dir = 1;
   (*msg)->data_ind_msg = data_ind; //data_req;
-
   return 0;
+error:
+
+  if(header != NULL)
+    free(header);
 
-  error:
-    if(header != NULL)
-      free(header);
-    if(pdu!=NULL)
-      free(pdu);
-    if(rlc_data!=NULL)
-      free(rlc_data);
-    if(data_ind!= NULL)
-      free(data_ind);
-    if(*msg != NULL)
-      free(*msg);
-    LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+  if(pdu!=NULL)
+    free(pdu);
+
+  if(rlc_data!=NULL)
+    free(rlc_data);
+
+  if(data_ind!= NULL)
+    free(data_ind);
+
+  if(*msg != NULL)
+    free(*msg);
+
+  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
 
-int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   boolean_t result = 0;
-
   Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
   Protocol__FspPdcpDataInd *data_ind = input->data_ind_msg;
   Protocol__FspCtxt *ctxt = NULL;
   Protocol__FspRlcData *rlc_data = NULL;
-
   rlc_data = data_ind->rlc_data;
   ctxt = rlc_data->fsp_ctxt;
-
   protocol_ctxt_t  ctxt_pP;
   srb_flag_t       srb_flagP = 0;
   rb_id_t          rb_idP = 0;
   sdu_size_t       pdcp_pdu_size = 0;
   MBMS_flag_t      flag_MBMS = 0;
   mem_block_t     *pdcp_pdu_p = NULL;
-
   // Create a new protocol context for handling the packet
   ctxt_pP.module_id = ctxt->fsp_mod_id;
   ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
@@ -598,19 +531,18 @@ int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Proto
   ctxt_pP.frame = ctxt->fsp_frame;
   ctxt_pP.subframe = ctxt->fsp_subframe;
   ctxt_pP.eNB_index = ctxt->fsp_enb_index;
-
   srb_flagP = rlc_data->fsp_srb_flag;
   flag_MBMS = rlc_data->fsp_mbms_flag;
   rb_idP = rlc_data->fsp_rb_id;
   pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
   pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
+
   if (!pdcp_pdu_p) goto error;
 
   memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
-
-//   if (xid == 1)
-//     pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
-//   else if (xid == 0)   // FIXME: USE a preprocessed definition
+  //   if (xid == 1)
+  //     pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
+  //   else if (xid == 0)   // FIXME: USE a preprocessed definition
   LOG_D(PROTO_AGENT, "[inst %d] Received PDCP PDU with size %d for UE RNTI %x RB %d, Calling pdcp_data_ind\n", ctxt_pP.instance, pdcp_pdu_size,ctxt_pP.rnti,rb_idP);
   result = pdcp_data_ind(&ctxt_pP,
                          srb_flagP,
@@ -618,34 +550,35 @@ int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Proto
                          rb_idP,
                          pdcp_pdu_size,
                          pdcp_pdu_p);
-
   return result;
+error:
+
+  if (pdcp_pdu_p)
+    free_mem_block(pdcp_pdu_p, __func__);
 
-  error:
-    if (pdcp_pdu_p)
-      free_mem_block(pdcp_pdu_p, __func__);
-    LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-    return -1;
+  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
+  return -1;
 }
 
-int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   Protocol__FspHeader *header;
   Protocol__FspHello *hello_msg = NULL;
-
   /*TODO: Need to set random xid or xid from received hello message*/
   xid_t xid = mod_id;
+
   if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_HELLO, &header) != 0)
     goto error;
 
   LOG_D(PROTO_AGENT, "creating the HELLO message\n");
   hello_msg = malloc(sizeof(Protocol__FspHello));
+
   if(hello_msg == NULL)
     goto error;
+
   protocol__fsp_hello__init(hello_msg);
   hello_msg->header = header;
-
   *msg = malloc(sizeof(Protocol__FlexsplitMessage));
+
   if(*msg == NULL)
     goto error;
 
@@ -655,21 +588,23 @@ int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMe
   (*msg)->has_msg_dir = 1;
   (*msg)->hello_msg = hello_msg;
   return 0;
+error:
 
- error:
   if(header != NULL)
     free(header);
+
   if(hello_msg!=NULL)
     free(hello_msg);
+
   if(*msg != NULL)
     free(*msg);
+
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
 
-int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg)
-{
+int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg) {
   if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_HELLO_MSG)
     goto error;
 
@@ -677,53 +612,54 @@ int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg)
   free(msg->hello_msg);
   free(msg);
   return 0;
-
- error:
+error:
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int proto_agent_echo_request(mod_id_t mod_id, const void* params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_echo_request(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   Protocol__FspHeader *header;
   Protocol__FspEchoRequest *echo_request_msg = NULL;
-
   xid_t xid = mod_id;
+
   if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REQUEST, &header) != 0)
     goto error;
-  LOG_D(PROTO_AGENT, "creating the echo request message\n");
 
+  LOG_D(PROTO_AGENT, "creating the echo request message\n");
   echo_request_msg = malloc(sizeof(Protocol__FspEchoRequest));
+
   if(echo_request_msg == NULL)
     goto error;
 
   protocol__fsp_echo_request__init(echo_request_msg);
   echo_request_msg->header = header;
-
   *msg = malloc(sizeof(Protocol__FlexsplitMessage));
+
   if(*msg == NULL)
     goto error;
-  protocol__flexsplit_message__init(*msg);
 
+  protocol__flexsplit_message__init(*msg);
   LOG_D(PROTO_AGENT,"setting the message direction to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG);
   (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG;
   (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE;
   (*msg)->has_msg_dir = 1;
   (*msg)->echo_request_msg = echo_request_msg;
   return 0;
+error:
 
- error:
   if(header != NULL)
     free(header);
+
   if(echo_request_msg != NULL)
     free(echo_request_msg);
+
   if(*msg != NULL)
     free(*msg);
+
   return -1;
 }
 
-int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg)
-{
+int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg) {
   if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG)
     goto error;
 
@@ -731,48 +667,52 @@ int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg)
   free(msg->echo_request_msg);
   free(msg);
   return 0;
-
- error:
+error:
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
 
-int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg)
-{
+int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
   xid_t xid;
   Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
   Protocol__FspEchoRequest *echo_req = input->echo_request_msg;
   Protocol__FspEchoReply *echo_reply_msg = NULL;
   xid = (echo_req->header)->xid;
-
   LOG_D(PROTO_AGENT, "creating the echo reply message\n");
   Protocol__FspHeader *header;
+
   if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REPLY, &header) != 0)
     goto error;
 
   echo_reply_msg = malloc(sizeof(Protocol__FspEchoReply));
+
   if(echo_reply_msg == NULL)
     goto error;
+
   protocol__fsp_echo_reply__init(echo_reply_msg);
   echo_reply_msg->header = header;
-
   *msg = malloc(sizeof(Protocol__FlexsplitMessage));
+
   if(*msg == NULL)
     goto error;
+
   protocol__flexsplit_message__init(*msg);
   (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REPLY_MSG;
   (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__SUCCESSFUL_OUTCOME;
   (*msg)->has_msg_dir = 1;
   (*msg)->echo_reply_msg = echo_reply_msg;
   return 0;
+error:
 
- error:
   if(header != NULL)
     free(header);
+
   if(echo_reply_msg != NULL)
     free(echo_reply_msg);
+
   if(*msg != NULL)
     free(*msg);
+
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
@@ -785,8 +725,7 @@ int proto_agent_destroy_echo_reply(Protocol__FlexsplitMessage *msg) {
   free(msg->echo_reply_msg);
   free(msg);
   return 0;
-
- error:
+error:
   LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
   return -1;
 }
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
index 5f6e15d281efe5f819aafc1af2c6d05a80e8fc2e..ef40b186e001e01a3472ea00fb8ec63ff282b8df 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
@@ -211,15 +211,10 @@ config_req_rlc_am (
 uint16_t pollPDU_tab[LTE_PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
 uint32_t maxRetxThreshold_tab[LTE_UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
 uint32_t pollByte_tab[LTE_PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
 uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
 uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
-#else
-uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare9]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
-uint32_t am_t_Reordering_tab[LTE_T_Reordering_spare1]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
-uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare8]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
-#endif
+
 
 //-----------------------------------------------------------------------------
 void config_req_rlc_am_asn1 (
@@ -240,15 +235,9 @@ void config_req_rlc_am_asn1 (
     if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= LTE_UL_AM_RLC__maxRetxThreshold_t32) &&
         (config_am_pP->ul_AM_RLC.pollPDU<=LTE_PollPDU_pInfinity) &&
         (config_am_pP->ul_AM_RLC.pollByte<LTE_PollByte_spare1) &&
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
         (config_am_pP->ul_AM_RLC.t_PollRetransmit<LTE_T_PollRetransmit_spare5) &&
         (config_am_pP->dl_AM_RLC.t_Reordering<32) &&
         (config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare2) ) {
-#else
-        (config_am_pP->ul_AM_RLC.t_PollRetransmitLTE_T_PollRetransmit_spare9) &&
-        (config_am_pP->dl_AM_RLC.t_Reordering<LTE_T_Reordering_spare1) &&
-        (config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare8) ) {
-#endif
       MSC_LOG_RX_MESSAGE(
         (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
         (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
@@ -277,8 +266,7 @@ void config_req_rlc_am_asn1 (
                        PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
                        am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
                        t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
-    }
-    else {
+    } else {
       MSC_LOG_RX_DISCARDED_MESSAGE(
         (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
         (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
@@ -811,8 +799,8 @@ rlc_am_mac_data_request (
       tb_p = tb_p->next;
     } /* while */
   } /* MESSAGE_CHART_GENERATOR && data_req.data.nb_elements > 0 */
-  data_req.buffer_occupancy_in_pdus = 0;
 
+  data_req.buffer_occupancy_in_pdus = 0;
   return data_req;
 }
 //-----------------------------------------------------------------------------
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
index b7bc34db54674c92e1b471247575b3b19d4745d4..77194f3a9e219712ae274c98e6d35383ff60f747 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
@@ -37,18 +37,16 @@
 
 //-----------------------------------------------------------------------------
 void config_req_rlc_um (
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t      srb_flagP,
-  const rlc_um_info_t  * const config_um_pP,
+  const rlc_um_info_t   *const config_um_pP,
   const rb_id_t           rb_idP,
-  const logical_chan_id_t chan_idP)
-{
+  const logical_chan_id_t chan_idP) {
   rlc_union_t     *rlc_union_p  = NULL;
   rlc_um_entity_t *rlc_p        = NULL;
   hash_key_t       key          = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
   hashtable_rc_t   h_rc;
-
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     rlc_p = &rlc_union_p->rlc.um;
@@ -58,7 +56,6 @@ void config_req_rlc_um (
           config_um_pP->sn_field_length,
           config_um_pP->is_mXch,
           rb_idP);
-
     rlc_um_init(ctxt_pP, rlc_p);
 
     if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
@@ -78,28 +75,22 @@ void config_req_rlc_um (
   }
 }
 //-----------------------------------------------------------------------------
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
-#else
-const uint32_t t_Reordering_tab[LTE_T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
-#endif
+
 
 void config_req_rlc_um_asn1 (
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t          srb_flagP,
   const MBMS_flag_t         mbms_flagP,
   const mbms_session_id_t   mbms_session_idP,
   const mbms_service_id_t   mbms_service_idP,
-  const LTE_UL_UM_RLC_t   * const ul_rlc_pP,
-  const LTE_DL_UM_RLC_t   * const dl_rlc_pP,
+  const LTE_UL_UM_RLC_t    *const ul_rlc_pP,
+  const LTE_DL_UM_RLC_t    *const dl_rlc_pP,
   const rb_id_t             rb_idP,
-  const logical_chan_id_t   chan_idP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
- ,const uint32_t            sourceL2Id
- ,const uint32_t            destinationL2Id
-#endif
-                          )
-{
+  const logical_chan_id_t   chan_idP,
+  const uint32_t            sourceL2Id,
+  const uint32_t            destinationL2Id
+) {
   uint32_t         ul_sn_FieldLength   = 0;
   uint32_t         dl_sn_FieldLength   = 0;
   uint32_t         t_Reordering        = 0;
@@ -108,22 +99,22 @@ void config_req_rlc_um_asn1 (
   hash_key_t       key                 = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
   hashtable_rc_t   h_rc;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (mbms_flagP) {
     //AssertFatal(dl_rlc_pP, "No RLC UM DL config");
     if(dl_rlc_pP == NULL) {
       LOG_E(RLC, "No RLC UM DL config\n");
       return;
     }
+
     //AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
     if(ul_rlc_pP != NULL) {
       LOG_E(RLC, "RLC UM UL config present\n");
       return;
     }
-    
+
     key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
-    h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+    h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
+
     //AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u rnti %i enb flag %u service id %u, session id %u",
     //             ctxt_pP->module_id,
     //             ctxt_pP->rnti,
@@ -132,121 +123,113 @@ void config_req_rlc_um_asn1 (
     //             mbms_session_idP);
     if(h_rc != HASH_TABLE_OK) {
       LOG_E(RLC, "RLC NOT FOUND enb id %u rnti %i enb flag %u service id %u, session id %u\n",
-        ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
+            ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
       return;
     }
-    
+
     rlc_p = &rlc_union_p->rlc.um;
-  }else
-  if ((sourceL2Id >0 ) && (destinationL2Id >0)){
-     key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
-  } else
-#endif
-  {
-     key  = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
+  } else if ((sourceL2Id >0 ) && (destinationL2Id >0)) {
+    key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
+  } else {
+    key  = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
+  }
+
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
+
+  //AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
+  //             ctxt_pP->module_id,
+  //             ctxt_pP->rnti,
+  //             ctxt_pP->enb_flag,
+  //             rb_idP,
+  //             srb_flagP);
+  if(h_rc != HASH_TABLE_OK) {
+    LOG_E(RLC, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u\n",
+          ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
+    return;
   }
-    h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
-    //AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
-    //             ctxt_pP->module_id,
-    //             ctxt_pP->rnti,
-    //             ctxt_pP->enb_flag,
-    //             rb_idP,
-    //             srb_flagP);
-    if(h_rc != HASH_TABLE_OK) {
-      LOG_E(RLC, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u\n",
-        ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
-      return;
-    }
-    rlc_p = &rlc_union_p->rlc.um;
 
+  rlc_p = &rlc_union_p->rlc.um;
   //-----------------------------------------------------------------------------
   LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"  CONFIG_REQ timer_reordering=%dms sn_field_length=   RB %u \n",
         PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
         (dl_rlc_pP && dl_rlc_pP->t_Reordering<31)?t_Reordering_tab[dl_rlc_pP->t_Reordering]:-1,
         rb_idP);
-
   rlc_um_init(ctxt_pP, rlc_p);
 
-
   if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
     rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP, chan_idP);
 
     if (ul_rlc_pP != NULL) {
       switch (ul_rlc_pP->sn_FieldLength) {
-      case LTE_SN_FieldLength_size5:
-        ul_sn_FieldLength = 5;
-        break;
-
-      case LTE_SN_FieldLength_size10:
-        ul_sn_FieldLength = 10;
-        break;
-
-      default:
-        LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID UL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
-              PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
-              rlc_p->rb_id,
-              ul_rlc_pP->sn_FieldLength);
-        MSC_LOG_RX_DISCARDED_MESSAGE(
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-      	    NULL,
-      	    0,
-      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
-      	    MSC_AS_TIME_ARGS(ctxt_pP),
-      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-      	    ul_rlc_pP->sn_FieldLength);
-        return;
+        case LTE_SN_FieldLength_size5:
+          ul_sn_FieldLength = 5;
+          break;
+
+        case LTE_SN_FieldLength_size10:
+          ul_sn_FieldLength = 10;
+          break;
+
+        default:
+          LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID UL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
+                PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
+                rlc_p->rb_id,
+                ul_rlc_pP->sn_FieldLength);
+          MSC_LOG_RX_DISCARDED_MESSAGE(
+            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
+            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
+            NULL,
+            0,
+            MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
+            MSC_AS_TIME_ARGS(ctxt_pP),
+            PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
+            ul_rlc_pP->sn_FieldLength);
+          return;
       }
     }
 
     if (dl_rlc_pP != NULL) {
       switch (dl_rlc_pP->sn_FieldLength) {
-      case LTE_SN_FieldLength_size5:
-        dl_sn_FieldLength = 5;
-        break;
-
-      case LTE_SN_FieldLength_size10:
-        dl_sn_FieldLength = 10;
-        break;
-
-      default:
-        LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID DL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
-              PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
-              rlc_p->rb_id,
-              dl_rlc_pP->sn_FieldLength);
-        MSC_LOG_RX_DISCARDED_MESSAGE(
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-      	    NULL,
-      	    0,
-      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
-      	    MSC_AS_TIME_ARGS(ctxt_pP),
-      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-      	    dl_rlc_pP->sn_FieldLength);
-        return;
+        case LTE_SN_FieldLength_size5:
+          dl_sn_FieldLength = 5;
+          break;
+
+        case LTE_SN_FieldLength_size10:
+          dl_sn_FieldLength = 10;
+          break;
+
+        default:
+          LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID DL sn_FieldLength %ld, RLC NOT CONFIGURED\n",
+                PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
+                rlc_p->rb_id,
+                dl_rlc_pP->sn_FieldLength);
+          MSC_LOG_RX_DISCARDED_MESSAGE(
+            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
+            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
+            NULL,
+            0,
+            MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
+            MSC_AS_TIME_ARGS(ctxt_pP),
+            PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
+            dl_rlc_pP->sn_FieldLength);
+          return;
       }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       if (dl_rlc_pP->t_Reordering<32) {
-#else
-      if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
-#endif
         t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
       } else {
         LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID T_Reordering %ld, RLC NOT CONFIGURED\n",
               PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
               rlc_p->rb_id,
               dl_rlc_pP->t_Reordering);
-
         MSC_LOG_RX_DISCARDED_MESSAGE(
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-      	    NULL,
-      	    0,
-      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
-      	    MSC_AS_TIME_ARGS(ctxt_pP),
-      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-      	    dl_rlc_pP->t_Reordering);
+          (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
+          (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
+          NULL,
+          0,
+          MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
+          MSC_AS_TIME_ARGS(ctxt_pP),
+          PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
+          dl_rlc_pP->t_Reordering);
         return;
       }
     }
@@ -258,45 +241,42 @@ void config_req_rlc_um_asn1 (
                        dl_sn_FieldLength,
                        mbms_flagP);
       MSC_LOG_RX_MESSAGE(
-    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-    	    NULL,
-    	    0,
-    	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
-    	    MSC_AS_TIME_ARGS(ctxt_pP),
-    	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-    	    t_Reordering,
-    	    ul_sn_FieldLength,
-    	    dl_sn_FieldLength);
+        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
+        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
+        NULL,
+        0,
+        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
+        MSC_AS_TIME_ARGS(ctxt_pP),
+        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
+        t_Reordering,
+        ul_sn_FieldLength,
+        dl_sn_FieldLength);
     } else {
-
       rlc_um_configure(ctxt_pP,rlc_p,
                        t_Reordering,
                        dl_sn_FieldLength,
                        ul_sn_FieldLength,
                        mbms_flagP);
       MSC_LOG_RX_MESSAGE(
-    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-    	    NULL,
-    	    0,
-    	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
-    	    MSC_AS_TIME_ARGS(ctxt_pP),
-    	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-    	    t_Reordering,
-    	    dl_sn_FieldLength,
-    	    ul_sn_FieldLength);
+        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
+        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
+        NULL,
+        0,
+        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
+        MSC_AS_TIME_ARGS(ctxt_pP),
+        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
+        t_Reordering,
+        dl_sn_FieldLength,
+        ul_sn_FieldLength);
     }
   }
 }
 //-----------------------------------------------------------------------------
 void
 rlc_um_init (
-  const protocol_ctxt_t* const ctxt_pP,
-  rlc_um_entity_t * const rlc_pP
-)
-{
-
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP
+) {
   //AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
   if(rlc_pP == NULL) {
     LOG_E(RLC, "Bad RLC UM pointer (NULL)\n");
@@ -314,11 +294,8 @@ rlc_um_init (
     list_init (&rlc_pP->pdus_to_mac_layer, NULL);
     pthread_mutex_init(&rlc_pP->lock_input_sdus, NULL);
     list_init (&rlc_pP->input_sdus, NULL);
-
     rlc_pP->protocol_state = RLC_NULL_STATE;
-
     //rlc_pP->vt_us = 0;
-
     // RX SIDE
     list_init (&rlc_pP->pdus_from_mac_layer, NULL);
     //rlc_pP->vr_ur = 0;
@@ -326,12 +303,10 @@ rlc_um_init (
     //rlc_pP->vr_uh = 0;
     //rlc_pP->output_sdu_size_to_write = 0;
     //rlc_pP->output_sdu_in_construction = NULL;
-
     rlc_pP->rx_sn_length          = 10;
     rlc_pP->rx_header_min_length_in_bytes = 2;
     rlc_pP->tx_sn_length          = 10;
     rlc_pP->tx_header_min_length_in_bytes = 2;
-
     pthread_mutex_init(&rlc_pP->lock_dar_buffer, NULL);
 
     if (rlc_pP->dar_buffer == NULL) {
@@ -345,13 +320,10 @@ rlc_um_init (
 //-----------------------------------------------------------------------------
 void
 rlc_um_reset_state_variables (
-  const protocol_ctxt_t* const ctxt_pP,
-  rlc_um_entity_t * const rlc_pP
-)
-{
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP
+) {
   rlc_pP->buffer_occupancy = 0;
-
-
   // TX SIDE
   rlc_pP->vt_us = 0;
   // RX SIDE
@@ -362,14 +334,12 @@ rlc_um_reset_state_variables (
 //-----------------------------------------------------------------------------
 void
 rlc_um_cleanup (
-  rlc_um_entity_t * const rlc_pP)
-{
+  rlc_um_entity_t *const rlc_pP) {
   int             index;
   // TX SIDE
   list_free (&rlc_pP->pdus_to_mac_layer);
   pthread_mutex_destroy(&rlc_pP->lock_input_sdus);
   list_free (&rlc_pP->input_sdus);
-
   // RX SIDE
   list_free (&rlc_pP->pdus_from_mac_layer);
 
@@ -395,13 +365,12 @@ rlc_um_cleanup (
 
 //-----------------------------------------------------------------------------
 void rlc_um_configure(
-  const protocol_ctxt_t* const ctxt_pP,
-  rlc_um_entity_t * const rlc_pP,
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP,
   const uint32_t         timer_reorderingP,
   const uint32_t         rx_sn_field_lengthP,
   const uint32_t         tx_sn_field_lengthP,
-  const uint32_t         is_mXchP)
-{
+  const uint32_t         is_mXchP) {
   if (rx_sn_field_lengthP == 10) {
     rlc_pP->rx_sn_length                  = 10;
     rlc_pP->rx_sn_modulo                  = RLC_UM_SN_10_BITS_MODULO;
@@ -444,25 +413,21 @@ void rlc_um_configure(
   }
 
   rlc_pP->is_mxch = is_mXchP;
-
   rlc_pP->last_reassemblied_sn  = rlc_pP->rx_sn_modulo - 1;
   rlc_pP->last_reassemblied_missing_sn  = rlc_pP->rx_sn_modulo - 1;
   rlc_pP->reassembly_missing_sn_detected = 0;
   // timers
   rlc_um_init_timer_reordering(ctxt_pP,rlc_pP, timer_reorderingP);
-
   rlc_pP->first_pdu = 1;
-
   rlc_um_reset_state_variables (ctxt_pP,rlc_pP);
 }
 //-----------------------------------------------------------------------------
 void rlc_um_set_debug_infos(
-  const protocol_ctxt_t* const ctxt_pP,
-  rlc_um_entity_t * const rlc_pP,
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP,
   const srb_flag_t        srb_flagP,
   const rb_id_t           rb_idP,
-  const logical_chan_id_t chan_idP) 
-{
+  const logical_chan_id_t chan_idP) {
   LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
         PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
         rb_idP,
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
index bf127450503bc471cc476be50926c9d2ff07f37f..45d7c4b3af196fb58e2546ee834fd9ea361d70de 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
@@ -65,11 +65,11 @@ typedef volatile struct {
 * \param[in]  chan_idP                  Transport channel identifier.
 */
 void config_req_rlc_um (
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      const srb_flag_t srb_flagP,
-                                      const rlc_um_info_t * const config_umP,
-                                      const rb_id_t rb_idP,
-                                      const logical_chan_id_t chan_idP); 
+  const protocol_ctxt_t *const ctxt_pP,
+  const srb_flag_t srb_flagP,
+  const rlc_um_info_t *const config_umP,
+  const rb_id_t rb_idP,
+  const logical_chan_id_t chan_idP);
 
 /*! \fn void config_req_rlc_um_asn1 (
  *     const protocol_ctxt_t* const ctxt_pP,
@@ -92,20 +92,18 @@ void config_req_rlc_um (
 * \param[in]  chan_idP                  Transport channel identifier.
 */
 void config_req_rlc_um_asn1 (
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      const srb_flag_t         srb_flagP,
-                                      const MBMS_flag_t        mbms_flagP,
-                                      const mbms_session_id_t  mbms_session_idP,
-                                      const mbms_service_id_t  mbms_service_idP,
-                                      const LTE_UL_UM_RLC_t  * const ul_rlc_pP,
-                                      const LTE_DL_UM_RLC_t  * const dl_rlc_pP,
-                                      const rb_id_t            rb_idP,
-                                      const logical_chan_id_t  chan_idP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                      ,const uint32_t          sourceL2Id
-                                      ,const uint32_t          destinationL2Id
-#endif
-                                      );
+  const protocol_ctxt_t *const ctxt_pP,
+  const srb_flag_t         srb_flagP,
+  const MBMS_flag_t        mbms_flagP,
+  const mbms_session_id_t  mbms_session_idP,
+  const mbms_service_id_t  mbms_service_idP,
+  const LTE_UL_UM_RLC_t   *const ul_rlc_pP,
+  const LTE_DL_UM_RLC_t   *const dl_rlc_pP,
+  const rb_id_t            rb_idP,
+  const logical_chan_id_t  chan_idP,
+  const uint32_t          sourceL2Id,
+  const uint32_t          destinationL2Id
+);
 
 /*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
 * \brief    Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
@@ -113,8 +111,8 @@ void config_req_rlc_um_asn1 (
 * \param[in]  rlc_pP                    RLC UM protocol instance pointer.
 */
 void rlc_um_init (
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      rlc_um_entity_t * const rlc_pP);
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP);
 
 /*! \fn void rlc_um_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
 * \brief    Reset protocol variables and state variables to initial values.
@@ -122,15 +120,15 @@ void rlc_um_init (
 * \param[in]  rlc_pP                    RLC UM protocol instance pointer.
 */
 void rlc_um_reset_state_variables (
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      rlc_um_entity_t * const rlc_pP);
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP);
 
 /*! \fn void rlc_um_cleanup(rlc_um_entity_t * const rlc_pP)
 * \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
 * \param[in]  rlc_pP                    RLC UM protocol instance pointer.
 */
 void rlc_um_cleanup(
-                                      rlc_um_entity_t * const rlc_pP);
+  rlc_um_entity_t *const rlc_pP);
 
 /*! \fn void rlc_um_configure(
  *     const protocol_ctxt_t* const ctxt_pP,
@@ -148,12 +146,12 @@ void rlc_um_cleanup(
 * \param[in]  is_mXchP                  Is the radio bearer for MCCH, MTCH.
 */
 void rlc_um_configure(
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      rlc_um_entity_t *const  rlc_pP,
-                                      const uint32_t timer_reorderingP,
-                                      const uint32_t rx_sn_field_lengthP,
-                                      const uint32_t tx_sn_field_lengthP,
-                                      const uint32_t is_mXchP);
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const  rlc_pP,
+  const uint32_t timer_reorderingP,
+  const uint32_t rx_sn_field_lengthP,
+  const uint32_t tx_sn_field_lengthP,
+  const uint32_t is_mXchP);
 
 /*! \fn void rlc_um_set_debug_infos(
 *     const protocol_ctxt_t* const ctxt_pP,
@@ -168,10 +166,10 @@ void rlc_um_configure(
 * \param[in]  chan_idP                  Transport channel identifier.
 */
 void rlc_um_set_debug_infos(
-                                      const protocol_ctxt_t* const ctxt_pP,
-                                      rlc_um_entity_t * const rlc_pP,
-                                      const srb_flag_t srb_flagP,
-                                      const rb_id_t rb_idP,
-                                      const logical_chan_id_t chan_idP); 
+  const protocol_ctxt_t *const ctxt_pP,
+  rlc_um_entity_t *const rlc_pP,
+  const srb_flag_t srb_flagP,
+  const rb_id_t rb_idP,
+  const logical_chan_id_t chan_idP);
 /** @} */
 #    endif
diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c
index 3cde5977ff0eac3f9e4c7cd56654a2107695ac80..1563a01de352a809ab698161d059754a7e7a6e3c 100644
--- a/openair2/LAYER2/RLC/rlc.c
+++ b/openair2/LAYER2/RLC/rlc.c
@@ -319,11 +319,9 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
                                   const mui_t        muiP,
                                   confirm_t    confirmP,
                                   sdu_size_t   sdu_sizeP,
-                                  mem_block_t *sdu_pP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t *const sourceL2Id
-  ,const uint32_t *const destinationL2Id
-#endif
+                                  mem_block_t *sdu_pP,
+                                  const uint32_t *const sourceL2Id,
+                                  const uint32_t *const destinationL2Id
                                  ) {
   //-----------------------------------------------------------------------------
   mem_block_t           *new_sdu_p    = NULL;
@@ -331,10 +329,8 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
   rlc_union_t           *rlc_union_p = NULL;
   hash_key_t             key         = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t         h_rc;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   rlc_mbms_id_t         *mbms_id_p  = NULL;
   logical_chan_id_t      log_ch_id  = 0;
-#endif
 #ifdef DEBUG_RLC_DATA_REQ
   LOG_D(RLC,PROTOCOL_CTXT_FMT"rlc_data_req:  rb_id %u (MAX %d), muip %d, confirmP %d, sdu_sizeP %d, sdu_pP %p\n",
         PROTOCOL_CTXT_ARGS(ctxt_pP),
@@ -345,10 +341,6 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
         sdu_sizeP,
         sdu_pP);
 #endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-#else
-  AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
-#endif
 #if T_TRACER
 
   if (ctxt_pP->enb_flag)
@@ -382,11 +374,7 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
     return RLC_OP_STATUS_BAD_PARAMETER;
   }
 
-#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
-  DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
-#endif
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   if (MBMS_flagP == TRUE) {
     if (ctxt_pP->enb_flag) {
@@ -398,18 +386,14 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
     }
 
     key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
-  }else
-
-  if (sourceL2Id && destinationL2Id) {
+  } else if (sourceL2Id && destinationL2Id) {
     LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
            srb_flagP);
     key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
     //Thinh's line originally uncommented
     //key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
     //key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
-  } else
-#endif
-  {
+  } else {
     LOG_D (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP,
            srb_flagP);
     key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
@@ -531,8 +515,6 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
         VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
         return RLC_OP_STATUS_INTERNAL_ERROR;
     }
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   } else { /* MBMS_flag != 0 */
     //  LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
     if (sdu_pP != NULL) {
@@ -565,17 +547,6 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
       return RLC_OP_STATUS_BAD_PARAMETER;
     }
   }
-
-#else
-  } else { /* MBMS_flag != 0 */
-    free_mem_block(sdu_pP, __func__);
-    LOG_E(RLC, "MBMS_flag != 0 while Rel10/Rel14 is not defined...\n");
-    //handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
-    return RLC_OP_STATUS_BAD_PARAMETER;
-  }
-
-#endif
 }
 
 //-----------------------------------------------------------------------------
diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h
index c5b5c67aa8a5b957adc3bd9e92488ea4669805eb..dddffed241a1ecc9efd281739056589990834246 100644
--- a/openair2/LAYER2/RLC/rlc.h
+++ b/openair2/LAYER2/RLC/rlc.h
@@ -28,7 +28,7 @@
 * \bug
 * \warning
 */
-/** @defgroup _rlc_impl_ RLC 
+/** @defgroup _rlc_impl_ RLC
 * @ingroup _oai2
 * @{
 */
@@ -55,9 +55,7 @@
 #    include "LTE_SRB-ToAddModList.h"
 #    include "LTE_DRB-ToReleaseList.h"
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 #include "LTE_PMCH-InfoList-r9.h"
-#endif
 
 typedef uint64_t hash_key_t;
 #define HASHTABLE_NOT_A_KEY_VALUE ((uint64_t)-1)
@@ -136,25 +134,25 @@ typedef struct {
 #define  RLC_MAX_LC  ((max_val_LTE_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
 
 void (*rlc_rrc_data_ind)(
-                const protocol_ctxt_t* const ctxtP,
-                const rb_id_t     rb_idP,
-                const sdu_size_t  sdu_sizeP,
-                const uint8_t   * const sduP);
+  const protocol_ctxt_t *const ctxtP,
+  const rb_id_t     rb_idP,
+  const sdu_size_t  sdu_sizeP,
+  const uint8_t    *const sduP);
 
 void (*rlc_rrc_data_conf)(
-                const protocol_ctxt_t* const ctxtP,
-                const rb_id_t         rb_idP,
-                const mui_t           muiP,
-                const rlc_tx_status_t statusP);
+  const protocol_ctxt_t *const ctxtP,
+  const rb_id_t         rb_idP,
+  const mui_t           muiP,
+  const rlc_tx_status_t statusP);
 
 typedef void (rrc_data_ind_cb_t)(
-  const protocol_ctxt_t* const ctxtP,
+  const protocol_ctxt_t *const ctxtP,
   const rb_id_t     rb_idP,
   const sdu_size_t  sdu_sizeP,
-  const uint8_t   * const sduP);
+  const uint8_t    *const sduP);
 
 typedef void (rrc_data_conf_cb_t)(
-  const protocol_ctxt_t* const ctxtP,
+  const protocol_ctxt_t *const ctxtP,
   const rb_id_t         rb_idP,
   const mui_t           muiP,
   const rlc_tx_status_t statusP);
@@ -183,16 +181,7 @@ typedef struct rlc_mbms_id_s {
   mbms_session_id_t       session_id;
 } rlc_mbms_id_t;
 
-#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
-#    if !defined(maxServiceCount)
-//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
-#        define maxServiceCount 1
-#    endif
-#    if !defined(maxSessionPerPMCH)
-//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
-#        define maxSessionPerPMCH 1
-#    endif
-#endif
+
 //rlc_mbms_t           rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];   // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
 //rlc_mbms_t           rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
 rlc_mbms_id_t        rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC];    // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
@@ -202,64 +191,64 @@ rlc_mbms_id_t        rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_
 ;
 
 #define rlc_mbms_enb_set_lcid_by_rb_id(Enb_mOD,rB_iD,lOG_cH_iD) do { \
-            rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD] = lOG_cH_iD; \
-        } while (0);
+    rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD] = lOG_cH_iD; \
+  } while (0);
 
 #define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD]
 
 #define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \
-            AssertFatal(rB_iD<NB_RB_MBMS_MAX, "INVALID RB ID %u", rB_iD); \
-            rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
-        } while (0);
+    AssertFatal(rB_iD<NB_RB_MBMS_MAX, "INVALID RB ID %u", rB_iD); \
+    rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
+  } while (0);
 
 logical_chan_id_t    rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX];              /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
 logical_chan_id_t    rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX];              /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
 
 
 #define RLC_COLL_KEY_VALUE(eNB_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
-   ((hash_key_t)eNB_iD             | \
-    (((hash_key_t)(rNTI))   << 8)  | \
-    (((hash_key_t)(iS_eNB)) << 24) | \
-    (((hash_key_t)(rB_iD))  << 25) | \
-    (((hash_key_t)(iS_sRB)) << 33) | \
-    (((hash_key_t)(0x05))   << 34))
+  ((hash_key_t)eNB_iD             | \
+   (((hash_key_t)(rNTI))   << 8)  | \
+   (((hash_key_t)(iS_eNB)) << 24) | \
+   (((hash_key_t)(rB_iD))  << 25) | \
+   (((hash_key_t)(iS_sRB)) << 33) | \
+   (((hash_key_t)(0x05))   << 34))
 
 // index to the same RLC entity as RLC_COLL_KEY_VALUE(), but using LC_id instead
 // the hidden last key indicates if this is a hash-key with RB_id (0x05) or LC_id (0x0a)
 #define RLC_COLL_KEY_LCID_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, iS_sRB) \
-   ((hash_key_t)eNB_iD             | \
-    (((hash_key_t)(rNTI))   << 8)  | \
-    (((hash_key_t)(iS_eNB)) << 24) | \
-    (((hash_key_t)(lC_iD))  << 25) | \
-    (((hash_key_t)(iS_sRB)) << 33) | \
-    (((hash_key_t)(0x0a))   << 34))
+  ((hash_key_t)eNB_iD             | \
+   (((hash_key_t)(rNTI))   << 8)  | \
+   (((hash_key_t)(iS_eNB)) << 24) | \
+   (((hash_key_t)(lC_iD))  << 25) | \
+   (((hash_key_t)(iS_sRB)) << 33) | \
+   (((hash_key_t)(0x0a))   << 34))
 
 #define RLC_COLL_KEY_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
-   ((hash_key_t)eNB_iD             | \
-    (((hash_key_t)(rNTI))   << 8)  | \
-    (((hash_key_t)(iS_eNB)) << 24) | \
-    (((hash_key_t)(lC_iD))  << 25) | \
-    (((hash_key_t)(dEST_iD)) << 33) | \
-    (((hash_key_t)(0x05))   << 57))
+  ((hash_key_t)eNB_iD             | \
+   (((hash_key_t)(rNTI))   << 8)  | \
+   (((hash_key_t)(iS_eNB)) << 24) | \
+   (((hash_key_t)(lC_iD))  << 25) | \
+   (((hash_key_t)(dEST_iD)) << 33) | \
+   (((hash_key_t)(0x05))   << 57))
 
 #define RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
-   ((hash_key_t)eNB_iD             | \
-    (((hash_key_t)(rNTI))   << 8)  | \
-    (((hash_key_t)(iS_eNB)) << 24) | \
-    (((hash_key_t)(lC_iD))  << 25) | \
-    (((hash_key_t)(dEST_iD)) << 33) | \
-    (((hash_key_t)(0x0a))   << 57))
+  ((hash_key_t)eNB_iD             | \
+   (((hash_key_t)(rNTI))   << 8)  | \
+   (((hash_key_t)(iS_eNB)) << 24) | \
+   (((hash_key_t)(lC_iD))  << 25) | \
+   (((hash_key_t)(dEST_iD)) << 33) | \
+   (((hash_key_t)(0x0a))   << 57))
 
 
 // service id max val is maxServiceCount = 16 (asn1_constants.h)
 
 #define RLC_COLL_KEY_MBMS_VALUE(eNB_iD, rNTI, iS_eNB, sERVICE_ID, sESSION_ID) \
-   ((hash_key_t)eNB_iD             | \
-    (((hash_key_t)(rNTI))       << 8)  | \
-    (((hash_key_t)(iS_eNB))     << 24) | \
-    (((hash_key_t)(sERVICE_ID)) << 32) | \
-    (((hash_key_t)(sESSION_ID)) << 37) | \
-    (((hash_key_t)(0x0000000000000001))  << 63))
+  ((hash_key_t)eNB_iD             | \
+   (((hash_key_t)(rNTI))       << 8)  | \
+   (((hash_key_t)(iS_eNB))     << 24) | \
+   (((hash_key_t)(sERVICE_ID)) << 32) | \
+   (((hash_key_t)(sESSION_ID)) << 37) | \
+   (((hash_key_t)(0x0000000000000001))  << 63))
 
 hash_table_t  *rlc_coll_p;
 
@@ -269,7 +258,7 @@ hash_table_t  *rlc_coll_p;
 * \param[in]  transport_blocksP       List of transport blocks.
 * \return     The amount of bytes that have been written due to serialization.
 */
-tbs_size_t            mac_rlc_serialize_tb   (char*, list_t);
+tbs_size_t            mac_rlc_serialize_tb   (char *, list_t);
 
 /*! \fn struct mac_data_ind mac_rlc_deserialize_tb (char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcsP)
 * \brief  Serialize a list of transport blocks coming from RLC in order to be processed by MAC.
@@ -279,13 +268,13 @@ tbs_size_t            mac_rlc_serialize_tb   (char*, list_t);
 * \param[in]  crcsP         Array of CRC for each transport block.
 * \return     A mac_data_ind structure containing a list of transport blocks.
 */
-struct mac_data_ind   mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t *);
+struct mac_data_ind   mac_rlc_deserialize_tb (char *, tb_size_t, num_tb_t, crc_t *);
 
 
 //-----------------------------------------------------------------------------
 //   PUBLIC INTERFACE WITH RRC
 //-----------------------------------------------------------------------------
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
+
 /*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t*  const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
 * \brief  Function for RRC to configure a Radio Bearer.
 * \param[in]  ctxtP              Running context.
@@ -296,28 +285,13 @@ struct mac_data_ind   mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t
 * \return     A status about the processing, OK or error code.
 */
 rlc_op_status_t rrc_rlc_config_asn1_req (
-                  const protocol_ctxt_t* const,
-                  const LTE_SRB_ToAddModList_t* const ,
-                  const LTE_DRB_ToAddModList_t* const ,
-                  const LTE_DRB_ToReleaseList_t* const ,
-                  const LTE_PMCH_InfoList_r9_t * const pmch_info_listP ,
-                  const uint32_t ,
-                  const uint32_t );
-#else
-/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
-* \brief  Function for RRC to configure a Radio Bearer.
-* \param[in]  ctxtP              Running context.
-* \param[in]  srb2add_listP      SRB configuration list to be created.
-* \param[in]  drb2add_listP      DRB configuration list to be created.
-* \param[in]  drb2release_listP  DRB configuration list to be released.
-* \return     A status about the processing, OK or error code.
-*/
-rlc_op_status_t rrc_rlc_config_asn1_req (
-                  const protocol_ctxt_t* const,
-                  const LTE_SRB_ToAddModList_t* const ,
-                  const LTE_DRB_ToAddModList_t* const ,
-                  const LTE_DRB_ToReleaseList_t* const );
-#endif
+  const protocol_ctxt_t *const,
+  const LTE_SRB_ToAddModList_t *const,
+  const LTE_DRB_ToAddModList_t *const,
+  const LTE_DRB_ToReleaseList_t *const,
+  const LTE_PMCH_InfoList_r9_t *const pmch_info_listP,
+  const uint32_t,
+  const uint32_t );
 
 
 /*! \fn void rb_free_rlc_union (void *rlcu_pP)
@@ -326,7 +300,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (
  * \param[in]  rlcu_pP          Pointer on the rlc_union_t struct.
  */
 void
-               rb_free_rlc_union (void *rlcu_pP);
+rb_free_rlc_union (void *rlcu_pP);
 
 
 /*! \fn rlc_op_status_t rrc_rlc_remove_ue   (const protocol_ctxt_t* const ctxtP)
@@ -334,7 +308,7 @@ void
  * \param[in]  ctxtP              Running context.
  * \return     A status about the processing, OK or error code.
 */
-rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const);
+rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t *const);
 
 
 /*! \fn rlc_op_status_t rrc_rlc_remove_rlc   (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const  rb_id_t rb_idP)
@@ -345,7 +319,7 @@ rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const);
 * \param[in]  rb_idP             Radio bearer identifier.
 * \return     A status about the processing, OK or error code.
 */
-rlc_op_status_t rrc_rlc_remove_rlc   (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t, const  rb_id_t );
+rlc_op_status_t rrc_rlc_remove_rlc   (const protocol_ctxt_t *const, const srb_flag_t, const MBMS_flag_t, const  rb_id_t );
 
 /*! \fn rlc_union_t*  rrc_rlc_add_rlc   (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const  MBMS_flag_t MBMS_flagP, const  rb_id_t rb_idP, logical_chan_id_t chan_idP, rlc_mode_t rlc_modeP)
 * \brief  Add a RLC protocol instance to a radio bearer.
@@ -357,12 +331,10 @@ rlc_op_status_t rrc_rlc_remove_rlc   (const protocol_ctxt_t* const, const srb_fl
 * \param[in]  rlc_modeP          Mode of RLC (AM, UM, TM).
 * \return     A status about the processing, OK or error code.
 */
-rlc_union_t*  rrc_rlc_add_rlc      (const protocol_ctxt_t* const, const srb_flag_t,  const  MBMS_flag_t MBMS_flagP, const  rb_id_t, logical_chan_id_t, rlc_mode_t
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t  sourceL2Id,
-  const uint32_t  destinationL2Id
-#endif
-);
+rlc_union_t  *rrc_rlc_add_rlc      (const protocol_ctxt_t *const, const srb_flag_t,  const  MBMS_flag_t MBMS_flagP, const  rb_id_t, logical_chan_id_t, rlc_mode_t
+                                    ,const uint32_t  sourceL2Id,
+                                    const uint32_t  destinationL2Id
+                                   );
 
 /*! \fn rlc_op_status_t rrc_rlc_config_req (
      const protocol_ctxt_t* const ctxtP,
@@ -381,12 +353,12 @@ rlc_union_t*  rrc_rlc_add_rlc      (const protocol_ctxt_t* const, const srb_flag
 * \return     A status about the processing, OK or error code.
 */
 rlc_op_status_t rrc_rlc_config_req   (
-                  const protocol_ctxt_t* const,
-                  const srb_flag_t,
-                  const MBMS_flag_t,
-                  config_action_t,
-                  const  rb_id_t,
-                  rlc_info_t );
+  const protocol_ctxt_t *const,
+  const srb_flag_t,
+  const MBMS_flag_t,
+  config_action_t,
+  const  rb_id_t,
+  rlc_info_t );
 
 /*! \fn rlc_op_status_t rrc_rlc_data_req     (const protocol_ctxt_t* const ctxtP, const  MBMS_flag_t MBMS_flagP, const  rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, char* sduP)
 * \brief  Function for RRC to send a SDU through a Signalling Radio Bearer.
@@ -399,7 +371,7 @@ rlc_op_status_t rrc_rlc_config_req   (
 * \param[in]  sduP             SDU.
 * \return     A status about the processing, OK or error code.
 */
-rlc_op_status_t rrc_rlc_data_req     (const protocol_ctxt_t* const , const  MBMS_flag_t, const  rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
+rlc_op_status_t rrc_rlc_data_req     (const protocol_ctxt_t *const, const  MBMS_flag_t, const  rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
 
 /*! \fn void  rrc_rlc_register_rrc ( void (*rrc_data_indP)  (const protocol_ctxt_t* const ctxtP, const  rb_id_t rb_idP, sdu_size_t sdu_sizeP, char* sduP), void (*rrc_data_confP) (const protocol_ctxt_t* const ctxtP, const  rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP)
 * \brief  This function is called by RRC to register its DATA-INDICATE and DATA-CONFIRM handlers to RLC layer.
@@ -423,12 +395,10 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
 * \param [in,out] bufferP          Memory area to fill with the bytes requested by MAC.
 * \return     A status about the processing, OK or error code.
 */
-tbs_size_t            mac_rlc_data_req     (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const  eNB_flag_t, const  MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                                           ,const uint32_t sourceL2Id
-                                                           ,const uint32_t destinationL2Id
-#endif
-);
+tbs_size_t            mac_rlc_data_req     (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const  eNB_flag_t, const  MBMS_flag_t, logical_chan_id_t, const tb_size_t,char *
+    ,const uint32_t sourceL2Id
+    ,const uint32_t destinationL2Id
+                                           );
 
 /*! \fn void mac_rlc_data_ind     (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const  eNB_flag_t eNB_flagP, const  MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs)
 * \brief    Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier.
@@ -443,8 +413,8 @@ tbs_size_t            mac_rlc_data_req     (const module_id_t, const rnti_t, con
 * \param[in]  num_tbP          Number of transport blocks.
 * \param[in]  crcs             Array of CRC decoding.
 */
-void                  mac_rlc_data_ind     (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const  eNB_flag_t, const  MBMS_flag_t, logical_chan_id_t, char*, tb_size_t, num_tb_t,
-               crc_t* );
+void                  mac_rlc_data_ind     (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const  eNB_flag_t, const  MBMS_flag_t, logical_chan_id_t, char *, tb_size_t, num_tb_t,
+    crc_t * );
 
 /*! \fn mac_rlc_status_resp_t mac_rlc_status_ind     (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const  eNB_flag_t eNB_flagP, const  MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, tb_size_t tb_sizeP)
 * \brief    Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
@@ -459,11 +429,9 @@ void                  mac_rlc_data_ind     (const module_id_t, const rnti_t, con
 * \return     The maximum number of bytes that the RLC instance can send in the next transmission sequence.
 */
 mac_rlc_status_resp_t mac_rlc_status_ind   (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const  eNB_flag_t, const  MBMS_flag_t, logical_chan_id_t, tb_size_t
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                                           ,const uint32_t sourceL2Id
-                                                           ,const uint32_t destinationL2Id
-#endif
-  );
+    ,const uint32_t sourceL2Id
+    ,const uint32_t destinationL2Id
+                                           );
 
 /*! \fn rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, const frame_t frameP, const sub_frame_t subframeP,const eNB_flag_t enb_flagP, const logical_chan_id_t channel_idP)
 * \brief    Interface with MAC layer, UE only: request and get the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
@@ -487,9 +455,9 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t, const
  * @param sizeP      Number of octets in data buffer
  */
 void rlc_util_print_hex_octets(
-             const comp_name_t componentP,
-             unsigned char* const dataP,
-             const signed long sizeP);
+  const comp_name_t componentP,
+  unsigned char *const dataP,
+  const signed long sizeP);
 
 
 
@@ -506,19 +474,17 @@ void rlc_util_print_hex_octets(
 * \return     A status about the processing, OK or error code.
 */
 rlc_op_status_t rlc_data_req     (
-             const protocol_ctxt_t* const,
-             const  srb_flag_t,
-             const  MBMS_flag_t ,
-             const  rb_id_t ,
-             const  mui_t ,
-             const confirm_t ,
-             const sdu_size_t ,
-             mem_block_t * const
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-             ,const uint32_t * const
-             ,const uint32_t * const
-#endif
-             );
+  const protocol_ctxt_t *const,
+  const  srb_flag_t,
+  const  MBMS_flag_t,
+  const  rb_id_t,
+  const  mui_t,
+  const confirm_t,
+  const sdu_size_t,
+  mem_block_t *const,
+  const uint32_t *const,
+  const uint32_t *const
+);
 
 /*! \fn void rlc_data_ind     (const protocol_ctxt_t* const ctxtP, const  srb_flag_t srb_flagP, const  MBMS_flag_t MBMS_flagP, const  rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
 * \brief    Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
@@ -530,12 +496,12 @@ rlc_op_status_t rlc_data_req     (
 * \param[in]  sduP             SDU.
 */
 void rlc_data_ind(
-             const protocol_ctxt_t* const,
-             const srb_flag_t,
-             const MBMS_flag_t ,
-             const rb_id_t,
-             const sdu_size_t,
-             mem_block_t* const);
+  const protocol_ctxt_t *const,
+  const srb_flag_t,
+  const MBMS_flag_t,
+  const rb_id_t,
+  const sdu_size_t,
+  mem_block_t *const);
 
 
 /*! \fn void rlc_data_conf     (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const  rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
@@ -547,11 +513,11 @@ void rlc_data_ind(
 * \param[in]  statusP          Status of the transmission (RLC_SDU_CONFIRM_YES, RLC_SDU_CONFIRM_NO).
 */
 void rlc_data_conf(
-             const protocol_ctxt_t* const,
-             const  srb_flag_t,
-             const  rb_id_t,
-             const mui_t,
-             const rlc_tx_status_t );
+  const protocol_ctxt_t *const,
+  const  srb_flag_t,
+  const  rb_id_t,
+  const mui_t,
+  const rlc_tx_status_t );
 
 
 /*! \fn rlc_op_status_t rlc_stat_req     (
@@ -559,7 +525,7 @@ void rlc_data_conf(
                         const  srb_flag_t    srb_flagP,
                         const  rb_id_t       rb_idP,
                         unsigned int* stat_rlc_mode,
-			unsigned int* stat_tx_pdcp_sdu,
+      unsigned int* stat_tx_pdcp_sdu,
                         unsigned int* stat_tx_pdcp_bytes,
                         unsigned int* stat_tx_pdcp_sdu_discarded,
                         unsigned int* stat_tx_pdcp_bytes_discarded,
@@ -591,7 +557,7 @@ void rlc_data_conf(
 * \param[in]  ctxtP                Running context.
 * \param[in]  srb_flagP            Flag to indicate signalling radio bearer (1) or data radio bearer (0).
 * \param[in]  rb_idP                       .
-* \param[out] stat_rlc_mode                        RLC mode 
+* \param[out] stat_rlc_mode                        RLC mode
 * \param[out] stat_tx_pdcp_sdu                     Number of SDUs coming from upper layers.
 * \param[out] stat_tx_pdcp_bytes                   Number of bytes coming from upper layers.
 * \param[out] stat_tx_pdcp_sdu_discarded           Number of discarded SDUs coming from upper layers.
@@ -622,37 +588,37 @@ void rlc_data_conf(
 */
 
 rlc_op_status_t rlc_stat_req     (
-             const protocol_ctxt_t* const ctxtP,
-             const srb_flag_t    srb_flagP,
-             const rb_id_t       rb_idP,
-             unsigned int* const stat_rlc_mode,
-	     unsigned int* const stat_tx_pdcp_sdu,
-             unsigned int* const stat_tx_pdcp_bytes,
-             unsigned int* const stat_tx_pdcp_sdu_discarded,
-             unsigned int* const stat_tx_pdcp_bytes_discarded,
-             unsigned int* const stat_tx_data_pdu,
-             unsigned int* const stat_tx_data_bytes,
-             unsigned int* const stat_tx_retransmit_pdu_by_status,
-             unsigned int* const stat_tx_retransmit_bytes_by_status,
-             unsigned int* const stat_tx_retransmit_pdu,
-             unsigned int* const stat_tx_retransmit_bytes,
-             unsigned int* const stat_tx_control_pdu,
-             unsigned int* const stat_tx_control_bytes,
-             unsigned int* const stat_rx_pdcp_sdu,
-             unsigned int* const stat_rx_pdcp_bytes,
-             unsigned int* const stat_rx_data_pdus_duplicate,
-             unsigned int* const stat_rx_data_bytes_duplicate,
-             unsigned int* const stat_rx_data_pdu,
-             unsigned int* const stat_rx_data_bytes,
-             unsigned int* const stat_rx_data_pdu_dropped,
-             unsigned int* const stat_rx_data_bytes_dropped,
-             unsigned int* const stat_rx_data_pdu_out_of_window,
-             unsigned int* const stat_rx_data_bytes_out_of_window,
-             unsigned int* const stat_rx_control_pdu,
-             unsigned int* const stat_rx_control_bytes,
-             unsigned int* const stat_timer_reordering_timed_out,
-             unsigned int* const stat_timer_poll_retransmit_timed_out,
-             unsigned int* const stat_timer_status_prohibit_timed_out);
+  const protocol_ctxt_t *const ctxtP,
+  const srb_flag_t    srb_flagP,
+  const rb_id_t       rb_idP,
+  unsigned int *const stat_rlc_mode,
+  unsigned int *const stat_tx_pdcp_sdu,
+  unsigned int *const stat_tx_pdcp_bytes,
+  unsigned int *const stat_tx_pdcp_sdu_discarded,
+  unsigned int *const stat_tx_pdcp_bytes_discarded,
+  unsigned int *const stat_tx_data_pdu,
+  unsigned int *const stat_tx_data_bytes,
+  unsigned int *const stat_tx_retransmit_pdu_by_status,
+  unsigned int *const stat_tx_retransmit_bytes_by_status,
+  unsigned int *const stat_tx_retransmit_pdu,
+  unsigned int *const stat_tx_retransmit_bytes,
+  unsigned int *const stat_tx_control_pdu,
+  unsigned int *const stat_tx_control_bytes,
+  unsigned int *const stat_rx_pdcp_sdu,
+  unsigned int *const stat_rx_pdcp_bytes,
+  unsigned int *const stat_rx_data_pdus_duplicate,
+  unsigned int *const stat_rx_data_bytes_duplicate,
+  unsigned int *const stat_rx_data_pdu,
+  unsigned int *const stat_rx_data_bytes,
+  unsigned int *const stat_rx_data_pdu_dropped,
+  unsigned int *const stat_rx_data_bytes_dropped,
+  unsigned int *const stat_rx_data_pdu_out_of_window,
+  unsigned int *const stat_rx_data_bytes_out_of_window,
+  unsigned int *const stat_rx_control_pdu,
+  unsigned int *const stat_rx_control_bytes,
+  unsigned int *const stat_timer_reordering_timed_out,
+  unsigned int *const stat_timer_poll_retransmit_timed_out,
+  unsigned int *const stat_timer_status_prohibit_timed_out);
 
 /*! \fn int rlc_module_init(void)
 * \brief    RAZ the memory of the RLC layer, initialize the memory pool manager (mem_block_t structures mainly used in RLC module).
diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c
index b539970704c3f89ba280f1c44202ea8abea369b4..9cf6cb739a05f4f43523d004fb18911cb71f7b8b 100644
--- a/openair2/LAYER2/RLC/rlc_mac.c
+++ b/openair2/LAYER2/RLC/rlc_mac.c
@@ -45,14 +45,12 @@ struct mac_data_ind mac_rlc_deserialize_tb (
   char     *buffer_pP,
   const tb_size_t tb_sizeP,
   num_tb_t  num_tbP,
-  crc_t    *crcs_pP)
-{
+  crc_t    *crcs_pP) {
   //-----------------------------------------------------------------------------
   struct mac_data_ind  data_ind;
-  mem_block_t*         tb_p;
+  mem_block_t         *tb_p;
   num_tb_t             nb_tb_read;
   tbs_size_t           tbs_size;
-
   nb_tb_read = 0;
   tbs_size   = 0;
   list_init(&data_ind.data, NULL);
@@ -62,7 +60,7 @@ struct mac_data_ind mac_rlc_deserialize_tb (
 
     if (tb_p != NULL) {
       ((struct mac_tb_ind *) (tb_p->data))->first_bit = 0;
-      ((struct mac_tb_ind *) (tb_p->data))->data_ptr = (uint8_t*)&tb_p->data[sizeof (mac_rlc_max_rx_header_size_t)];
+      ((struct mac_tb_ind *) (tb_p->data))->data_ptr = (uint8_t *)&tb_p->data[sizeof (mac_rlc_max_rx_header_size_t)];
       ((struct mac_tb_ind *) (tb_p->data))->size = tb_sizeP;
 
       if (crcs_pP) {
@@ -72,7 +70,6 @@ struct mac_data_ind mac_rlc_deserialize_tb (
       }
 
       memcpy(((struct mac_tb_ind *) (tb_p->data))->data_ptr, &buffer_pP[tbs_size], tb_sizeP);
-
 #ifdef DEBUG_MAC_INTERFACE
       LOG_T(RLC, "[MAC-RLC] DUMP RX PDU(%d bytes):\n", tb_sizeP);
       rlc_util_print_hex_octets(RLC, ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_sizeP);
@@ -87,17 +84,14 @@ struct mac_data_ind mac_rlc_deserialize_tb (
 
   data_ind.no_tb            = nb_tb_read;
   data_ind.tb_size          = tb_sizeP << 3;
-
   return data_ind;
 }
 //-----------------------------------------------------------------------------
-tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP)
-{
+tbs_size_t mac_rlc_serialize_tb (char *buffer_pP, list_t transport_blocksP) {
   //-----------------------------------------------------------------------------
   mem_block_t *tb_p;
   tbs_size_t   tbs_size;
   tbs_size_t   tb_size;
-
   tbs_size = 0;
 
   while (transport_blocksP.nb_elements > 0) {
@@ -127,13 +121,10 @@ tbs_size_t mac_rlc_data_req(
   const MBMS_flag_t       MBMS_flagP,
   const logical_chan_id_t channel_idP,
   const tb_size_t         tb_sizeP,
-  char             *buffer_pP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t sourceL2Id
-  ,const uint32_t destinationL2Id
-#endif
-   )
-{
+  char             *buffer_pP,
+  const uint32_t sourceL2Id,
+  const uint32_t destinationL2Id
+) {
   //-----------------------------------------------------------------------------
   struct mac_data_req    data_request;
   rlc_mode_t             rlc_mode        = RLC_MODE_NONE;
@@ -144,9 +135,7 @@ tbs_size_t mac_rlc_data_req(
   srb_flag_t             srb_flag        = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
   tbs_size_t             ret_tb_size         = 0;
   protocol_ctxt_t     ctxt;
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0,eNB_index);
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
 #ifdef DEBUG_MAC_INTERFACE
   LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d\n",
@@ -154,21 +143,20 @@ tbs_size_t mac_rlc_data_req(
         channel_idP,
         RLC_MAX_LC,
         NB_RB_MAX);
-
 #endif // DEBUG_MAC_INTERFACE
 
   if (MBMS_flagP) {
     //AssertFatal (channel_idP < RLC_MAX_MBMS_LC,        "channel id is too high (%u/%d)!\n",     channel_idP, RLC_MAX_MBMS_LC);
-  	if(channel_idP >= RLC_MAX_MBMS_LC){
-  		LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
-  		return 0;
-  	}
+    if(channel_idP >= RLC_MAX_MBMS_LC) {
+      LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
+      return 0;
+    }
   } else {
     //AssertFatal (channel_idP < NB_RB_MAX,        "channel id is too high (%u/%d)!\n",     channel_idP, NB_RB_MAX);
-  	if(channel_idP >= NB_RB_MAX){
-  		LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
-  		return 0;
-  	}
+    if(channel_idP >= NB_RB_MAX) {
+      LOG_E(RLC, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
+      return 0;
+    }
   }
 
   if (MBMS_flagP) {
@@ -180,54 +168,57 @@ tbs_size_t mac_rlc_data_req(
     }
   } else {
     key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
     if ((sourceL2Id > 0) && (destinationL2Id > 0))
-       key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
-#endif
+      key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
   }
 
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     rlc_mode = rlc_union_p->mode;
   } else {
     rlc_mode = RLC_MODE_NONE;
     //AssertFatal (0 , "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
-  	LOG_E(RLC, "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
+    LOG_E(RLC, "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
   }
 
   switch (rlc_mode) {
-  case RLC_MODE_NONE:
-    ret_tb_size =0;
-    break;
-
-  case RLC_MODE_AM:
-    rlc_am_mui.rrc_mui_num = 0;
-    if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
-	data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
-    ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
-    break;
-
-  case RLC_MODE_UM:
-    if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
-	data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
-    ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
-    break;
-
-  case RLC_MODE_TM:
-    data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
-    ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
-    break;
-
-  default:
-    ;
+    case RLC_MODE_NONE:
+      ret_tb_size =0;
+      break;
+
+    case RLC_MODE_AM:
+      rlc_am_mui.rrc_mui_num = 0;
+
+      if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
+
+      data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
+      ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
+      break;
+
+    case RLC_MODE_UM:
+      if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
+
+      data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
+      ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
+      break;
+
+    case RLC_MODE_TM:
+      data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
+      ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
+      break;
+
+    default:
+      ;
   }
 
 #if T_TRACER
+
   if (enb_flagP)
     T(T_ENB_RLC_MAC_DL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(ret_tb_size));
-#endif
 
+#endif
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_OUT);
   return ret_tb_size;
 }
@@ -243,8 +234,7 @@ void mac_rlc_data_ind     (
   char                     *buffer_pP,
   const tb_size_t           tb_sizeP,
   num_tb_t                  num_tbP,
-  crc_t                    *crcs_pP)
-{
+  crc_t                    *crcs_pP) {
   //-----------------------------------------------------------------------------
   rlc_mode_t             rlc_mode   = RLC_MODE_NONE;
   rlc_mbms_id_t         *mbms_id_p  = NULL;
@@ -253,10 +243,7 @@ void mac_rlc_data_ind     (
   hashtable_rc_t         h_rc;
   srb_flag_t             srb_flag        = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
   protocol_ctxt_t     ctxt;
-
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0, eNB_index);
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
 #ifdef DEBUG_MAC_INTERFACE
 
@@ -270,10 +257,11 @@ void mac_rlc_data_ind     (
   }
 
 #endif // DEBUG_MAC_INTERFACE
-
 #if T_TRACER
+
   if (enb_flagP)
     T(T_ENB_RLC_MAC_UL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(tb_sizeP));
+
 #endif
 
   if (MBMS_flagP) {
@@ -287,7 +275,7 @@ void mac_rlc_data_ind     (
     key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
   }
 
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     rlc_mode = rlc_union_p->mode;
@@ -299,26 +287,25 @@ void mac_rlc_data_ind     (
   struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP);
 
   switch (rlc_mode) {
-  case RLC_MODE_NONE:
-    //handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
-    list_free (&data_ind.data);
-    break;
-
-  case RLC_MODE_AM:
-    rlc_am_mac_data_indication(&ctxt, &rlc_union_p->rlc.am, data_ind);
-    break;
-
-  case RLC_MODE_UM:
-    rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
-    break;
-
-  case RLC_MODE_TM:
-    rlc_tm_mac_data_indication(&ctxt, &rlc_union_p->rlc.tm, data_ind);
-    break;
+    case RLC_MODE_NONE:
+      //handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
+      list_free (&data_ind.data);
+      break;
+
+    case RLC_MODE_AM:
+      rlc_am_mac_data_indication(&ctxt, &rlc_union_p->rlc.am, data_ind);
+      break;
+
+    case RLC_MODE_UM:
+      rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
+      break;
+
+    case RLC_MODE_TM:
+      rlc_tm_mac_data_indication(&ctxt, &rlc_union_p->rlc.tm, data_ind);
+      break;
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_OUT);
-
 }
 //-----------------------------------------------------------------------------
 mac_rlc_status_resp_t mac_rlc_status_ind(
@@ -326,17 +313,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
   const rnti_t            rntiP,
   const eNB_index_t       eNB_index,
   const frame_t           frameP,
-  const sub_frame_t 	  subframeP,
+  const sub_frame_t     subframeP,
   const eNB_flag_t        enb_flagP,
   const MBMS_flag_t       MBMS_flagP,
   const logical_chan_id_t channel_idP,
-  const tb_size_t         tb_sizeP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t sourceL2Id
-  ,const uint32_t destinationL2Id
-#endif
-  )
-{
+  const tb_size_t         tb_sizeP,
+  const uint32_t sourceL2Id,
+  const uint32_t destinationL2Id
+) {
   //-----------------------------------------------------------------------------
   mac_rlc_status_resp_t  mac_rlc_status_resp;
   struct mac_status_ind  tx_status;
@@ -348,12 +332,10 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
   hashtable_rc_t         h_rc;
   srb_flag_t             srb_flag    = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
   protocol_ctxt_t     ctxt;
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, subframeP, eNB_index);
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
   memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t));
-  memset (&tx_status          , 0, sizeof(struct mac_status_ind));
+  memset (&tx_status, 0, sizeof(struct mac_status_ind));
 
   if (MBMS_flagP) {
     if (enb_flagP) {
@@ -364,17 +346,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
 
     key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
   } else {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     if ((sourceL2Id > 0) && (destinationL2Id > 0)) {
-       key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
-    } else
-#endif
-    {
-    key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
+      key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
+    } else {
+      key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
     }
-}
+  }
 
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     rlc_mode = rlc_union_p->mode;
@@ -385,39 +364,39 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
   }
 
   switch (rlc_mode) {
-  case RLC_MODE_NONE:
-    //handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
-    mac_rlc_status_resp.bytes_in_buffer                 = 0;
-    break;
-
-  case RLC_MODE_AM:
-    status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP);
-    mac_rlc_status_resp.bytes_in_buffer                 = status_resp.buffer_occupancy_in_bytes;
-    mac_rlc_status_resp.head_sdu_creation_time          = status_resp.head_sdu_creation_time;
-    mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
-    mac_rlc_status_resp.head_sdu_is_segmented           = status_resp.head_sdu_is_segmented;
-    //return mac_rlc_status_resp;
-    break;
-
-  case RLC_MODE_UM:
-    status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP);
-    mac_rlc_status_resp.bytes_in_buffer                 = status_resp.buffer_occupancy_in_bytes;
-    mac_rlc_status_resp.pdus_in_buffer                  = status_resp.buffer_occupancy_in_pdus;
-    mac_rlc_status_resp.head_sdu_creation_time          = status_resp.head_sdu_creation_time;
-    mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
-    mac_rlc_status_resp.head_sdu_is_segmented           = status_resp.head_sdu_is_segmented;
-    //   return mac_rlc_status_resp;
-    break;
-
-  case RLC_MODE_TM:
-    status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
-    mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
-    mac_rlc_status_resp.pdus_in_buffer  = status_resp.buffer_occupancy_in_pdus;
-    // return mac_rlc_status_resp;
-    break;
-
-  default:
-    mac_rlc_status_resp.bytes_in_buffer                 = 0 ;
+    case RLC_MODE_NONE:
+      //handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
+      mac_rlc_status_resp.bytes_in_buffer                 = 0;
+      break;
+
+    case RLC_MODE_AM:
+      status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP);
+      mac_rlc_status_resp.bytes_in_buffer                 = status_resp.buffer_occupancy_in_bytes;
+      mac_rlc_status_resp.head_sdu_creation_time          = status_resp.head_sdu_creation_time;
+      mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
+      mac_rlc_status_resp.head_sdu_is_segmented           = status_resp.head_sdu_is_segmented;
+      //return mac_rlc_status_resp;
+      break;
+
+    case RLC_MODE_UM:
+      status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP);
+      mac_rlc_status_resp.bytes_in_buffer                 = status_resp.buffer_occupancy_in_bytes;
+      mac_rlc_status_resp.pdus_in_buffer                  = status_resp.buffer_occupancy_in_pdus;
+      mac_rlc_status_resp.head_sdu_creation_time          = status_resp.head_sdu_creation_time;
+      mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
+      mac_rlc_status_resp.head_sdu_is_segmented           = status_resp.head_sdu_is_segmented;
+      //   return mac_rlc_status_resp;
+      break;
+
+    case RLC_MODE_TM:
+      status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
+      mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
+      mac_rlc_status_resp.pdus_in_buffer  = status_resp.buffer_occupancy_in_pdus;
+      // return mac_rlc_status_resp;
+      break;
+
+    default:
+      mac_rlc_status_resp.bytes_in_buffer                 = 0 ;
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_OUT);
@@ -430,10 +409,9 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
   const rnti_t            rntiP,
   const eNB_index_t       eNB_index,
   const frame_t           frameP,
-  const sub_frame_t 	  subframeP,
+  const sub_frame_t     subframeP,
   const eNB_flag_t        enb_flagP,
-  const logical_chan_id_t channel_idP)
-{
+  const logical_chan_id_t channel_idP) {
   //-----------------------------------------------------------------------------
   rlc_buffer_occupancy_t  mac_rlc_buffer_occupancy_resp = 0;
   rlc_mode_t             rlc_mode    = RLC_MODE_NONE;
@@ -442,26 +420,21 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
   hashtable_rc_t         h_rc;
   srb_flag_t             srb_flag    = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
   protocol_ctxt_t     ctxt;
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0, eNB_index);
 
   //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_GET_BUFFER_OCCUPANCY_IND,VCD_FUNCTION_IN);
 
-
   /* Assumptions : for UE only */
   /* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */
   /* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */
   //AssertFatal(enb_flagP == FALSE,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
-	if(enb_flagP != FALSE){
-		LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
-		return 0;
-	}
-	
+  if(enb_flagP != FALSE) {
+    LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
+    return 0;
+  }
 
   key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
-
-
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     rlc_mode = rlc_union_p->mode;
@@ -472,20 +445,19 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
   }
 
   switch (rlc_mode) {
-   case RLC_MODE_AM:
-    mac_rlc_buffer_occupancy_resp = rlc_am_get_buffer_occupancy_in_bytes(&ctxt, &rlc_union_p->rlc.am);
-    break;
+    case RLC_MODE_AM:
+      mac_rlc_buffer_occupancy_resp = rlc_am_get_buffer_occupancy_in_bytes(&ctxt, &rlc_union_p->rlc.am);
+      break;
 
-  case RLC_MODE_UM:
-	mac_rlc_buffer_occupancy_resp = rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um);
-    break;
+    case RLC_MODE_UM:
+      mac_rlc_buffer_occupancy_resp = rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um);
+      break;
 
-  default:
-	  mac_rlc_buffer_occupancy_resp                 = 0 ;
+    default:
+      mac_rlc_buffer_occupancy_resp                 = 0 ;
   }
 
   //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_GET_BUFFER_OCCUPANCY_IND,VCD_FUNCTION_OUT);
-
   return mac_rlc_buffer_occupancy_resp;
 }
 
diff --git a/openair2/LAYER2/RLC/rlc_mpls.c b/openair2/LAYER2/RLC/rlc_mpls.c
index d6f7afa12d2ef99b22c7265b4519fb94e596605a..754f1e76aaf4744d97dfaee56333c4ed4c4e501f 100644
--- a/openair2/LAYER2/RLC/rlc_mpls.c
+++ b/openair2/LAYER2/RLC/rlc_mpls.c
@@ -33,17 +33,12 @@
 
 //-----------------------------------------------------------------------------
 rlc_op_status_t mpls_rlc_data_req     (
-  const protocol_ctxt_t* const ctxtP,
+  const protocol_ctxt_t *const ctxtP,
   const rb_id_t rb_idP,
   const sdu_size_t sdu_sizeP,
-  mem_block_t* const sduP)
-{
+  mem_block_t *const sduP) {
   //-----------------------------------------------------------------------------
   // third arg should be set to 1 or 0
-  return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                      ,NULL, NULL
-#endif
-                      );
+  return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP,NULL, NULL );
 }
 
diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c
index 63c24d6e3c96e648d1050d9666bd5071d34ceb3b..4c04b9f66208ef5ca353c03ed2ce3a2f2ff84308 100644
--- a/openair2/LAYER2/RLC/rlc_rrc.c
+++ b/openair2/LAYER2/RLC/rlc_rrc.c
@@ -39,51 +39,41 @@
 #include "LTE_SRB-ToAddMod.h"
 #include "LTE_SRB-ToAddModList.h"
 #include "LTE_DL-UM-RLC.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 #include "LTE_PMCH-InfoList-r9.h"
-#endif
 
 #include "LAYER2/MAC/mac_extern.h"
 #include "assertions.h"
 //-----------------------------------------------------------------------------
-rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP,
-    const LTE_SRB_ToAddModList_t   * const srb2add_listP,
-    const LTE_DRB_ToAddModList_t   * const drb2add_listP,
-    const LTE_DRB_ToReleaseList_t  * const drb2release_listP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-    ,const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP
-    ,const uint32_t sourceL2Id
-    ,const uint32_t destinationL2Id
-#endif
-                                        )
-{
+rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t    *const ctxt_pP,
+    const LTE_SRB_ToAddModList_t    *const srb2add_listP,
+    const LTE_DRB_ToAddModList_t    *const drb2add_listP,
+    const LTE_DRB_ToReleaseList_t   *const drb2release_listP,
+    const LTE_PMCH_InfoList_r9_t *const pmch_InfoList_r9_pP,
+    const uint32_t sourceL2Id,
+    const uint32_t destinationL2Id
+
+                                        ) {
   //-----------------------------------------------------------------------------
   rb_id_t                rb_id           = 0;
   logical_chan_id_t      lc_id           = 0;
   LTE_DRB_Identity_t     drb_id          = 0;
-  LTE_DRB_Identity_t*    pdrb_id         = NULL;
+  LTE_DRB_Identity_t    *pdrb_id         = NULL;
   long int               cnt             = 0;
   const LTE_SRB_ToAddMod_t  *srb_toaddmod_p  = NULL;
   const LTE_DRB_ToAddMod_t  *drb_toaddmod_p  = NULL;
   rlc_union_t           *rlc_union_p     = NULL;
   hash_key_t             key             = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t         h_rc;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   int                        i, j;
   LTE_MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
   LTE_MBMS_SessionInfo_r9_t     *MBMS_SessionInfo_p        = NULL;
   mbms_session_id_t          mbms_session_id;
   mbms_service_id_t          mbms_service_id;
   LTE_DL_UM_RLC_t                dl_um_rlc;
-
-
-#endif
-
   /* for no gcc warnings */
   (void)rlc_union_p;
   (void)key;
   (void)h_rc;
-
   LOG_D(RLC, PROTOCOL_CTXT_FMT" CONFIG REQ ASN1 \n",
         PROTOCOL_CTXT_ARGS(ctxt_pP));
 
@@ -91,182 +81,147 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
     for (cnt=0; cnt<srb2add_listP->list.count; cnt++) {
       rb_id = srb2add_listP->list.array[cnt]->srb_Identity;
       lc_id = rb_id;
-
       LOG_D(RLC, "Adding SRB %ld, rb_id %d\n",srb2add_listP->list.array[cnt]->srb_Identity,rb_id);
       srb_toaddmod_p = srb2add_listP->list.array[cnt];
 
       if (srb_toaddmod_p->rlc_Config) {
         switch (srb_toaddmod_p->rlc_Config->present) {
-        case LTE_SRB_ToAddMod__rlc_Config_PR_NOTHING:
-          break;
-
-        case LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue:
-          switch (srb_toaddmod_p->rlc_Config->choice.explicitValue.present) {
-          case LTE_RLC_Config_PR_NOTHING:
+          case LTE_SRB_ToAddMod__rlc_Config_PR_NOTHING:
             break;
 
-          case LTE_RLC_Config_PR_am:
-            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,0,
-                                0
-#endif
-                  ) != NULL) {
-              config_req_rlc_am_asn1 (
-                ctxt_pP,
-                SRB_FLAG_YES,
-                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
-                rb_id, lc_id);
-            } else {
-              LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
-                    PROTOCOL_CTXT_ARGS(ctxt_pP),
-                    rb_id);
+          case LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue:
+            switch (srb_toaddmod_p->rlc_Config->choice.explicitValue.present) {
+              case LTE_RLC_Config_PR_NOTHING:
+                break;
+
+              case LTE_RLC_Config_PR_am:
+                if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM,0, 0 ) != NULL) {
+                  config_req_rlc_am_asn1 (
+                    ctxt_pP,
+                    SRB_FLAG_YES,
+                    &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
+                    rb_id, lc_id);
+                } else {
+                  LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
+                        PROTOCOL_CTXT_ARGS(ctxt_pP),
+                        rb_id);
+                }
+
+                break;
+
+              case LTE_RLC_Config_PR_um_Bi_Directional:
+                if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM,0,0 ) != NULL) {
+                  config_req_rlc_um_asn1(
+                    ctxt_pP,
+                    SRB_FLAG_YES,
+                    MBMS_FLAG_NO,
+                    UNUSED_PARAM_MBMS_SESSION_ID,
+                    UNUSED_PARAM_MBMS_SERVICE_ID,
+                    &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC,
+                    &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC,
+                    rb_id, lc_id,0, 0
+                  );
+                } else {
+                  LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
+                        PROTOCOL_CTXT_ARGS(ctxt_pP),
+                        rb_id);
+                }
+
+                break;
+
+              case LTE_RLC_Config_PR_um_Uni_Directional_UL:
+                if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM,0, 0 ) != NULL) {
+                  config_req_rlc_um_asn1(
+                    ctxt_pP,
+                    SRB_FLAG_YES,
+                    MBMS_FLAG_NO,
+                    UNUSED_PARAM_MBMS_SESSION_ID,
+                    UNUSED_PARAM_MBMS_SERVICE_ID,
+                    &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_UL.ul_UM_RLC,
+                    NULL,
+                    rb_id, lc_id,0, 0
+                  );
+                } else {
+                  LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
+                        PROTOCOL_CTXT_ARGS(ctxt_pP),
+                        rb_id);
+                }
+
+                break;
+
+              case LTE_RLC_Config_PR_um_Uni_Directional_DL:
+                if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM,0, 0 ) != NULL) {
+                  config_req_rlc_um_asn1(
+                    ctxt_pP,
+                    SRB_FLAG_YES,
+                    MBMS_FLAG_NO,
+                    UNUSED_PARAM_MBMS_SESSION_ID,
+                    UNUSED_PARAM_MBMS_SERVICE_ID,
+                    NULL,
+                    &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_DL.dl_UM_RLC,
+                    rb_id, lc_id,0, 0
+                  );
+                } else {
+                  LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
+                        PROTOCOL_CTXT_ARGS(ctxt_pP),
+                        rb_id);
+                }
+
+                break;
+
+              default:
+                LOG_E(RLC, PROTOCOL_CTXT_FMT" UNKNOWN RLC CONFIG %d \n",
+                      PROTOCOL_CTXT_ARGS(ctxt_pP),
+                      srb_toaddmod_p->rlc_Config->choice.explicitValue.present);
+                break;
             }
 
             break;
 
-          case LTE_RLC_Config_PR_um_Bi_Directional:
-            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,0,
-                                0
-#endif
-            ) != NULL) {
-              config_req_rlc_um_asn1(
-                ctxt_pP,
-                SRB_FLAG_YES,
-                MBMS_FLAG_NO,
-                UNUSED_PARAM_MBMS_SESSION_ID,
-                UNUSED_PARAM_MBMS_SERVICE_ID,
-                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC,
-                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC,
-                rb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0, 0
-#endif
-               );
-            } else {
-              LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
-                    PROTOCOL_CTXT_ARGS(ctxt_pP),
-                    rb_id);
-            }
-
-            break;
-
-          case LTE_RLC_Config_PR_um_Uni_Directional_UL:
-            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,0,
-                                 0
-#endif
-                  ) != NULL) {
-              config_req_rlc_um_asn1(
-                ctxt_pP,
-                SRB_FLAG_YES,
-                MBMS_FLAG_NO,
-                UNUSED_PARAM_MBMS_SESSION_ID,
-                UNUSED_PARAM_MBMS_SERVICE_ID,
-                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_UL.ul_UM_RLC,
-                NULL,
-                rb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0, 0
-#endif
-               );
-            } else {
-              LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
-                    PROTOCOL_CTXT_ARGS(ctxt_pP),
-                    rb_id);
-            }
-
-            break;
-
-          case LTE_RLC_Config_PR_um_Uni_Directional_DL:
-            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,0,
-                                 0
-#endif
-                                 ) != NULL) {
-              config_req_rlc_um_asn1(
+          case LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue:
+            //#warning TO DO SRB_ToAddMod__rlc_Config_PR_defaultValue
+            LOG_I(RRC, "RLC SRB1 is default value !!\n");
+            struct LTE_RLC_Config__am    *config_am_pP = &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am;
+            config_am_pP->dl_AM_RLC.t_Reordering     = LTE_T_Reordering_ms35;
+            config_am_pP->dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
+            config_am_pP->ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms45;
+            config_am_pP->ul_AM_RLC.pollPDU          = LTE_PollPDU_pInfinity;
+            config_am_pP->ul_AM_RLC.pollByte         = LTE_PollByte_kBinfinity;
+            config_am_pP->ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t4;
+
+            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM,0, 0 ) != NULL) {
+              config_req_rlc_am_asn1 (
                 ctxt_pP,
                 SRB_FLAG_YES,
-                MBMS_FLAG_NO,
-                UNUSED_PARAM_MBMS_SESSION_ID,
-                UNUSED_PARAM_MBMS_SERVICE_ID,
-                NULL,
-                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_DL.dl_UM_RLC,
-                rb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0, 0
-#endif
-               );
+                &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
+                rb_id,lc_id);
             } else {
               LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
                     PROTOCOL_CTXT_ARGS(ctxt_pP),
                     rb_id);
             }
 
+            /*
+                      if (rrc_rlc_add_rlc   (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
+                        config_req_rlc_um_asn1(
+                          ctxt_pP,
+                          SRB_FLAG_YES,
+                          MBMS_FLAG_NO,
+                          UNUSED_PARAM_MBMS_SESSION_ID,
+                          UNUSED_PARAM_MBMS_SERVICE_ID,
+                          NULL, // TO DO DEFAULT CONFIG
+                          NULL, // TO DO DEFAULT CONFIG
+                          rb_id, lc_id);
+                      } else {
+                        LOG_D(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
+                              PROTOCOL_CTXT_ARGS(ctxt_pP),
+                              rb_id);
+                      }
+                      */
             break;
 
           default:
-            LOG_E(RLC, PROTOCOL_CTXT_FMT" UNKNOWN RLC CONFIG %d \n",
-                  PROTOCOL_CTXT_ARGS(ctxt_pP),
-                  srb_toaddmod_p->rlc_Config->choice.explicitValue.present);
-            break;
-          }
-
-          break;
-
-        case LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue:
-//#warning TO DO SRB_ToAddMod__rlc_Config_PR_defaultValue
-          LOG_I(RRC, "RLC SRB1 is default value !!\n");
-          struct LTE_RLC_Config__am  *  config_am_pP = &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am;
-          config_am_pP->dl_AM_RLC.t_Reordering     = LTE_T_Reordering_ms35;
-          config_am_pP->dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
-          config_am_pP->ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms45;
-          config_am_pP->ul_AM_RLC.pollPDU          = LTE_PollPDU_pInfinity;
-          config_am_pP->ul_AM_RLC.pollByte         = LTE_PollByte_kBinfinity;
-          config_am_pP->ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t4;
-
-          if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,0,
-                               0
-#endif
-                               ) != NULL) {
-            config_req_rlc_am_asn1 (
-              ctxt_pP,
-              SRB_FLAG_YES,
-              &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
-              rb_id,lc_id);
-          } else {
-            LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
-                  PROTOCOL_CTXT_ARGS(ctxt_pP),
-                  rb_id);
-          }
-/*
-          if (rrc_rlc_add_rlc   (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
-            config_req_rlc_um_asn1(
-              ctxt_pP,
-              SRB_FLAG_YES,
-              MBMS_FLAG_NO,
-              UNUSED_PARAM_MBMS_SESSION_ID,
-              UNUSED_PARAM_MBMS_SERVICE_ID,
-              NULL, // TO DO DEFAULT CONFIG
-              NULL, // TO DO DEFAULT CONFIG
-              rb_id, lc_id);
-          } else {
-            LOG_D(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
-                  PROTOCOL_CTXT_ARGS(ctxt_pP),
-                  rb_id);
-          }
-          */
-
-          break;
-
-        default:
-          ;
+            ;
         }
       }
     }
@@ -275,8 +230,8 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
   if (drb2add_listP != NULL) {
     for (cnt=0; cnt<drb2add_listP->list.count; cnt++) {
       drb_toaddmod_p = drb2add_listP->list.array[cnt];
-
       drb_id = drb_toaddmod_p->drb_Identity;
+
       if (drb_toaddmod_p->logicalChannelIdentity) {
         lc_id = *drb_toaddmod_p->logicalChannelIdentity;
       } else {
@@ -292,104 +247,75 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
       LOG_D(RLC, "Adding DRB %ld, lc_id %d\n",drb_id,lc_id);
 
       if (drb_toaddmod_p->rlc_Config) {
-
         switch (drb_toaddmod_p->rlc_Config->present) {
-        case LTE_RLC_Config_PR_NOTHING:
-          break;
+          case LTE_RLC_Config_PR_NOTHING:
+            break;
 
-        case LTE_RLC_Config_PR_am:
-          if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,0,
-                               0
-#endif
-            ) != NULL) {
-            config_req_rlc_am_asn1 (
-              ctxt_pP,
-              SRB_FLAG_NO,
-              &drb_toaddmod_p->rlc_Config->choice.am,
-              drb_id, lc_id);
-          }
+          case LTE_RLC_Config_PR_am:
+            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM,0, 0 ) != NULL) {
+              config_req_rlc_am_asn1 (
+                ctxt_pP,
+                SRB_FLAG_NO,
+                &drb_toaddmod_p->rlc_Config->choice.am,
+                drb_id, lc_id);
+            }
 
-          break;
+            break;
 
-        case LTE_RLC_Config_PR_um_Bi_Directional:
-          if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,sourceL2Id,
-                               destinationL2Id
-#endif
-              ) != NULL) {
-            config_req_rlc_um_asn1(
-              ctxt_pP,
-              SRB_FLAG_NO,
-              MBMS_FLAG_NO,
-              UNUSED_PARAM_MBMS_SESSION_ID,
-              UNUSED_PARAM_MBMS_SERVICE_ID,
-              &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.ul_UM_RLC,
-              &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.dl_UM_RLC,
-              drb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-              ,sourceL2Id,
-              destinationL2Id
-#endif
+          case LTE_RLC_Config_PR_um_Bi_Directional:
+            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM,sourceL2Id,destinationL2Id) != NULL) {
+              config_req_rlc_um_asn1(
+                ctxt_pP,
+                SRB_FLAG_NO,
+                MBMS_FLAG_NO,
+                UNUSED_PARAM_MBMS_SESSION_ID,
+                UNUSED_PARAM_MBMS_SERVICE_ID,
+                &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.ul_UM_RLC,
+                &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.dl_UM_RLC,
+                drb_id, lc_id,
+                sourceL2Id,
+                destinationL2Id
               );
-          }
+            }
 
-          break;
+            break;
 
-        case LTE_RLC_Config_PR_um_Uni_Directional_UL:
-          if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                              ,0,
-                               0
-#endif
-             ) != NULL) {
-            config_req_rlc_um_asn1(
-              ctxt_pP,
-              SRB_FLAG_NO,
-              MBMS_FLAG_NO,
-              UNUSED_PARAM_MBMS_SESSION_ID,
-              UNUSED_PARAM_MBMS_SERVICE_ID,
-              &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_UL.ul_UM_RLC,
-              NULL,
-              drb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0, 0
-#endif
-               );
-          }
+          case LTE_RLC_Config_PR_um_Uni_Directional_UL:
+            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM,0,0) != NULL) {
+              config_req_rlc_um_asn1(
+                ctxt_pP,
+                SRB_FLAG_NO,
+                MBMS_FLAG_NO,
+                UNUSED_PARAM_MBMS_SESSION_ID,
+                UNUSED_PARAM_MBMS_SERVICE_ID,
+                &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_UL.ul_UM_RLC,
+                NULL,
+                drb_id, lc_id,0, 0
+              );
+            }
 
-          break;
+            break;
 
-        case LTE_RLC_Config_PR_um_Uni_Directional_DL:
-          if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                              ,0,
-                               0
-#endif
-                               ) != NULL) {
-            config_req_rlc_um_asn1(
-              ctxt_pP,
-              SRB_FLAG_NO,
-              MBMS_FLAG_NO,
-              UNUSED_PARAM_MBMS_SESSION_ID,
-              UNUSED_PARAM_MBMS_SERVICE_ID,
-              NULL,
-              &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_DL.dl_UM_RLC,
-              drb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0, 0
-#endif
-               );
-          }
+          case LTE_RLC_Config_PR_um_Uni_Directional_DL:
+            if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM,0,0 ) != NULL) {
+              config_req_rlc_um_asn1(
+                ctxt_pP,
+                SRB_FLAG_NO,
+                MBMS_FLAG_NO,
+                UNUSED_PARAM_MBMS_SESSION_ID,
+                UNUSED_PARAM_MBMS_SERVICE_ID,
+                NULL,
+                &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_DL.dl_UM_RLC,
+                drb_id, lc_id,0, 0
+              );
+            }
 
-          break;
+            break;
 
-        default:
-          LOG_W(RLC, PROTOCOL_CTXT_FMT"[RB %ld] unknown drb_toaddmod_p->rlc_Config->present \n",
-                PROTOCOL_CTXT_ARGS(ctxt_pP),
-                drb_id);
+          default:
+            LOG_W(RLC, PROTOCOL_CTXT_FMT"[RB %ld] unknown drb_toaddmod_p->rlc_Config->present \n",
+                  PROTOCOL_CTXT_ARGS(ctxt_pP),
+                  drb_id);
         }
       }
     }
@@ -406,21 +332,21 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
     }
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   if (pmch_InfoList_r9_pP != NULL) {
     for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
       mbms_SessionInfoList_r9_p = &(pmch_InfoList_r9_pP->list.array[i]->mbms_SessionInfoList_r9);
 
       for (j=0; j<mbms_SessionInfoList_r9_p->list.count; j++) {
         MBMS_SessionInfo_p = mbms_SessionInfoList_r9_p->list.array[j];
+
         if (MBMS_SessionInfo_p->sessionId_r9)
           mbms_session_id  = MBMS_SessionInfo_p->sessionId_r9->buf[0];
         else
           mbms_session_id  = MBMS_SessionInfo_p->logicalChannelIdentity_r9;
+
         lc_id              = mbms_session_id;
         mbms_service_id    = MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2]; //serviceId is 3-octet string
-//        mbms_service_id    = j;
+        //        mbms_service_id    = j;
 
         // can set the mch_id = i
         if (ctxt_pP->enb_flag) {
@@ -428,7 +354,6 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
           rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lc_id].service_id                     = mbms_service_id;
           rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lc_id].session_id                     = mbms_session_id;
           rlc_mbms_enb_set_lcid_by_rb_id(ctxt_pP->module_id,rb_id,lc_id);
-
         } else {
           rb_id =  (mbms_service_id * LTE_maxSessionPerPMCH ) + mbms_session_id; // + (LTE_maxDRB + 3); // 15
           rlc_mbms_lcid2service_session_id_ue[ctxt_pP->module_id][lc_id].service_id                    = mbms_service_id;
@@ -437,8 +362,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
         }
 
         key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->module_id, ctxt_pP->enb_flag, mbms_service_id, mbms_session_id);
-
-        h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+        h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
         if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
           rlc_union_p = rrc_rlc_add_rlc   (
@@ -448,8 +372,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
                           rb_id,
                           lc_id,
                           RLC_MODE_UM, 0, 0);
+
           //AssertFatal(rlc_union_p != NULL, "ADD MBMS RLC UM FAILED");
-          if(rlc_union_p == NULL){
+          if(rlc_union_p == NULL) {
             LOG_E(RLC, "ADD MBMS RLC UM FAILED\n");
           }
         }
@@ -463,7 +388,6 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
              );
         dl_um_rlc.sn_FieldLength = LTE_SN_FieldLength_size5;
         dl_um_rlc.t_Reordering   = LTE_T_Reordering_ms0;
-
         config_req_rlc_um_asn1 (
           ctxt_pP,
           SRB_FLAG_NO,
@@ -472,17 +396,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
           mbms_service_id,
           NULL,
           &dl_um_rlc,
-          rb_id, lc_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-          ,0, 0
-#endif
-               );
+          rb_id, lc_id,0, 0
+        );
       }
     }
   }
 
-#endif
-
   LOG_D(RLC, PROTOCOL_CTXT_FMT" CONFIG REQ ASN1 END \n",
         PROTOCOL_CTXT_ARGS(ctxt_pP));
   return RLC_OP_STATUS_OK;
@@ -490,42 +409,40 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
 //-----------------------------------------------------------------------------
 void
 rb_free_rlc_union (
-  void *rlcu_pP)
-{
+  void *rlcu_pP) {
   //-----------------------------------------------------------------------------
-  rlc_union_t * rlcu_p;
+  rlc_union_t *rlcu_p;
 
   if (rlcu_pP) {
     rlcu_p = (rlc_union_t *)(rlcu_pP);
     LOG_D(RLC,"%s %p \n",__FUNCTION__,rlcu_pP);
 
     switch (rlcu_p->mode) {
-    case RLC_MODE_AM:
-      rlc_am_cleanup(&rlcu_p->rlc.am);
-      break;
-
-    case RLC_MODE_UM:
-      rlc_um_cleanup(&rlcu_p->rlc.um);
-      break;
-
-    case RLC_MODE_TM:
-      rlc_tm_cleanup(&rlcu_p->rlc.tm);
-      break;
-
-    default:
-      LOG_W(RLC,
-            "%s %p unknown RLC type\n",
-            __FUNCTION__,
-            rlcu_pP);
-      break;
+      case RLC_MODE_AM:
+        rlc_am_cleanup(&rlcu_p->rlc.am);
+        break;
+
+      case RLC_MODE_UM:
+        rlc_um_cleanup(&rlcu_p->rlc.um);
+        break;
+
+      case RLC_MODE_TM:
+        rlc_tm_cleanup(&rlcu_p->rlc.tm);
+        break;
+
+      default:
+        LOG_W(RLC,
+              "%s %p unknown RLC type\n",
+              __FUNCTION__,
+              rlcu_pP);
+        break;
     }
   }
 }
 
 //-----------------------------------------------------------------------------
 rlc_op_status_t rrc_rlc_remove_ue (
-  const protocol_ctxt_t* const ctxt_pP)
-{
+  const protocol_ctxt_t *const ctxt_pP) {
   //-----------------------------------------------------------------------------
   rb_id_t                rb_id;
 
@@ -548,11 +465,10 @@ rlc_op_status_t rrc_rlc_remove_ue (
 
 //-----------------------------------------------------------------------------
 rlc_op_status_t rrc_rlc_remove_rlc   (
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t  srb_flagP,
   const MBMS_flag_t MBMS_flagP,
-  const rb_id_t     rb_idP)
-{
+  const rb_id_t     rb_idP) {
   //-----------------------------------------------------------------------------
   logical_chan_id_t      lcid            = 0;
   hash_key_t             key             = HASHTABLE_NOT_A_KEY_VALUE;
@@ -560,15 +476,10 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
   hash_key_t             key_lcid        = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t         h_lcid_rc;
   rlc_union_t           *rlc_union_p = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   rlc_mbms_id_t         *mbms_id_p  = NULL;
-#endif
-
   /* for no gcc warnings */
   (void)lcid;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (MBMS_flagP == TRUE) {
     if (ctxt_pP->enb_flag) {
       lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
@@ -576,7 +487,6 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
       rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid].service_id = 0;
       rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid].session_id = 0;
       rlc_mbms_rbid2lcid_ue[ctxt_pP->module_id][rb_idP] = RLC_LC_UNALLOCATED;
-
     } else {
       lcid = rlc_mbms_ue_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
       mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ctxt_pP->module_id][lcid];
@@ -586,41 +496,42 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
     }
 
     key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
-  } else
-#endif
-  {
+  } else {
     key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
   }
 
-
   //AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
-	if(rb_idP >= NB_RB_MAX){
-		LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
-		return RLC_OP_STATUS_BAD_PARAMETER;
-	}
+  if(rb_idP >= NB_RB_MAX) {
+    LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
+    return RLC_OP_STATUS_BAD_PARAMETER;
+  }
 
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     // also remove the hash-key created by LC-id
     switch (rlc_union_p->mode) {
-    case RLC_MODE_AM:
-      lcid = rlc_union_p->rlc.am.channel_id;
-      break;
-    case RLC_MODE_UM:
-      lcid = rlc_union_p->rlc.um.channel_id;
-      break;
-    case RLC_MODE_TM:
-      lcid = rlc_union_p->rlc.tm.channel_id;
-      break;
-    default:
-      LOG_E(RLC, PROTOCOL_CTXT_FMT"[%s %u] RLC mode is unknown!\n",
-            PROTOCOL_CTXT_ARGS(ctxt_pP),
-            (srb_flagP) ? "SRB" : "DRB",
-            rb_idP);
+      case RLC_MODE_AM:
+        lcid = rlc_union_p->rlc.am.channel_id;
+        break;
+
+      case RLC_MODE_UM:
+        lcid = rlc_union_p->rlc.um.channel_id;
+        break;
+
+      case RLC_MODE_TM:
+        lcid = rlc_union_p->rlc.tm.channel_id;
+        break;
+
+      default:
+        LOG_E(RLC, PROTOCOL_CTXT_FMT"[%s %u] RLC mode is unknown!\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP),
+              (srb_flagP) ? "SRB" : "DRB",
+              rb_idP);
     }
+
     key_lcid = RLC_COLL_KEY_LCID_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, lcid, srb_flagP);
-    h_lcid_rc = hashtable_get(rlc_coll_p, key_lcid, (void**)&rlc_union_p);
+    h_lcid_rc = hashtable_get(rlc_coll_p, key_lcid, (void **)&rlc_union_p);
   } else {
     h_lcid_rc = HASH_TABLE_KEY_NOT_EXISTS;
   }
@@ -651,48 +562,39 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
   return RLC_OP_STATUS_OK;
 }
 //-----------------------------------------------------------------------------
-rlc_union_t* rrc_rlc_add_rlc   (
-  const protocol_ctxt_t* const ctxt_pP,
+rlc_union_t *rrc_rlc_add_rlc   (
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t        srb_flagP,
   const MBMS_flag_t       MBMS_flagP,
   const rb_id_t           rb_idP,
   const logical_chan_id_t chan_idP,
-  const rlc_mode_t        rlc_modeP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  ,const uint32_t sourceL2Id,
+  const rlc_mode_t        rlc_modeP,
+  const uint32_t sourceL2Id,
   const uint32_t  destinationL2Id
-#endif
-)
-{
-
+) {
   //-----------------------------------------------------------------------------
   hash_key_t             key         = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t         h_rc;
   hash_key_t             key_lcid    = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t         h_lcid_rc;
   rlc_union_t           *rlc_union_p = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   rlc_mbms_id_t         *mbms_id_p  = NULL;
   logical_chan_id_t      lcid            = 0;
-#endif
-
 
   if (MBMS_flagP == FALSE) {
     //AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
     //AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
-  	if(rb_idP >= NB_RB_MAX){
-  		LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
-  		return NULL;
-  	}
-  	if(chan_idP >= RLC_MAX_LC){
-  		LOG_E(RLC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
-  		return NULL;
-  	}
+    if(rb_idP >= NB_RB_MAX) {
+      LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
+      return NULL;
+    }
 
+    if(chan_idP >= RLC_MAX_LC) {
+      LOG_E(RLC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
+      return NULL;
+    }
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (MBMS_flagP == TRUE) {
     if (ctxt_pP->enb_flag) {
       lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
@@ -700,7 +602,6 @@ rlc_union_t* rrc_rlc_add_rlc   (
       //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid].service_id = 0;
       //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid].session_id = 0;
       //LG 2014-04-15rlc_mbms_rbid2lcid_eNB[ctxt_pP->module_id][rb_idP] = RLC_LC_UNALLOCATED;
-
     } else {
       lcid = rlc_mbms_ue_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
       mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ctxt_pP->module_id][lcid];
@@ -711,17 +612,16 @@ rlc_union_t* rrc_rlc_add_rlc   (
 
     key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
   }
-  if ((sourceL2Id > 0) && (destinationL2Id > 0) ){
-     key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
-     key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, sourceL2Id, destinationL2Id, srb_flagP);
-  } else
-#endif
-  {
+
+  if ((sourceL2Id > 0) && (destinationL2Id > 0) ) {
+    key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
+    key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, sourceL2Id, destinationL2Id, srb_flagP);
+  } else {
     key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
     key_lcid = RLC_COLL_KEY_LCID_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, srb_flagP);
   }
 
-  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
+  h_rc = hashtable_get(rlc_coll_p, key, (void **)&rlc_union_p);
 
   if (h_rc == HASH_TABLE_OK) {
     LOG_W(RLC, PROTOCOL_CTXT_FMT"[%s %u] rrc_rlc_add_rlc , already exist %s\n",
@@ -729,28 +629,26 @@ rlc_union_t* rrc_rlc_add_rlc   (
           (srb_flagP) ? "SRB" : "DRB",
           rb_idP,
           (srb_flagP) ? "SRB" : "DRB");
+
     //AssertFatal(rlc_union_p->mode == rlc_modeP, "Error rrc_rlc_add_rlc , already exist but RLC mode differ");
-  	if(rlc_union_p->mode != rlc_modeP){
-  		LOG_E(RLC, "Error rrc_rlc_add_rlc , already exist but RLC mode differ\n");
-  		return NULL;
-  	}
-  	return rlc_union_p;
+    if(rlc_union_p->mode != rlc_modeP) {
+      LOG_E(RLC, "Error rrc_rlc_add_rlc , already exist but RLC mode differ\n");
+      return NULL;
+    }
+
+    return rlc_union_p;
   } else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
     rlc_union_p = calloc(1, sizeof(rlc_union_t));
     h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
     h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
 
     if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
       if (MBMS_flagP == TRUE) {
         LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
               PROTOCOL_CTXT_ARGS(ctxt_pP),
               mbms_id_p->service_id,
               mbms_id_p->session_id);
-      } else
-#endif
-      {
+      } else {
         LOG_I(RLC, PROTOCOL_CTXT_FMT" [%s %u] rrc_rlc_add_rlc  %s\n",
               PROTOCOL_CTXT_ARGS(ctxt_pP),
               (srb_flagP) ? "SRB" : "DRB",
@@ -778,125 +676,110 @@ rlc_union_t* rrc_rlc_add_rlc   (
           rb_idP,
           (srb_flagP) ? "SRB" : "DRB");
   }
+
   return NULL;
 }
 //-----------------------------------------------------------------------------
 rlc_op_status_t rrc_rlc_config_req   (
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t      srb_flagP,
   const MBMS_flag_t     mbms_flagP,
   const config_action_t actionP,
   const rb_id_t         rb_idP,
-  const rlc_info_t      rlc_infoP)
-{
+  const rlc_info_t      rlc_infoP) {
   //-----------------------------------------------------------------------------
   //rlc_op_status_t status;
-
   LOG_D(RLC, PROTOCOL_CTXT_FMT" CONFIG_REQ for RAB %u\n",
         PROTOCOL_CTXT_ARGS(ctxt_pP),
         rb_idP);
 
   //AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
-	if(rb_idP >= NB_RB_MAX){
-		LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
-		return RLC_OP_STATUS_BAD_PARAMETER;
-	}
+  if(rb_idP >= NB_RB_MAX) {
+    LOG_E(RLC, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
+    return RLC_OP_STATUS_BAD_PARAMETER;
+  }
 
   switch (actionP) {
-
-  case CONFIG_ACTION_ADD:
-    if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,0,
-                        0
-#endif
-    ) != NULL) {
-      return RLC_OP_STATUS_INTERNAL_ERROR;
-    }
+    case CONFIG_ACTION_ADD:
+      if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode,0,  0 ) != NULL) {
+        return RLC_OP_STATUS_INTERNAL_ERROR;
+      }
 
     // no break, fall to next case
-  case CONFIG_ACTION_MODIFY:
-    switch (rlc_infoP.rlc_mode) {
-    case RLC_MODE_AM:
-      LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB AM\n",
-            PROTOCOL_CTXT_ARGS(ctxt_pP),
-            rb_idP);
+    case CONFIG_ACTION_MODIFY:
+      switch (rlc_infoP.rlc_mode) {
+        case RLC_MODE_AM:
+          LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB AM\n",
+                PROTOCOL_CTXT_ARGS(ctxt_pP),
+                rb_idP);
+          config_req_rlc_am(
+            ctxt_pP,
+            srb_flagP,
+            &rlc_infoP.rlc.rlc_am_info,
+            rb_idP, rb_idP);
+          break;
 
-      config_req_rlc_am(
-        ctxt_pP,
-        srb_flagP,
-        &rlc_infoP.rlc.rlc_am_info,
-        rb_idP, rb_idP);
-      break;
+        case RLC_MODE_UM:
+          LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB UM\n",
+                PROTOCOL_CTXT_ARGS(ctxt_pP),
+                rb_idP);
+          config_req_rlc_um(
+            ctxt_pP,
+            srb_flagP,
+            &rlc_infoP.rlc.rlc_um_info,
+            rb_idP, rb_idP);
+          break;
+
+        case RLC_MODE_TM:
+          LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB TM\n",
+                PROTOCOL_CTXT_ARGS(ctxt_pP),
+                rb_idP);
+          config_req_rlc_tm(
+            ctxt_pP,
+            srb_flagP,
+            &rlc_infoP.rlc.rlc_tm_info,
+            rb_idP, rb_idP);
+          break;
+
+        default:
+          return RLC_OP_STATUS_BAD_PARAMETER;
+      }
 
-    case RLC_MODE_UM:
-      LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB UM\n",
-            PROTOCOL_CTXT_ARGS(ctxt_pP),
-            rb_idP);
-      config_req_rlc_um(
-        ctxt_pP,
-        srb_flagP,
-        &rlc_infoP.rlc.rlc_um_info,
-        rb_idP, rb_idP);
       break;
 
-    case RLC_MODE_TM:
-      LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB %u] MODIFY RB TM\n",
-            PROTOCOL_CTXT_ARGS(ctxt_pP),
-            rb_idP);
-      config_req_rlc_tm(
-        ctxt_pP,
-        srb_flagP,
-        &rlc_infoP.rlc.rlc_tm_info,
-        rb_idP, rb_idP);
+    case CONFIG_ACTION_REMOVE:
+      return rrc_rlc_remove_rlc(ctxt_pP, srb_flagP, mbms_flagP, rb_idP);
       break;
 
     default:
       return RLC_OP_STATUS_BAD_PARAMETER;
-    }
-
-    break;
-
-  case CONFIG_ACTION_REMOVE:
-    return rrc_rlc_remove_rlc(ctxt_pP, srb_flagP, mbms_flagP, rb_idP);
-    break;
-
-  default:
-    return RLC_OP_STATUS_BAD_PARAMETER;
   }
 
   return RLC_OP_STATUS_OK;
 }
 //-----------------------------------------------------------------------------
 rlc_op_status_t rrc_rlc_data_req     (
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const MBMS_flag_t MBMS_flagP,
   const rb_id_t     rb_idP,
   const mui_t       muiP,
   const confirm_t   confirmP,
   const sdu_size_t  sdu_sizeP,
-  char* sduP)
-{
+  char *sduP) {
   //-----------------------------------------------------------------------------
-  mem_block_t*   sdu;
-
+  mem_block_t   *sdu;
   sdu = get_free_mem_block(sdu_sizeP, __func__);
 
   if (sdu != NULL) {
     memcpy (sdu->data, sduP, sdu_sizeP);
-    return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,NULL, NULL
-#endif
-                        );
+    return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu,NULL, NULL );
   } else {
     return RLC_OP_STATUS_INTERNAL_ERROR;
   }
 }
 
 //-----------------------------------------------------------------------------
-void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t rrc_data_confP)
-{
+void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t rrc_data_confP) {
   //-----------------------------------------------------------------------------
   rlc_rrc_data_ind  = rrc_data_indP;
   rlc_rrc_data_conf = rrc_data_confP;
diff --git a/openair2/NETWORK_DRIVER/MESH/local.h b/openair2/NETWORK_DRIVER/MESH/local.h
index e0ffeb583d8a945d93b13149784af20284b774b2..58ae78e7a5a3e47d22190cf969a43e6ed829940e 100644
--- a/openair2/NETWORK_DRIVER/MESH/local.h
+++ b/openair2/NETWORK_DRIVER/MESH/local.h
@@ -164,10 +164,8 @@ typedef struct pdcp_data_req_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_req_header_t;
 
 typedef struct pdcp_data_ind_header_s {
@@ -175,22 +173,19 @@ typedef struct pdcp_data_ind_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   dummy_traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_ind_header_t;
 
 extern struct net_device *nasdev[NB_INSTANCES_MAX];
-//extern int bytes_wrote;
-//extern int bytes_read;
+
 
 extern uint8_t NAS_NULL_IMEI[14];
 
 //global variables shared with RRC
 #ifndef PDCP_USE_NETLINK
-extern int pdcp_2_nas_irq;
+  extern int pdcp_2_nas_irq;
 #endif
-//extern uint8_t nas_IMEI[14];
+
 
 #endif
diff --git a/openair2/NETWORK_DRIVER/UE_IP/common.c b/openair2/NETWORK_DRIVER/UE_IP/common.c
index 1f0545270828579ca49903ea2aa9989d7898224e..0d66f423571afa85e2320461be4b96fb34d55cb6 100644
--- a/openair2/NETWORK_DRIVER/UE_IP/common.c
+++ b/openair2/NETWORK_DRIVER/UE_IP/common.c
@@ -31,7 +31,7 @@
 #include "local.h"
 #include "proto_extern.h"
 #ifndef OAI_NW_DRIVER_USE_NETLINK
-#include "rtai_fifos.h"
+  #include "rtai_fifos.h"
 #endif
 
 
@@ -41,20 +41,20 @@
 #include <net/udp.h>
 
 #define NIPADDR(addr) \
-        (uint8_t)(addr & 0x000000FF), \
-        (uint8_t)((addr & 0x0000FF00) >> 8), \
-        (uint8_t)((addr & 0x00FF0000) >> 16), \
-        (uint8_t)((addr & 0xFF000000) >> 24)
+  (uint8_t)(addr & 0x000000FF), \
+  (uint8_t)((addr & 0x0000FF00) >> 8), \
+  (uint8_t)((addr & 0x00FF0000) >> 16), \
+  (uint8_t)((addr & 0xFF000000) >> 24)
 
 #define NIP6ADDR(addr) \
-        ntohs((addr)->s6_addr16[0]), \
-        ntohs((addr)->s6_addr16[1]), \
-        ntohs((addr)->s6_addr16[2]), \
-        ntohs((addr)->s6_addr16[3]), \
-        ntohs((addr)->s6_addr16[4]), \
-        ntohs((addr)->s6_addr16[5]), \
-        ntohs((addr)->s6_addr16[6]), \
-        ntohs((addr)->s6_addr16[7])
+  ntohs((addr)->s6_addr16[0]), \
+  ntohs((addr)->s6_addr16[1]), \
+  ntohs((addr)->s6_addr16[2]), \
+  ntohs((addr)->s6_addr16[3]), \
+  ntohs((addr)->s6_addr16[4]), \
+  ntohs((addr)->s6_addr16[5]), \
+  ntohs((addr)->s6_addr16[6]), \
+  ntohs((addr)->s6_addr16[7])
 
 
 //#define OAI_DRV_DEBUG_SEND
@@ -65,9 +65,7 @@ ue_ip_common_class_wireless2ip(
   sdu_size_t data_lenP,
   void      *pdcp_sdu_pP,
   int        instP,
-  rb_id_t    rb_idP)
-{
-
+  rb_id_t    rb_idP) {
   //---------------------------------------------------------------------------
   struct sk_buff      *skb_p           = NULL;
   ipversion_t         *ipv_p           = NULL;
@@ -79,11 +77,9 @@ ue_ip_common_class_wireless2ip(
 #endif
   unsigned char        protocol;
   struct iphdr        *network_header_p  = NULL;
-
 #ifdef OAI_DRV_DEBUG_RECEIVE
   printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__, rb_idP,instP,data_lenP);
 #endif
-
   skb_p = dev_alloc_skb( data_lenP + 2 );
 
   if(!skb_p) {
@@ -94,17 +90,13 @@ ue_ip_common_class_wireless2ip(
 
   skb_reserve(skb_p,2);
   memcpy(skb_put(skb_p, data_lenP), pdcp_sdu_pP,data_lenP);
-
   skb_p->dev = ue_ip_dev[instP];
   hard_header_len = ue_ip_dev[instP]->hard_header_len;
-
   skb_set_mac_header(skb_p, 0);
   skb_set_network_header(skb_p, hard_header_len);
-skb_p->mark = rb_idP;
+  skb_p->mark = rb_idP;
   //printk("[NAC_COMMIN_RECEIVE]: Packet Type %d (%d,%d)",skb_p->pkt_type,PACKET_HOST,PACKET_BROADCAST);
   skb_p->pkt_type = PACKET_HOST;
-
-
 #ifdef OAI_DRV_DEBUG_RECEIVE
   printk("[UE_IP_DRV][%s] Receiving packet of size %d from PDCP \n",__FUNCTION__, skb_p->len);
 
@@ -118,97 +110,91 @@ skb_p->mark = rb_idP;
   printk("[UE_IP_DRV][%s] skb_p->data           @ %p\n",__FUNCTION__,  skb_p->data);
   printk("[UE_IP_DRV][%s] skb_p->mac_header     @ %p\n",__FUNCTION__,  skb_p->mac_header);
 #endif
-
-
-
   // LG TEST skb_p->ip_summed = CHECKSUM_NONE;
   skb_p->ip_summed = CHECKSUM_UNNECESSARY;
   ipv_p = (ipversion_t *)((void *)&(skb_p->data[hard_header_len]));
 
   switch (ipv_p->version) {
-
-  case 6:
+    case 6:
 #ifdef OAI_DRV_DEBUG_RECEIVE
-    printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
+      printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
 #endif
-    skb_set_network_header(skb_p, hard_header_len);
-    //skb_p->network_header_p = &skb_p->data[hard_header_len];
+      skb_set_network_header(skb_p, hard_header_len);
+
+      //skb_p->network_header_p = &skb_p->data[hard_header_len];
 
-    if (hard_header_len == 0) {
-      skb_p->protocol = htons(ETH_P_IPV6);
-    } else {
+      if (hard_header_len == 0) {
+        skb_p->protocol = htons(ETH_P_IPV6);
+      } else {
 #ifdef OAI_NW_DRIVER_TYPE_ETHERNET
-      skb_p->protocol = eth_type_trans(skb_p, ue_ip_dev[instP]);
+        skb_p->protocol = eth_type_trans(skb_p, ue_ip_dev[instP]);
 #else
 #endif
-    }
-
-    //printk("Writing packet with protocol %x\n",ntohs(skb_p->protocol));
-    break;
+      }
 
-  case 4:
+      //printk("Writing packet with protocol %x\n",ntohs(skb_p->protocol));
+      break;
 
+    case 4:
 #ifdef OAI_DRV_DEBUG_RECEIVE
-    //printk("NAS_TOOL_RECEIVE: receive IPv4 message\n");
-    addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->saddr;
+      //printk("NAS_TOOL_RECEIVE: receive IPv4 message\n");
+      addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->saddr;
 
-    if (addr_p) {
-      printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
-    }
+      if (addr_p) {
+        printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
+      }
 
-    addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->daddr;
+      addr_p = (unsigned char *)&((struct iphdr *)&skb_p->data[hard_header_len])->daddr;
 
-    if (addr_p) {
-      printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
-    }
+      if (addr_p) {
+        printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, addr_p[0],addr_p[1],addr_p[2],addr_p[3]);
+      }
 
-    printk("[UE_IP_DRV][%s] protocol  %d\n",__FUNCTION__, ((struct iphdr *)&skb_p->data[hard_header_len])->protocol);
+      printk("[UE_IP_DRV][%s] protocol  %d\n",__FUNCTION__, ((struct iphdr *)&skb_p->data[hard_header_len])->protocol);
 #endif
-
-    skb_set_network_header(skb_p, hard_header_len);
-    //network_header_p = (struct iphdr *)skb_network_header(skb_p);
-    network_header_p = (struct iphdr *)skb_network_header(skb_p);
-    protocol = network_header_p->protocol;
-
+      skb_set_network_header(skb_p, hard_header_len);
+      //network_header_p = (struct iphdr *)skb_network_header(skb_p);
+      network_header_p = (struct iphdr *)skb_network_header(skb_p);
+      protocol = network_header_p->protocol;
 #ifdef OAI_DRV_DEBUG_RECEIVE
 
-    switch (protocol) {
-    case IPPROTO_IP:
-      printk("[UE_IP_DRV][%s] Received Raw IPv4 packet\n",__FUNCTION__);
-      break;
+      switch (protocol) {
+        case IPPROTO_IP:
+          printk("[UE_IP_DRV][%s] Received Raw IPv4 packet\n",__FUNCTION__);
+          break;
 
-    case IPPROTO_IPV6:
-      printk("[UE_IP_DRV][%s] Received Raw IPv6 packet\n",__FUNCTION__);
-      break;
+        case IPPROTO_IPV6:
+          printk("[UE_IP_DRV][%s] Received Raw IPv6 packet\n",__FUNCTION__);
+          break;
 
-    case IPPROTO_ICMP:
-      printk("[UE_IP_DRV][%s] Received Raw ICMP packet\n",__FUNCTION__);
-      break;
+        case IPPROTO_ICMP:
+          printk("[UE_IP_DRV][%s] Received Raw ICMP packet\n",__FUNCTION__);
+          break;
 
-    case IPPROTO_TCP:
-      printk("[UE_IP_DRV][%s] Received TCP packet\n",__FUNCTION__);
-      break;
+        case IPPROTO_TCP:
+          printk("[UE_IP_DRV][%s] Received TCP packet\n",__FUNCTION__);
+          break;
 
-    case IPPROTO_UDP:
-      printk("[UE_IP_DRV][%s] Received UDP packet\n",__FUNCTION__);
-      break;
+        case IPPROTO_UDP:
+          printk("[UE_IP_DRV][%s] Received UDP packet\n",__FUNCTION__);
+          break;
 
-    default:
-      break;
-    }
+        default:
+          break;
+      }
 
 #endif
 
-    if (hard_header_len == 0) {
-      skb_p->protocol = htons(ETH_P_IP);
-    }
+      if (hard_header_len == 0) {
+        skb_p->protocol = htons(ETH_P_IP);
+      }
 
-    //printk("[UE_IP_DRV][COMMON] Writing packet with protocol %x\n",ntohs(skb_p->protocol));
-    break;
+      //printk("[UE_IP_DRV][COMMON] Writing packet with protocol %x\n",ntohs(skb_p->protocol));
+      break;
 
-  default:
-    printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
-    printk("[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)\n",__FUNCTION__,instP,ipv_p->version);
+    default:
+      printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
+      printk("[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)\n",__FUNCTION__,instP,ipv_p->version);
   }
 
   ++gpriv_p->stats.rx_packets;
@@ -230,8 +216,7 @@ skb_p->mark = rb_idP;
 
 //---------------------------------------------------------------------------
 // Delete the data
-void ue_ip_common_ip2wireless_drop(struct sk_buff *skb_pP,  int instP)
-{
+void ue_ip_common_ip2wireless_drop(struct sk_buff *skb_pP,  int instP) {
   //---------------------------------------------------------------------------
   ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
   ++priv_p->stats.tx_dropped;
@@ -243,18 +228,14 @@ void
 ue_ip_common_ip2wireless(
   struct sk_buff *skb_pP,
   int instP
-)
-{
+) {
   //---------------------------------------------------------------------------
   struct pdcp_data_req_header_s     pdcph;
   ue_ip_priv_t                     *priv_p=netdev_priv(ue_ip_dev[instP]);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   ipversion_t         *ipv_p             = NULL;
   unsigned int         hard_header_len   = 0;
   unsigned char       *src_addr          = 0;
   unsigned char       *dst_addr          = 0;
-#endif
-
 #ifdef LOOPBACK_TEST
   int i;
 #endif
@@ -274,7 +255,6 @@ ue_ip_common_ip2wireless(
     return;
   }
 
-
   pdcph.data_size  = skb_pP->len;
 
   if (skb_pP->mark) {
@@ -284,47 +264,51 @@ ue_ip_common_ip2wireless(
   }
 
   pdcph.inst       = instP;
-
   //pass source/destination IP addresses to PDCP header
   hard_header_len = ue_ip_dev[instP]->hard_header_len;
   ipv_p = (ipversion_t *)((void *)&(skb_pP->data[hard_header_len]));
 
   switch (ipv_p->version) {
-  case 6:
-    printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
-    //TODO
-    break;
-
-  case 4:
-     src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
-    if (src_addr) {
-      printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
-    }
-    dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
-    if (dst_addr) {
-      printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
-    }
-    // modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
+    case 6:
+      printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
+      //TODO
+      break;
+
+    case 4:
+      src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
+
+      if (src_addr) {
+        printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
+      }
+
+      dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
+
+      if (dst_addr) {
+        printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
+      }
+
+      // modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
 #ifdef UESIM_EXPANSION
-    if ((src_addr[3] - 2)> instP) {
+
+      if ((src_addr[3] - 2)> instP) {
         pdcph.inst = src_addr[3] - 2;
         printk("[UE_IP_DRV] change INST from %d to %d\n",instP, pdcph.inst);
         instP = src_addr[3] - 2;
         priv_p=netdev_priv(ue_ip_dev[instP]);
-    }
+      }
+
 #endif
-    // modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
-    //get Ipv4 address and pass to PCDP header
-    printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
-    printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
-    pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
-    pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
-    break;
-
-  default:
-     break;
-  }
+      // modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
+      //get Ipv4 address and pass to PCDP header
+      printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
+      printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
+      pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
+      pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
+      break;
 
+    default:
+      break;
+  }
 
   bytes_wrote = ue_ip_netlink_send((char *)&pdcph,UE_IP_PDCPH_SIZE);
 #ifdef OAI_DRV_DEBUG_SEND
@@ -334,14 +318,13 @@ ue_ip_common_ip2wireless(
 
   if (bytes_wrote != UE_IP_PDCPH_SIZE) {
     printk("[UE_IP_DRV][%s] problem while writing PDCP's header (bytes wrote = %d)\n",__FUNCTION__,bytes_wrote);
-    printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id , bytes_wrote, UE_IP_PDCPH_SIZE);
+    printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id, bytes_wrote, UE_IP_PDCPH_SIZE);
     priv_p->stats.tx_dropped ++;
     return;
   }
 
   bytes_wrote += ue_ip_netlink_send((char *)skb_pP->data,skb_pP->len);
 
-
   if (bytes_wrote != skb_pP->len+UE_IP_PDCPH_SIZE) {
     printk("[UE_IP_DRV][%s] Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d\n",
            __FUNCTION__,
@@ -350,7 +333,6 @@ ue_ip_common_ip2wireless(
            bytes_wrote,
            skb_pP->len,
            UE_IP_PDCPH_SIZE); // congestion
-
     priv_p->stats.tx_dropped ++;
     return;
   }
@@ -364,7 +346,6 @@ ue_ip_common_ip2wireless(
 
   printk("\n");
 #endif
-
   priv_p->stats.tx_bytes   += skb_pP->len;
   priv_p->stats.tx_packets ++;
 #ifdef OAI_DRV_DEBUG_SEND
@@ -373,25 +354,18 @@ ue_ip_common_ip2wireless(
 }
 
 //---------------------------------------------------------------------------
-void ue_ip_common_wireless2ip(struct nlmsghdr *nlh_pP)
-{
+void ue_ip_common_wireless2ip(struct nlmsghdr *nlh_pP) {
   //---------------------------------------------------------------------------
-
   struct pdcp_data_ind_header_s     *pdcph_p = (struct pdcp_data_ind_header_s *)NLMSG_DATA(nlh_pP);
   ue_ip_priv_t                      *priv_p;
-
   priv_p = netdev_priv(ue_ip_dev[pdcph_p->inst]);
-
-
 #ifdef OAI_DRV_DEBUG_RECEIVE
   printk("[UE_IP_DRV][%s] QOS receive from PDCP, size %d, rab %d, inst %d\n",__FUNCTION__,
          pdcph_p->data_size,pdcph_p->rb_id,pdcph_p->inst);
 #endif
-
   ue_ip_common_class_wireless2ip(pdcph_p->data_size,
                                  (unsigned char *)NLMSG_DATA(nlh_pP) + UE_IP_PDCPH_SIZE,
                                  pdcph_p->inst,
                                  pdcph_p->rb_id);
-
 }
 
diff --git a/openair2/NETWORK_DRIVER/UE_IP/local.h b/openair2/NETWORK_DRIVER/UE_IP/local.h
index b5c7580114648879abb6e9192261d9e952e73cec..5532de9573ba7758724af826e1ba9ca30e733cb4 100644
--- a/openair2/NETWORK_DRIVER/UE_IP/local.h
+++ b/openair2/NETWORK_DRIVER/UE_IP/local.h
@@ -90,10 +90,8 @@ typedef struct pdcp_data_req_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_req_header_t;
 
 typedef struct pdcp_data_ind_header_s {
@@ -101,10 +99,8 @@ typedef struct pdcp_data_ind_header_s {
   sdu_size_t          data_size;
   signed int          inst;
   ip_traffic_type_t   dummy_traffic_type;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint32_t sourceL2Id;
   uint32_t destinationL2Id;
-#endif
 } pdcp_data_ind_header_t;
 
 
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
index 7beb42b552724b5b2455ac9d9908999e1426d06a..4c9804bdc0df8d96ee89dacac0b9e3a1b920df5e 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
@@ -52,256 +52,216 @@ extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
 extern uint8_t nfapi_mode;
 extern uint16_t sf_ahead;
 
-void handle_nr_rach(NR_UL_IND_t *UL_info)
-{
+void handle_nr_rach(NR_UL_IND_t *UL_info) {
   if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
-
     AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
     UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
     LOG_D(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->slot, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
     initiate_ra_proc(UL_info->module_id,
-    		         UL_info->CC_id,
-					 NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
-					 NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
-					 UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
-					 UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
-					 UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
-#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) || (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                    ,0
-#endif
-                     );
+                     UL_info->CC_id,
+                     NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
+                     NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
+                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
+                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
+                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
+                    );
   }
 
-#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
-
     AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
-    for (int i=0;i<UL_info->rach_ind_br.rach_indication_body.number_of_preambles;i++) {
+
+    for (int i=0; i<UL_info->rach_ind_br.rach_indication_body.number_of_preambles; i++) {
       AssertFatal(UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type>0,
-      "Got regular PRACH preamble, not BL/CE\n");
+                  "Got regular PRACH preamble, not BL/CE\n");
       LOG_D(MAC,"Frame %d, Slot %d Calling initiate_ra_proc (CE_level %d)\n",UL_info->frame,UL_info->slot,
-      UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type-1);
+            UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type-1);
       initiate_ra_proc(UL_info->module_id,
-           UL_info->CC_id,
-           UL_info->frame,
-           UL_info->slot,
-           UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.preamble,
-           UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.timing_advance,
-           UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.rnti,
-           UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type);
+                       UL_info->CC_id,
+                       UL_info->frame,
+                       UL_info->slot,
+                       UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.preamble,
+                       UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.timing_advance,
+                       UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel8.rnti,
+                       UL_info->rach_ind_br.rach_indication_body.preamble_list[i].preamble_rel13.rach_resource_type);
     }
+
     UL_info->rach_ind_br.rach_indication_body.number_of_preambles=0;
   }
-#endif
 }
 
-void handle_nr_sr(NR_UL_IND_t *UL_info)
-{
-  if (nfapi_mode == 1)  // PNF
-  {
-    if (UL_info->sr_ind.sr_indication_body.number_of_srs>0)
-    {
+void handle_nr_sr(NR_UL_IND_t *UL_info) {
+  if (nfapi_mode == 1) { // PNF
+    if (UL_info->sr_ind.sr_indication_body.number_of_srs>0) {
       oai_nfapi_sr_indication(&UL_info->sr_ind);
     }
-  }
-  else
-  {
-    for (int i=0;i<UL_info->sr_ind.sr_indication_body.number_of_srs;i++)
+  } else {
+    for (int i=0; i<UL_info->sr_ind.sr_indication_body.number_of_srs; i++)
       SR_indication(UL_info->module_id,
-          UL_info->CC_id,
-          UL_info->frame,
-          UL_info->slot,
-          UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
-          UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
+                    UL_info->CC_id,
+                    UL_info->frame,
+                    UL_info->slot,
+                    UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
+                    UL_info->sr_ind.sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
   }
 
   UL_info->sr_ind.sr_indication_body.number_of_srs=0;
 }
 
 void handle_nr_cqi(NR_UL_IND_t *UL_info) {
-
-  if (nfapi_mode == 1)
-  {
-    if (UL_info->cqi_ind.number_of_cqis>0)
-    {
+  if (nfapi_mode == 1) {
+    if (UL_info->cqi_ind.number_of_cqis>0) {
       LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.number_of_cqis);
       nfapi_cqi_indication_t ind;
-
       ind.header.message_id = NFAPI_RX_CQI_INDICATION;
       ind.sfn_sf = UL_info->frame<<4 | UL_info->slot;
       ind.cqi_indication_body = UL_info->cqi_ind;
-
       oai_nfapi_cqi_indication(&ind);
-
       UL_info->cqi_ind.number_of_cqis=0;
     }
-  }
-  else
-  {
-    for (int i=0;i<UL_info->cqi_ind.number_of_cqis;i++)
+  } else {
+    for (int i=0; i<UL_info->cqi_ind.number_of_cqis; i++)
       cqi_indication(UL_info->module_id,
-          UL_info->CC_id,
-          UL_info->frame,
-          UL_info->slot,
-          UL_info->cqi_ind.cqi_pdu_list[i].rx_ue_information.rnti,
-          &UL_info->cqi_ind.cqi_pdu_list[i].cqi_indication_rel9,
-          UL_info->cqi_ind.cqi_raw_pdu_list[i].pdu,
-          &UL_info->cqi_ind.cqi_pdu_list[i].ul_cqi_information);
+                     UL_info->CC_id,
+                     UL_info->frame,
+                     UL_info->slot,
+                     UL_info->cqi_ind.cqi_pdu_list[i].rx_ue_information.rnti,
+                     &UL_info->cqi_ind.cqi_pdu_list[i].cqi_indication_rel9,
+                     UL_info->cqi_ind.cqi_raw_pdu_list[i].pdu,
+                     &UL_info->cqi_ind.cqi_pdu_list[i].ul_cqi_information);
 
     UL_info->cqi_ind.number_of_cqis=0;
   }
 }
 
 void handle_nr_harq(NR_UL_IND_t *UL_info) {
-
-  if (nfapi_mode == 1 && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) // PNF
-  {
+  if (nfapi_mode == 1 && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) { // PNF
     //LOG_D(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
-
     int retval = oai_nfapi_harq_indication(&UL_info->harq_ind);
 
-    if (retval!=0)
-    {
+    if (retval!=0) {
       LOG_E(PHY, "Failed to encode NFAPI HARQ_IND retval:%d\n", retval);
     }
 
     UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
-  }
-  else
-  {
-    for (int i=0;i<UL_info->harq_ind.harq_indication_body.number_of_harqs;i++)
+  } else {
+    for (int i=0; i<UL_info->harq_ind.harq_indication_body.number_of_harqs; i++)
       harq_indication(UL_info->module_id,
-          UL_info->CC_id,
-          NFAPI_SFNSF2SFN(UL_info->harq_ind.sfn_sf),
-          NFAPI_SFNSF2SF(UL_info->harq_ind.sfn_sf),
-          &UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
+                      UL_info->CC_id,
+                      NFAPI_SFNSF2SFN(UL_info->harq_ind.sfn_sf),
+                      NFAPI_SFNSF2SF(UL_info->harq_ind.sfn_sf),
+                      &UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
 
     UL_info->harq_ind.harq_indication_body.number_of_harqs=0;
   }
 }
 
 void handle_nr_ulsch(NR_UL_IND_t *UL_info) {
-
-  if(nfapi_mode == 1)
-  {
-    if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0)
-    {
+  if(nfapi_mode == 1) {
+    if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0) {
       //LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
-
       oai_nfapi_crc_indication(&UL_info->crc_ind);
-
       UL_info->crc_ind.crc_indication_body.number_of_crcs = 0;
     }
 
-    if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0)
-    {
+    if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0) {
       //LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
       oai_nfapi_rx_ind(&UL_info->rx_ind);
       UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
     }
-  }
-  else
-  {
+  } else {
     if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0 && UL_info->crc_ind.crc_indication_body.number_of_crcs>0) {
-      for (int i=0;i<UL_info->rx_ind.rx_indication_body.number_of_pdus;i++) {
-        for (int j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++) {
+      for (int i=0; i<UL_info->rx_ind.rx_indication_body.number_of_pdus; i++) {
+        for (int j=0; j<UL_info->crc_ind.crc_indication_body.number_of_crcs; j++) {
           // find crc_indication j corresponding rx_indication i
-          LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n", j, UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i, UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
+          LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n", j,
+                UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i, UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
+
           if (UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti ==
               UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti) {
             LOG_D(PHY, "UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d\n", j, UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
+
             if (UL_info->crc_ind.crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag == 1) { // CRC error indication
               LOG_D(MAC,"Frame %d, Slot %d Calling rx_sdu (CRC error) \n",UL_info->frame,UL_info->slot);
               rx_sdu(UL_info->module_id,
-                  UL_info->CC_id,
-                  NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
-                  NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
-                  (uint8_t *)NULL,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
-            }
-            else {
+                     UL_info->CC_id,
+                     NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
+                     NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
+                     (uint8_t *)NULL,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
+            } else {
               LOG_D(MAC,"Frame %d, Slot %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->slot);
               rx_sdu(UL_info->module_id,
-                  UL_info->CC_id,
-                  NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
-                  NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].data,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
-                  UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
+                     UL_info->CC_id,
+                     NFAPI_SFNSF2SFN(UL_info->rx_ind.sfn_sf), //UL_info->frame,
+                     NFAPI_SFNSF2SF(UL_info->rx_ind.sfn_sf), //UL_info->slot,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].data,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
+                     UL_info->rx_ind.rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
             }
+
             break;
           } //if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti ==
+
           //    UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
         } //    for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
       } //   for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
+
       UL_info->crc_ind.crc_indication_body.number_of_crcs=0;
       UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
     } // UL_info->rx_ind.rx_indication_body.number_of_pdus>0 && UL_info->slot && UL_info->crc_ind.crc_indication_body.number_of_crcs>0
     else if (UL_info->rx_ind.rx_indication_body.number_of_pdus!=0 || UL_info->crc_ind.crc_indication_body.number_of_crcs!=0) {
       LOG_E(PHY,"hoping not to have mis-match between CRC ind and RX ind - hopefully the missing message is coming shortly rx_ind:%d(SFN/SF:%05d) crc_ind:%d(SFN/SF:%05d) UL_info(SFN/SF):%04d%d\n",
-          UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf),
-          UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf),
-          UL_info->frame, UL_info->slot);
+            UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf),
+            UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf),
+            UL_info->frame, UL_info->slot);
     }
   }
 }
 
-void NR_UL_indication(NR_UL_IND_t *UL_info)
-{
+void NR_UL_indication(NR_UL_IND_t *UL_info) {
   AssertFatal(UL_info!=NULL,"UL_INFO is null\n");
-
 #ifdef DUMP_FAPI
   dump_ul(UL_info);
 #endif
-
   module_id_t      module_id   = UL_info->module_id;
   int              CC_id       = UL_info->CC_id;
   NR_Sched_Rsp_t   *sched_info = &Sched_INFO[module_id][CC_id];
   NR_IF_Module_t   *ifi        = if_inst[module_id];
   gNB_MAC_INST     *mac        = RC.nrmac[module_id];
-
   LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
         UL_info->frame,UL_info->slot,
         module_id,CC_id,
-        UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
+        UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis,
+        UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
 
-  if (nfapi_mode != 1)
-  {
+  if (nfapi_mode != 1) {
     if (ifi->CC_mask==0) {
       ifi->current_frame    = UL_info->frame;
       ifi->current_slot = UL_info->slot;
-    }
-    else {
+    } else {
       AssertFatal(UL_info->frame != ifi->current_frame,"CC_mask %x is not full and frame has changed\n",ifi->CC_mask);
       AssertFatal(UL_info->slot != ifi->current_slot,"CC_mask %x is not full and slot has changed\n",ifi->CC_mask);
     }
+
     ifi->CC_mask |= (1<<CC_id);
   }
 
   // clear DL/UL info for new scheduling round
   clear_nr_nfapi_information(mac,CC_id,UL_info->frame,UL_info->slot);
-
   handle_nr_rach(UL_info);
-
   handle_nr_sr(UL_info);
-
   handle_nr_cqi(UL_info);
-
   handle_nr_harq(UL_info);
-
   // clear HI prior to handling ULSCH
   mac->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_hi                     = 0;
-  
   handle_nr_ulsch(UL_info);
 
-  if (nfapi_mode != 1)
-  {
+  if (nfapi_mode != 1) {
     if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
       /*
       eNB_dlsch_ulsch_scheduler(module_id,
@@ -309,8 +269,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
           (UL_info->slot+sf_ahead)%10);
       */
       nfapi_nr_config_request_t *cfg = &mac->config[CC_id];
-      int spf = get_spf(cfg); 
-
+      int spf = get_spf(cfg);
       gNB_dlsch_ulsch_scheduler(module_id,
 				UL_info->frame,
 				UL_info->slot,
@@ -318,13 +277,13 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
 				(UL_info->slot+sf_ahead)%spf);
       
       ifi->CC_mask            = 0;
-
       sched_info->module_id   = module_id;
       sched_info->CC_id       = CC_id;
       sched_info->frame       = (UL_info->frame + ((UL_info->slot>(spf-1-sf_ahead)) ? 1 : 0)) % 1024;
       sched_info->slot        = (UL_info->slot+sf_ahead)%spf;
       sched_info->DL_req      = &mac->DL_req[CC_id];
       sched_info->HI_DCI0_req = &mac->HI_DCI0_req[CC_id];
+
       if ((mac->common_channels[CC_id].tdd_Config==NULL) ||
           (is_nr_UL_slot(&mac->common_channels[CC_id],(sched_info->slot+sf_ahead)%spf)>0))
         sched_info->UL_tti_req      = &mac->UL_tti_req[CC_id];
@@ -332,13 +291,11 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
         sched_info->UL_tti_req      = NULL;
 
       sched_info->TX_req      = &mac->TX_req[CC_id];
-
 #ifdef DUMP_FAPI
       dump_dl(sched_info);
 #endif
 
-      if (ifi->NR_Schedule_response)
-      {
+      if (ifi->NR_Schedule_response) {
         AssertFatal(ifi->NR_Schedule_response!=NULL,
                     "nr_schedule_response is null (mod %d, cc %d)\n",
                     module_id,
@@ -351,21 +308,18 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
   }
 }
 
-NR_IF_Module_t *NR_IF_Module_init(int Mod_id)
-{
+NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {
   AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
-
   LOG_D(PHY,"Installing callbacks for IF_Module - UL_indication\n");
 
   if (if_inst[Mod_id]==NULL) {
-    if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t));
-    memset((void*)if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
-
+    if_inst[Mod_id] = (NR_IF_Module_t *)malloc(sizeof(NR_IF_Module_t));
+    memset((void *)if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
     if_inst[Mod_id]->CC_mask=0;
     if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
-
     AssertFatal(pthread_mutex_init(&if_inst[Mod_id]->if_mutex,NULL)==0,
-        "allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
+                "allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
   }
+
   return if_inst[Mod_id];
 }
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
index 08f69bf249832c0c3a90a55e226a5bf05d9cd6da..898197cc30a09eb638a00091fb536c2319f16298 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h
@@ -51,12 +51,12 @@
 #define MAX_NUM_RACH_IND 100
 #define MAX_NUM_SRS_IND 100
 
-typedef struct{
+typedef struct {
   /// Module ID
   module_id_t module_id;
   /// CC ID
   int CC_id;
-  /// frame 
+  /// frame
   frame_t frame;
   /// slot
   slot_t slot;
@@ -76,10 +76,8 @@ typedef struct{
   /// RACH indication list
   nfapi_rach_indication_t rach_ind;
 
-#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// RACH indication list for BR UEs
   nfapi_rach_indication_t rach_ind_br;
-#endif
 
   /// SRS indication list
   nfapi_srs_indication_body_t srs_ind;
@@ -92,9 +90,9 @@ typedef struct{
 // Downlink slot P7
 
 
-typedef struct{
+typedef struct {
   /// Module ID
-  module_id_t module_id; 
+  module_id_t module_id;
   /// CC ID
   uint8_t CC_id;
   /// frame
@@ -112,16 +110,16 @@ typedef struct{
 } NR_Sched_Rsp_t;
 
 typedef struct {
-    uint8_t Mod_id;
-    int CC_id;
-    nfapi_nr_config_request_t *cfg;
+  uint8_t Mod_id;
+  int CC_id;
+  nfapi_nr_config_request_t *cfg;
 } NR_PHY_Config_t;
 
-typedef struct NR_IF_Module_s{
-//define the function pointer
+typedef struct NR_IF_Module_s {
+  //define the function pointer
   void (*NR_UL_indication)(NR_UL_IND_t *UL_INFO);
   void (*NR_Schedule_response)(NR_Sched_Rsp_t *Sched_INFO);
-  void (*NR_PHY_config_req)(NR_PHY_Config_t* config_INFO);
+  void (*NR_PHY_config_req)(NR_PHY_Config_t *config_INFO);
   uint32_t CC_mask;
   uint16_t current_frame;
   uint8_t current_slot;
diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c
index 2cc43189c696134b92bf82d14c53411516c35f13..3626a09721a332c3bbc5c9e85e2b23bafd1db54f 100644
--- a/openair2/PHY_INTERFACE/IF_Module.c
+++ b/openair2/PHY_INTERFACE/IF_Module.c
@@ -22,49 +22,41 @@ extern UL_RCC_IND_t  UL_RCC_INFO;
 uint16_t frame_cnt=0;
 void handle_rach(UL_IND_t *UL_info) {
   int i;
-  if(NFAPI_MODE == NFAPI_MODE_VNF){
-    for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
-     if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles>0) {
 
-       AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
-       LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_RCC_INFO.rach_ind[j].sfn_sf));
-       initiate_ra_proc(UL_info->module_id,
-                        UL_info->CC_id,
-                        NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf),
-                        NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
-                        UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
-                        UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
-                        UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,0
-#endif
-       );
-       free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
-       UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
-       UL_RCC_INFO.rach_ind[j].header.message_id = 0;
-     }
-   }
-  }else{
-  if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
-    AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
-    UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
-    LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
-    initiate_ra_proc(UL_info->module_id,
-                     UL_info->CC_id,
-                     NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
-                     NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
-                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
-                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
-                     UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                     ,0
-#endif
-                    );
-  }
+  if(NFAPI_MODE == NFAPI_MODE_VNF) {
+    for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
+      if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles>0) {
+        AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
+        LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_RCC_INFO.rach_ind[j].sfn_sf));
+        initiate_ra_proc(UL_info->module_id,
+                         UL_info->CC_id,
+                         NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf),
+                         NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
+                         UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
+                         UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
+                         UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
+                        );
+        free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
+        UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
+        UL_RCC_INFO.rach_ind[j].header.message_id = 0;
+      }
+    }
+  } else {
+    if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
+      AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
+      UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
+      LOG_D(MAC,"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
+      initiate_ra_proc(UL_info->module_id,
+                       UL_info->CC_id,
+                       NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
+                       NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
+                       UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
+                       UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
+                       UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
+                      );
+    }
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
     AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
 
@@ -86,8 +78,6 @@ void handle_rach(UL_IND_t *UL_info) {
 
     UL_info->rach_ind_br.rach_indication_body.number_of_preambles=0;
   }
-
-#endif
 }
 
 void handle_sr(UL_IND_t *UL_info) {
@@ -97,17 +87,18 @@ void handle_sr(UL_IND_t *UL_info) {
     if (UL_info->sr_ind.sr_indication_body.number_of_srs>0) {
       oai_nfapi_sr_indication(&UL_info->sr_ind);
     }
-  } else if(NFAPI_MODE == NFAPI_MODE_VNF){
-    for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
-      if(UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs > 0){
-        for (i=0;i<UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs;i++){
+  } else if(NFAPI_MODE == NFAPI_MODE_VNF) {
+    for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
+      if(UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs > 0) {
+        for (i=0; i<UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs; i++) {
           SR_indication(UL_info->module_id,
-              UL_info->CC_id,
-              NFAPI_SFNSF2SFN(UL_RCC_INFO.sr_ind[j].sfn_sf),
-              NFAPI_SFNSF2SF(UL_RCC_INFO.sr_ind[j].sfn_sf),
-              UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
-              UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
+                        UL_info->CC_id,
+                        NFAPI_SFNSF2SFN(UL_RCC_INFO.sr_ind[j].sfn_sf),
+                        NFAPI_SFNSF2SF(UL_RCC_INFO.sr_ind[j].sfn_sf),
+                        UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].rx_ue_information.rnti,
+                        UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list[i].ul_cqi_information.ul_cqi);
         }
+
         free(UL_RCC_INFO.sr_ind[j].sr_indication_body.sr_pdu_list);
         UL_RCC_INFO.sr_ind[j].sr_indication_body.number_of_srs=0;
         UL_RCC_INFO.sr_ind[j].header.message_id = 0;
@@ -134,14 +125,13 @@ void handle_cqi(UL_IND_t *UL_info) {
       LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.cqi_indication_body.number_of_cqis);
       UL_info->cqi_ind.header.message_id = NFAPI_RX_CQI_INDICATION;
       UL_info->cqi_ind.sfn_sf = UL_info->frame<<4 | UL_info->subframe;
-
       oai_nfapi_cqi_indication(&UL_info->cqi_ind);
       UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
     }
   } else if (NFAPI_MODE == NFAPI_MODE_VNF) {
-    for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
-      if(UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis > 0){
-        for (i=0;i<UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis;i++){
+    for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
+      if(UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis > 0) {
+        for (i=0; i<UL_RCC_INFO.cqi_ind[j].cqi_indication_body.number_of_cqis; i++) {
           cqi_indication(UL_info->module_id,
                          UL_info->CC_id,
                          NFAPI_SFNSF2SFN(UL_RCC_INFO.cqi_ind[j].sfn_sf),
@@ -159,15 +149,15 @@ void handle_cqi(UL_IND_t *UL_info) {
       }
     }
   } else {
-    for (i=0;i<UL_info->cqi_ind.cqi_indication_body.number_of_cqis;i++)
+    for (i=0; i<UL_info->cqi_ind.cqi_indication_body.number_of_cqis; i++)
       cqi_indication(UL_info->module_id,
                      UL_info->CC_id,
-          NFAPI_SFNSF2SFN(UL_info->cqi_ind.sfn_sf),
-          NFAPI_SFNSF2SF(UL_info->cqi_ind.sfn_sf),
-          UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti,
-          &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].cqi_indication_rel9,
-          UL_info->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[i].pdu,
-          &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].ul_cqi_information);
+                     NFAPI_SFNSF2SFN(UL_info->cqi_ind.sfn_sf),
+                     NFAPI_SFNSF2SF(UL_info->cqi_ind.sfn_sf),
+                     UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti,
+                     &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].cqi_indication_rel9,
+                     UL_info->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[i].pdu,
+                     &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].ul_cqi_information);
 
     UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
   }
@@ -183,15 +173,15 @@ void handle_harq(UL_IND_t *UL_info) {
     }
 
     UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
-  }else if(NFAPI_MODE == NFAPI_MODE_VNF){
-    for(uint8_t j = 0;j < NUM_NFPAI_SUBFRAME;j++){
-      if(UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs > 0){
-        for (int i=0;i<UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs;i++){
+  } else if(NFAPI_MODE == NFAPI_MODE_VNF) {
+    for(uint8_t j = 0; j < NUM_NFPAI_SUBFRAME; j++) {
+      if(UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs > 0) {
+        for (int i=0; i<UL_RCC_INFO.harq_ind[j].harq_indication_body.number_of_harqs; i++) {
           harq_indication(UL_info->module_id,
-                         UL_info->CC_id,
-                         NFAPI_SFNSF2SFN(UL_RCC_INFO.harq_ind[j].sfn_sf),
-                         NFAPI_SFNSF2SF(UL_RCC_INFO.harq_ind[j].sfn_sf),
-                         &UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list[i]);
+                          UL_info->CC_id,
+                          NFAPI_SFNSF2SFN(UL_RCC_INFO.harq_ind[j].sfn_sf),
+                          NFAPI_SFNSF2SF(UL_RCC_INFO.harq_ind[j].sfn_sf),
+                          &UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list[i]);
         }
 
         free(UL_RCC_INFO.harq_ind[j].harq_indication_body.harq_pdu_list);
@@ -226,48 +216,52 @@ void handle_ulsch(UL_IND_t *UL_info) {
       oai_nfapi_rx_ind(&UL_info->rx_ind);
       UL_info->rx_ind.rx_indication_body.number_of_pdus = 0;
     }
-  } else if(NFAPI_MODE == NFAPI_MODE_VNF){
-    for(uint8_t k = 0;k < NUM_NFPAI_SUBFRAME;k++){
-      if((UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus>0) && (UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs>0)){
-        for (i=0;i<UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus;i++) {
-          for (j=0;j<UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs;j++) {
+  } else if(NFAPI_MODE == NFAPI_MODE_VNF) {
+    for(uint8_t k = 0; k < NUM_NFPAI_SUBFRAME; k++) {
+      if((UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus>0) && (UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs>0)) {
+        for (i=0; i<UL_RCC_INFO.rx_ind[k].rx_indication_body.number_of_pdus; i++) {
+          for (j=0; j<UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs; j++) {
             // find crc_indication j corresponding rx_indication i
             LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x\n",
-                       j,UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i,UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
+                  j,UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti, i,UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti);
+
             if (UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].rx_ue_information.rnti == UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti) {
               LOG_D(PHY, "UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d\n",
-                          j, UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
+                    j, UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag);
+
               if (UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list[j].crc_indication_rel8.crc_flag == 1) { // CRC error indication
                 LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC error) \n",UL_info->frame,UL_info->subframe);
-                  rx_sdu(UL_info->module_id,
-                      UL_info->CC_id,
-                      NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
-                      NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
-                      (uint8_t *)NULL,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
-              }
-              else {
-                  LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->subframe);
-                  rx_sdu(UL_info->module_id,
-                      UL_info->CC_id,
-                      NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
-                      NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
-                      UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
+                rx_sdu(UL_info->module_id,
+                       UL_info->CC_id,
+                       NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
+                       NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
+                       (uint8_t *)NULL,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
+              } else {
+                LOG_D(MAC,"Frame %d, Subframe %d Calling rx_sdu (CRC ok) \n",UL_info->frame,UL_info->subframe);
+                rx_sdu(UL_info->module_id,
+                       UL_info->CC_id,
+                       NFAPI_SFNSF2SFN(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->frame,
+                       NFAPI_SFNSF2SF(UL_RCC_INFO.rx_ind[k].sfn_sf), //UL_info->subframe,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_ue_information.rnti,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.length,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.timing_advance,
+                       UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
               }
-              if(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data != NULL){
+
+              if(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data != NULL) {
                 free(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list[i].data);
               }
+
               break;
             } //if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti == UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
           } //    for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
         } //   for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
+
         free(UL_RCC_INFO.crc_ind[k].crc_indication_body.crc_pdu_list);
         free(UL_RCC_INFO.rx_ind[k].rx_indication_body.rx_pdu_list);
         UL_RCC_INFO.crc_ind[k].crc_indication_body.number_of_crcs = 0;
@@ -699,11 +693,11 @@ void UL_indication(UL_IND_t *UL_info) {
   Sched_Rsp_t  *sched_info = &Sched_INFO[module_id][CC_id];
   IF_Module_t  *ifi        = if_inst[module_id];
   eNB_MAC_INST *mac        = RC.mac[module_id];
-
   LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
         UL_info->frame,UL_info->subframe,
         module_id,CC_id,
-        UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
+        UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs,
+        UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
 
   if(UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0)
     frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big
@@ -729,7 +723,6 @@ void UL_indication(UL_IND_t *UL_info) {
   handle_sr(UL_info);
   handle_cqi(UL_info);
   handle_harq(UL_info);
-
   // clear HI prior to handling ULSCH
   uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_id], UL_info->subframe);
 
diff --git a/openair2/PHY_INTERFACE/IF_Module.h b/openair2/PHY_INTERFACE/IF_Module.h
index c42ba992c912c9e1c008b9e4dad89e08ff5c6ffa..ff264f921e7ac5370f5796e8bd807a662e7cea5c 100644
--- a/openair2/PHY_INTERFACE/IF_Module.h
+++ b/openair2/PHY_INTERFACE/IF_Module.h
@@ -51,12 +51,12 @@
 #define MAX_NUM_RACH_IND 100
 #define MAX_NUM_SRS_IND 100
 
-typedef struct{
+typedef struct {
   /// Module ID
   module_id_t module_id;
   /// CC ID
   int CC_id;
-  /// frame 
+  /// frame
   frame_t frame;
   /// subframe
   sub_frame_t subframe;
@@ -75,12 +75,8 @@ typedef struct{
 
   /// RACH indication list
   nfapi_rach_indication_t rach_ind;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// RACH indication list for BR UEs
   nfapi_rach_indication_t rach_ind_br;
-#endif
-
   /// SRS indication list
   nfapi_srs_indication_body_t srs_ind;
 
@@ -91,7 +87,7 @@ typedef struct{
 
 // Downlink subframe P7
 #define NUM_NFPAI_SUBFRAME 5
-typedef struct{
+typedef struct {
   /// harq indication list
   nfapi_harq_indication_t harq_ind[NUM_NFPAI_SUBFRAME];
 
@@ -112,9 +108,9 @@ typedef struct{
 
 } UL_RCC_IND_t;
 
-typedef struct{
+typedef struct {
   /// Module ID
-  module_id_t module_id; 
+  module_id_t module_id;
   /// CC ID
   uint8_t CC_id;
   /// frame
@@ -131,24 +127,24 @@ typedef struct{
   nfapi_tx_request_t *TX_req;
   /// Pointers to ue_release
   nfapi_ue_release_request_t *UE_release_req;
-}Sched_Rsp_t;
+} Sched_Rsp_t;
 
 typedef struct {
-    uint8_t Mod_id;
-    int CC_id;
-    nfapi_config_request_t *cfg;
-}PHY_Config_t;
+  uint8_t Mod_id;
+  int CC_id;
+  nfapi_config_request_t *cfg;
+} PHY_Config_t;
 
-typedef struct IF_Module_s{
-//define the function pointer
+typedef struct IF_Module_s {
+  //define the function pointer
   void (*UL_indication)(UL_IND_t *UL_INFO);
   void (*schedule_response)(Sched_Rsp_t *Sched_INFO);
-  void (*PHY_config_req)(PHY_Config_t* config_INFO);
+  void (*PHY_config_req)(PHY_Config_t *config_INFO);
   uint32_t CC_mask;
   uint16_t current_frame;
   uint8_t current_subframe;
   pthread_mutex_t if_mutex;
-}IF_Module_t;
+} IF_Module_t;
 
 // These mutex is used for multiple UEs L2 FAPI simulator.
 // Each UEs set these value in UL and UL_INFO is shared in all UE's thread.
@@ -159,7 +155,7 @@ typedef struct {
   pthread_mutex_t harq_mutex;
   pthread_mutex_t cqi_mutex;
   pthread_mutex_t rach_mutex;
-}FILL_UL_INFO_MUTEX_t;
+} FILL_UL_INFO_MUTEX_t;
 
 /*Initial */
 IF_Module_t *IF_Module_init(int Mod_id);
diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c
index b4281637a1b6ca9b2969fe07a1fd851f1b518e5c..ac855a46e643ae49df4ed9842eb698882f0f5f9e 100644
--- a/openair2/RRC/LTE/L2_interface.c
+++ b/openair2/RRC/LTE/L2_interface.c
@@ -78,8 +78,8 @@ mac_rrc_data_req(
   carrier = &rrc->carrier[0];
   mib     = &carrier->mib;
 
-  if(Srb_id == BCCH_SI_MBMS){
-    if (frameP%4 == 0){
+  if(Srb_id == BCCH_SI_MBMS) {
+    if (frameP%4 == 0) {
       memcpy(&buffer_pP[0],
              RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
              RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
@@ -162,13 +162,12 @@ mac_rrc_data_req(
   }
 
   if( (Srb_id & RAB_OFFSET ) == CCCH) {
-
     struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
 
     if (ue_context_p == NULL) return(0);
+
     eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
     LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
-
     Srb_info=&ue_p->Srb0;
 
     // check if data is there for MAC
@@ -197,8 +196,6 @@ mac_rrc_data_req(
     return (Sdu_size);
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if((Srb_id & RAB_OFFSET) == MCCH) {
     if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
       return 0;  // this parameter is set in function init_mcch in rrc_eNB.c
@@ -221,9 +218,6 @@ mac_rrc_data_req(
     return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
   }
 
-#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR) {
     memcpy(&buffer_pP[0],
            RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
@@ -238,7 +232,6 @@ mac_rrc_data_req(
     return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23_BR);
   }
 
-#endif
   return(0);
 }
 
@@ -255,31 +248,25 @@ mac_rrc_data_ind(
   const rb_id_t         srb_idP,
   const uint8_t        *sduP,
   const sdu_size_t      sdu_lenP,
-  const uint8_t         mbsfn_sync_areaP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  , const boolean_t		brOption
-#endif
-
+  const uint8_t         mbsfn_sync_areaP,
+  const boolean_t   brOption
 )
 //--------------------------------------------------------------------------
 {
-
-
   if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) {
     LOG_W(RRC,"[DU %d][RAPROC] Received SDU for CCCH on SRB %d length %d for UE id %d RNTI %x \n",
-            module_idP, srb_idP, sdu_lenP, UE_id, rntiP);
-  
+          module_idP, srb_idP, sdu_lenP, UE_id, rntiP);
     /* do ITTI message */
     DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
       module_idP,
       CC_id,
       UE_id,
-      rntiP,  
+      rntiP,
       sduP,
       sdu_lenP
     );
     return(0);
-  } 
+  }
 
   //SRB_INFO *Srb_info;
   protocol_ctxt_t ctxt;
@@ -293,9 +280,8 @@ mac_rrc_data_ind(
 
   if((srb_idP & RAB_OFFSET) == CCCH) {
     LOG_D(RRC, "[eNB %d] Received SDU for CCCH on SRB %d\n", module_idP, srb_idP);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     ctxt.brOption = brOption;
-#endif
+
     /*Srb_info = &RC.rrc[module_idP]->carrier[CC_id].Srb0;
     if (sdu_lenP > 0) {
       memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
@@ -362,10 +348,12 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
   } else {
     LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
   }
+
   if (flexran_agent_get_rrc_xface(Mod_instP)) {
     flexran_agent_get_rrc_xface(Mod_instP)->flexran_agent_notify_ue_state_change(Mod_instP,
-								     rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
+        rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
   }
+
   //rrc_mac_remove_ue(Mod_instP,rntiP);
 }
 
diff --git a/openair2/RRC/LTE/L2_interface_ue.c b/openair2/RRC/LTE/L2_interface_ue.c
index d8b6974501622383f7eb77985dcf699428780f31..a8a0086a4d832b795f9a5e3c2ddf9f19ea9d28d3 100644
--- a/openair2/RRC/LTE/L2_interface_ue.c
+++ b/openair2/RRC/LTE/L2_interface_ue.c
@@ -60,7 +60,6 @@ mac_rrc_data_req_ue(
 //--------------------------------------------------------------------------
 {
   LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LOG_D(RRC,"[UE %d] Frame %d Filling SL DISCOVERY SRB_ID %d\n",Mod_idP,frameP,Srb_id);
   LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
 
@@ -73,7 +72,6 @@ mac_rrc_data_req_ue(
     return(Ret_size);
   }
 
-#endif
   LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
   LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
 
@@ -138,39 +136,35 @@ mac_rrc_data_ind_ue(
    */
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, 0, rntiP, frameP, sub_frameP,eNB_indexP);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-   if(srb_idP == BCCH_SI_MBMS) {
-      LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
-
+  if(srb_idP == BCCH_SI_MBMS) {
+    LOG_D(RRC,"[UE %d] Received SDU for BCCH on MBMS SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
 #if defined(ENABLE_ITTI)
-      {
-        MessageDef *message_p;
-        int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
-
-        if (sdu_lenP > msg_sdu_size) {
-          LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
-          sdu_size = msg_sdu_size;
-        } else {
-          sdu_size = sdu_lenP;
-        }
-
-        message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
-        memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame     = frameP;
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size  = sdu_size;
-        memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq      = 30 /* TODO change phy to report rspq */;
-        RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp      = 45 /* TODO change phy to report rspp */;
+    {
+      MessageDef *message_p;
+      int msg_sdu_size = sizeof(RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu);
 
-        itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
+      if (sdu_lenP > msg_sdu_size) {
+        LOG_E(RRC, "SDU larger than BCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
+        sdu_size = msg_sdu_size;
+      } else {
+        sdu_size = sdu_lenP;
       }
-#else
-      decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
-#endif
+
+      message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_BCCH_MBMS_DATA_IND);
+      memset (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, 0, BCCH_SDU_MBMS_SIZE);
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).frame     = frameP;
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sub_frame = sub_frameP;
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu_size  = sdu_size;
+      memcpy (RRC_MAC_BCCH_MBMS_DATA_IND (message_p).sdu, sduP, sdu_size);
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).enb_index = eNB_indexP;
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrq      = 30 /* TODO change phy to report rspq */;
+      RRC_MAC_BCCH_MBMS_DATA_IND (message_p).rsrp      = 45 /* TODO change phy to report rspp */;
+      itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
     }
+#else
+    decode_BCCH_MBMS_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t *)sduP,sdu_lenP, 0, 0);
 #endif
+  }
 
   if(srb_idP == BCCH) {
     LOG_D(RRC,"[UE %d] Received SDU for BCCH on SRB %d from eNB %d\n",module_idP,srb_idP,eNB_indexP);
@@ -242,8 +236,6 @@ mac_rrc_data_ind_ue(
     }
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if ((srb_idP & RAB_OFFSET) == MCCH) {
     LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n",
           module_idP,frameP, mbsfn_sync_areaP, srb_idP & RAB_OFFSET,eNB_indexP);
@@ -278,7 +270,6 @@ mac_rrc_data_ind_ue(
     decode_SL_Discovery_Message(&ctxt, eNB_indexP, sduP, sdu_lenP);
   }
 
-#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   return(0);
 }
 
@@ -343,10 +334,7 @@ rrc_data_req_ue(
            confirmP,
            sdu_sizeP,
            buffer_pP,
-           modeP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-           ,NULL, NULL
-#endif
+           modeP,NULL, NULL
          );
 #endif
 }
diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
index 2f09aafe8d25a9e4f05c14889af0db9510a3840d..b15299418e59372aa622558027d54e54429be4af 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
@@ -54,10 +54,8 @@
 #include "LTE_DRB-ToAddModList.h"
 #include "LTE_HandoverPreparationInformation.h"
 #include "LTE_HandoverCommand.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  #include "LTE_MCCH-Message.h"
-  //#define MRB1 1
-#endif
+#include "LTE_MCCH-Message.h"
+
 
 #include "RRC/LTE/rrc_defs.h"
 #include "RRC/LTE/rrc_extern.h"
@@ -78,12 +76,11 @@
 #include "LTE_SBCCH-SL-BCH-MessageType.h"
 #include "LTE_SBCCH-SL-BCH-Message.h"
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-   #include "LTE_BCCH-BCH-Message-MBMS.h"
-   #include "LTE_BCCH-DL-SCH-Message-MBMS.h"
-   #include "LTE_SystemInformationBlockType1-MBMS-r14.h"
-   #include "LTE_NonMBSFN-SubframeConfig-r14.h"
-#endif
+#include "LTE_BCCH-BCH-Message-MBMS.h"
+#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
+#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
+#include "LTE_NonMBSFN-SubframeConfig-r14.h"
+
 
 //#include "PHY/defs.h"
 
@@ -117,12 +114,12 @@ extern RAN_CONTEXT_t RC;
 
 uint16_t two_tier_hexagonal_cellIds[7] = {0,1,2,4,5,7,8};
 uint16_t two_tier_hexagonal_adjacent_cellIds[7][6] = {{1,2,4,5,7,8},    // CellId 0
-						      {11,18,2,0,8,15}, // CellId 1
-						      {18,13,3,4,0,1},  // CellId 2
-						      {2,3,14,6,5,0},   // CellId 4
-						      {0,4,6,16,9,7},   // CellId 5
-						      {8,0,5,9,17,12},  // CellId 7
-						      {15,1,0,7,12,10}
+  {11,18,2,0,8,15}, // CellId 1
+  {18,13,3,4,0,1},  // CellId 2
+  {2,3,14,6,5,0},   // CellId 4
+  {0,4,6,16,9,7},   // CellId 5
+  {8,0,5,9,17,12},  // CellId 7
+  {15,1,0,7,12,10}
 };// CellId 8
 
 /*
@@ -184,7 +181,7 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
   return 0xFF; //error!
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) {
   asn_enc_rval_t enc_rval;
   LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
@@ -222,33 +219,21 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
     default:
       AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
   }
+
   LOG_I(RRC,"[MIB] systemBandwidth %x, additional non MBMS subframes %x, sfn %x\n",
         (uint32_t)mib_fembms->message.dl_Bandwidth_MBMS_r14,
         (uint32_t)additionalNonMBSFN,
         (uint32_t)sfn);
-
-
   mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
   mib_fembms->message.systemFrameNumber_r14.size = 1;
   mib_fembms->message.systemFrameNumber_r14.bits_unused=0;
   mib_fembms->message.spare.buf = (uint8_t *)spare;
-//#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
   mib_fembms->message.spare.size = 2;
   mib_fembms->message.spare.bits_unused = 6;  // This makes a spare of 10 bits
-//#else
-  //mib->message.spare.size = 1;
-  //mib->message.spare.bits_unused = 3;  // This makes a spare of 5 bits
-  //mib->message.schedulingInfoSIB1_BR_r13 = 0; // turn off eMTC
-//#endif
-
-  //TODO additionalNonBMSFNSubframes-r14  INTEGER (0..3) ? 
-
+  //TODO additionalNonBMSFNSubframes-r14  INTEGER (0..3) ?
   //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-    xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
+  xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
   //}
-
-
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
                                    NULL,
                                    (void *)mib_fembms,
@@ -262,17 +247,13 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
   }
 
   return((enc_rval.encoded+7)/8);
-
 }
-#endif
 
 
-uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) 
-	       , uint32_t schedulingInfoSIB1
-#endif
-	       ) {
 
+uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource,
+               uint32_t phich_duration, uint32_t frame, uint32_t schedulingInfoSIB1
+              ) {
   asn_enc_rval_t enc_rval;
   LTE_BCCH_BCH_Message_t *mib=&carrier->mib ;
   uint8_t sfn = (uint8_t)((frame>>2)&0xff);
@@ -322,17 +303,11 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
   mib->message.systemFrameNumber.size = 1;
   mib->message.systemFrameNumber.bits_unused=0;
   mib->message.spare.buf = (uint8_t *)spare;
-#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-  mib->message.spare.size = 2;
-  mib->message.spare.bits_unused = 6;  // This makes a spare of 10 bits
-#else
   mib->message.spare.size = 1;
   mib->message.spare.bits_unused = 3;  // This makes a spare of 5 bits
   mib->message.schedulingInfoSIB1_BR_r13 = schedulingInfoSIB1; // turn on/off eMTC
   LOG_I(RRC,"[MIB] schedulingInfoSIB1 %d\n",
-	(uint32_t)mib->message.schedulingInfoSIB1_BR_r13);
-
-#endif
+        (uint32_t)mib->message.schedulingInfoSIB1_BR_r13);
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message,
                                    NULL,
                                    (void *)mib,
@@ -406,13 +381,12 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
   return((enc_rval.encoded+7)/8);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
-                int Mod_id,int CC_id
+                     int Mod_id,int CC_id
 #if defined(ENABLE_ITTI)
   , RrcConfigurationReq *configuration
 #endif
-               ) {
+                    ) {
   //  SystemInformation_t systemInformation;
 #if defined(ENABLE_ITTI)
   int num_plmn = configuration->num_plmn;
@@ -432,23 +406,25 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
   uint8_t *buffer                      = carrier->SIB1_MBMS;
   LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message  = &carrier->siblock1_MBMS;
   LTE_SystemInformationBlockType1_MBMS_r14_t **sib1_MBMS = &carrier->sib1_MBMS;
- 
   int i;
-
   struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1/*, *MBSFN_Area2*/;
-
   memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_MBMS_t));
   bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14_PR_c1;
   bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_MBMS_r14__c1_PR_systemInformationBlockType1_MBMS_r14;
   //  memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
   *sib1_MBMS = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
   PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn);
+
   if (PLMN_identity_info == NULL)
     exit(1);
+
   schedulingInfo = CALLOC(1, sizeof(LTE_SchedulingInfo_MBMS_r14_t));
+
   if (schedulingInfo == NULL)
     exit(1);
+
   sib_type = CALLOC(1, sizeof(LTE_SIB_Type_t));
+
   if (sib_type == NULL)
     exit(1);
 
@@ -460,8 +436,10 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
     dummy_mcc_0 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mcc_1 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mcc_2 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
+
     if (dummy_mcc_0 == NULL || dummy_mcc_1 == NULL || dummy_mcc_2 == NULL)
       exit(1);
+
 #if defined(ENABLE_ITTI)
     *dummy_mcc_0 = (configuration->mcc[i] / 100) % 10;
     *dummy_mcc_1 = (configuration->mcc[i] / 10) % 10;
@@ -476,13 +454,15 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
     ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_2);
     PLMN_identity_info[i].plmn_Identity.mnc.list.size=0;
     PLMN_identity_info[i].plmn_Identity.mnc.list.count=0;
-
     dummy_mnc_0 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mnc_1 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mnc_2 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
+
     if (dummy_mnc_0 == NULL || dummy_mnc_1 == NULL || dummy_mnc_2 == NULL)
       exit(1);
+
 #if defined(ENABLE_ITTI)
+
     if (configuration->mnc[i] >= 100) {
       *dummy_mnc_0 = (configuration->mnc[i] / 100) % 10;
       *dummy_mnc_1 = (configuration->mnc[i] / 10) % 10;
@@ -498,6 +478,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
         *dummy_mnc_2 = (configuration->mnc[i] / 1) % 10;
       }
     }
+
 #else
     *dummy_mnc[i][0] = 0;
     *dummy_mnc[i][1] = 1;
@@ -553,25 +534,20 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
   *sib_type = LTE_SIB_Type_MBMS_r14_sibType13_v920;
   ASN_SEQUENCE_ADD(&schedulingInfo->sib_MappingInfo_r14.list, sib_type);
   ASN_SEQUENCE_ADD(&(*sib1_MBMS)->schedulingInfoList_MBMS_r14.list, schedulingInfo);
-
   (*sib1_MBMS)->si_WindowLength_r14=LTE_SystemInformationBlockType1_MBMS_r14__si_WindowLength_r14_ms20;
   (*sib1_MBMS)->systemInfoValueTag_r14=0;
   //  (*sib1).nonCriticalExtension = calloc(1,sizeof(*(*sib1).nonCriticalExtension));
 
-
- //sib13 optional
- if (1)
-  {
+  //sib13 optional
+  if (1) {
     (*sib1_MBMS)->systemInformationBlockType13_r14 =                             CALLOC(1,sizeof(struct LTE_SystemInformationBlockType13_r9));
     memset((*sib1_MBMS)->systemInformationBlockType13_r14,0,sizeof(struct LTE_SystemInformationBlockType13_r9));
-
     ((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationRepetitionCoeff_r9= LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
     ((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationOffset_r9= 0;
     ((*sib1_MBMS)->systemInformationBlockType13_r14)->notificationConfig_r9.notificationSF_Index_r9= 1;
-
     //((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9= CALLOC(1,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
     //memset(((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9,0,sizeof(LTE_MBSFN_AreaInfoList_r9_t));
-    LTE_MBSFN_AreaInfoList_r9_t * MBSFNArea_list= &((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9;
+    LTE_MBSFN_AreaInfoList_r9_t *MBSFNArea_list= &((*sib1_MBMS)->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9;
     //  MBSFN-AreaInfoList
     memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
     // MBSFN Area 1
@@ -582,48 +558,37 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
     MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
     MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= 1; // in accordance with mbsfn subframe configuration in sib2
     MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_ModificationPeriod_r9_rf512;
- //  Subframe Allocation Info
+    //  Subframe Allocation Info
     MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
     MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
     MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=0x20<<2;  // FDD: SF1
     MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
     MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n7;
-
-
     (MBSFN_Area1)->ext1 = CALLOC (1, sizeof(*(MBSFN_Area1)->ext1));
-
-     memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
-
+    memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
     MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14 = CALLOC(1,sizeof(*( MBSFN_Area1->ext1)->subcarrierSpacingMBMS_r14));
-     
     memset(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14,0,sizeof(*((MBSFN_Area1)->ext1)->subcarrierSpacingMBMS_r14));
-
-
     *(MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14) = LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25;
-
     ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
   }
 
   //nonMBSFN_SubframeConfig_r14 optional
-  if(1){	
+  if(1) {
     (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14 =                             CALLOC(1,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
     memset((*sib1_MBMS)->nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
     (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf8;
     (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14 = 0;
-    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2); 
+    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2);
     //100000001 byte(0)=10000000 byte(1)=xxxxxxx1
     (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x80<<0;
     (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0x1<<7;
-    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2; 
-    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7; 
+    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2;
+    (*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7;
   }
 
-
-
   //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-    xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
+  xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
   //}
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
                                    NULL,
                                    (void *)bcch_message,
@@ -639,15 +604,14 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
 
   return((enc_rval.encoded+7)/8);
 }
-#endif
 //-----------------------------------------------------------------------------
 /*
  * Generate the configuration structure for CDRX feature
  */
-LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, 
-              int CC_id, 
-              RrcConfigurationReq *configuration, 
-              LTE_UE_EUTRA_Capability_t *UEcap)
+LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
+                               int CC_id,
+                               RrcConfigurationReq *configuration,
+                               LTE_UE_EUTRA_Capability_t *UEcap)
 //-----------------------------------------------------------------------------
 {
   LTE_DRX_Config_t *drxConfig = NULL;
@@ -658,6 +622,7 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
   /* Check the UE capabilities for short and long CDRX cycles support */
   if (UEcap) {
     featureGroupIndicators = UEcap->featureGroupIndicators;
+
     if (featureGroupIndicators) {
       if (featureGroupIndicators->size > 1 || (featureGroupIndicators->size == 1 && featureGroupIndicators->bits_unused < 4)) {
         ueSupportCdrxShortFlag = ((featureGroupIndicators->buf[0] & (uint8_t) 0x10) > 0);
@@ -672,7 +637,9 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
   }
 
   drxConfig = (LTE_DRX_Config_t *) malloc(sizeof(LTE_DRX_Config_t));
+
   if (drxConfig == NULL) return NULL;
+
   memset(drxConfig, 0, sizeof(LTE_DRX_Config_t));
 
   /* Long DRX cycle support is mandatory for CDRX activation */
@@ -689,55 +656,72 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
     drxConfig->choice.setup.drx_InactivityTimer = configuration->radioresourceconfig[CC_id].drx_InactivityTimer;
     drxConfig->choice.setup.drx_RetransmissionTimer = configuration->radioresourceconfig[CC_id].drx_RetransmissionTimer;
     drxConfig->choice.setup.longDRX_CycleStartOffset.present = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset_present;
+
     switch (drxConfig->choice.setup.longDRX_CycleStartOffset.present) {
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf10 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf20 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf32 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf40 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf64 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf80 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf128 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf160 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf256 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf320 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf512 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf640 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf1024 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf1280 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf2048 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
-      case 	LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
+
+      case  LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
         drxConfig->choice.setup.longDRX_CycleStartOffset.choice.sf2560 = configuration->radioresourceconfig[CC_id].drx_longDrx_CycleStartOffset;
         break;
+
       default:
         break;
     }
@@ -752,15 +736,12 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id,
       drxConfig->choice.setup.shortDRX->drxShortCycleTimer = configuration->radioresourceconfig[CC_id].drx_shortDrx_ShortCycleTimer;
     }
   }
-  
+
   return drxConfig;
 }
 
 uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
-		int Mod_id,int CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                , BOOLEAN_t brOption
-#endif
+                int Mod_id,int CC_id, BOOLEAN_t brOption
 #if defined(ENABLE_ITTI)
   , RrcConfigurationReq *configuration
 #endif
@@ -781,38 +762,37 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
   asn_enc_rval_t enc_rval;
   LTE_SchedulingInfo_t *schedulingInfo;
   LTE_SIB_Type_t *sib_type;
-
   uint8_t *buffer;
   LTE_BCCH_DL_SCH_Message_t *bcch_message;
   LTE_SystemInformationBlockType1_t **sib1;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (brOption) {
     buffer       = carrier->SIB1_BR;
     bcch_message = &carrier->siblock1_BR;
     sib1         = &carrier->sib1_BR;
+  } else {
+    buffer       = carrier->SIB1;
+    bcch_message = &carrier->siblock1;
+    sib1         = &carrier->sib1;
   }
-  else
-#endif
-    {
-      buffer       = carrier->SIB1;
-      bcch_message = &carrier->siblock1;
-      sib1         = &carrier->sib1;
-    }
 
   memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
   bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_PR_c1;
   bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1;
-
   //  memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
   *sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1;
   PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn);
+
   if (PLMN_identity_info == NULL)
     exit(1);
+
   schedulingInfo = CALLOC(1, sizeof(LTE_SchedulingInfo_t));
+
   if (schedulingInfo == NULL)
     exit(1);
+
   sib_type = CALLOC(1, sizeof(LTE_SIB_Type_t));
+
   if (sib_type == NULL)
     exit(1);
 
@@ -824,8 +804,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
     dummy_mcc_0 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mcc_1 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mcc_2 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
+
     if (dummy_mcc_0 == NULL || dummy_mcc_1 == NULL || dummy_mcc_2 == NULL)
       exit(1);
+
 #if defined(ENABLE_ITTI)
     *dummy_mcc_0 = (configuration->mcc[i] / 100) % 10;
     *dummy_mcc_1 = (configuration->mcc[i] / 10) % 10;
@@ -838,16 +820,17 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
     ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_0);
     ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_1);
     ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list, dummy_mcc_2);
-
     PLMN_identity_info[i].plmn_Identity.mnc.list.size=0;
     PLMN_identity_info[i].plmn_Identity.mnc.list.count=0;
-
     dummy_mnc_0 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mnc_1 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
     dummy_mnc_2 = CALLOC(1, sizeof(LTE_MCC_MNC_Digit_t));
+
     if (dummy_mnc_0 == NULL || dummy_mnc_1 == NULL || dummy_mnc_2 == NULL)
       exit(1);
+
 #if defined(ENABLE_ITTI)
+
     if (configuration->mnc[i] >= 100) {
       *dummy_mnc_0 = (configuration->mnc[i] / 100) % 10;
       *dummy_mnc_1 = (configuration->mnc[i] / 10) % 10;
@@ -863,6 +846,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
         *dummy_mnc_2 = (configuration->mnc[i] / 1) % 10;
       }
     }
+
 #else
     *dummy_mnc_0 = 0;
     *dummy_mnc_1 = 1;
@@ -921,7 +905,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
 #if defined(ENABLE_ITTI)
     configuration->eutra_band[CC_id];
 #else
-  7;
+    7;
 #endif
   schedulingInfo->si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8;
   // This is for SIB2/3
@@ -937,400 +921,321 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
     (*sib1)->tdd_Config =                             CALLOC(1,sizeof(struct LTE_TDD_Config));
     (*sib1)->tdd_Config->subframeAssignment =
 #if defined(ENABLE_ITTI)
-	configuration->tdd_config[CC_id];
+      configuration->tdd_config[CC_id];
 #else
       3; // +kogo this was frame_parms->tdd_config
 #endif
     (*sib1)->tdd_Config->specialSubframePatterns =
 #if defined(ENABLE_ITTI)
-	configuration->tdd_config_s[CC_id];
+      configuration->tdd_config_s[CC_id];
 #else
       0;
 #endif
-    }
+  }
 
   (*sib1)->si_WindowLength = LTE_SystemInformationBlockType1__si_WindowLength_ms20;
   (*sib1)->systemInfoValueTag = 0;
-
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   (*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t));
-
   LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension;
   sib1_890->lateNonCriticalExtension = NULL;
   sib1_890->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t));
   memset(sib1_890->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t));
-
   LTE_SystemInformationBlockType1_v920_IEs_t *sib1_920 = (*sib1_890).nonCriticalExtension;
   sib1_920->ims_EmergencySupport_r9 = NULL; // ptr
   sib1_920->cellSelectionInfo_v920 = NULL;
   sib1_920->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t));
   memset(sib1_920->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t));
-
   //////Rel11
   LTE_SystemInformationBlockType1_v1130_IEs_t *sib1_1130 = sib1_920->nonCriticalExtension;
-
   sib1_1130->tdd_Config_v1130 = NULL; // ptr
   sib1_1130->cellSelectionInfo_v1130 = NULL; // ptr
   sib1_1130->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t));
   memset(sib1_1130->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t));
-
   ///Rel12
   LTE_SystemInformationBlockType1_v1250_IEs_t *sib1_1250 = sib1_1130->nonCriticalExtension;
   sib1_1250->cellAccessRelatedInfo_v1250.category0Allowed_r12 = NULL; // long*
   sib1_1250->cellSelectionInfo_v1250 = NULL;
   sib1_1250->freqBandIndicatorPriority_r12 = 0; // long* // FIXME
   sib1_1250->nonCriticalExtension = NULL;
-
   ////Rel1310
 #if defined(ENABLE_ITTI)
-  if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
-      (brOption==TRUE))
-  {
-      sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
-      memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
-      LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
-
-
-      if (configuration->hyperSFN_r13[CC_id])
-      {
-          sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type
-          memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t));
-          sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t));
-          memmove(sib1_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t));
-          sib1_1310->hyperSFN_r13->size = 2;
-          sib1_1310->hyperSFN_r13->bits_unused = 6;
-      }
-      else
-          sib1_1310->hyperSFN_r13 = NULL;
 
-      if (configuration->eDRX_Allowed_r13[CC_id])
-      {
-          sib1_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long));
-          *sib1_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id];
-      }
-      else
-          sib1_1310->eDRX_Allowed_r13 = NULL; // long*
-
-      if (configuration->cellSelectionInfoCE_r13[CC_id])
-      {
-          sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t));
-          memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t));
-          sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long
-          if (configuration->q_QualMinRSRQ_CE_r13[CC_id])
-          {
-              sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long));
-              *sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id];
-          }
-          else
-              sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL;
+  if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
+      (brOption==TRUE)) {
+    sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
+    memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
+    LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
+
+    if (configuration->hyperSFN_r13[CC_id]) {
+      sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type
+      memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t));
+      sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t));
+      memmove(sib1_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t));
+      sib1_1310->hyperSFN_r13->size = 2;
+      sib1_1310->hyperSFN_r13->bits_unused = 6;
+    } else
+      sib1_1310->hyperSFN_r13 = NULL;
+
+    if (configuration->eDRX_Allowed_r13[CC_id]) {
+      sib1_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long));
+      *sib1_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id];
+    } else
+      sib1_1310->eDRX_Allowed_r13 = NULL; // long*
+
+    if (configuration->cellSelectionInfoCE_r13[CC_id]) {
+      sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t));
+      memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t));
+      sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long
+
+      if (configuration->q_QualMinRSRQ_CE_r13[CC_id]) {
+        sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long));
+        *sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id];
+      } else
+        sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL;
+    } else
+      sib1_1310->cellSelectionInfoCE_r13 = NULL;
+
+    if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) {
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13
+        = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13));
+      LOG_I(RRC,"Allocating memory for BR access of SI (%p)\n",
+            sib1_1310->bandwidthReducedAccessRelatedInfo_r13);
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
+        = configuration->si_WindowLength_BR_r13[CC_id]; // 0
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13
+        = configuration->si_RepetitionPattern_r13[CC_id]; // 0
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t));
+      LTE_SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t));
+      memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t));
+      int num_sched_info_br = configuration->scheduling_info_br_size[CC_id];
+      int index;
+
+      for (index = 0; index < num_sched_info_br; ++index) {
+        schedulinginfo_br_13->si_Narrowband_r13 = configuration->si_Narrowband_r13[CC_id][index];
+        schedulinginfo_br_13->si_TBS_r13 = configuration->si_TBS_r13[CC_id][index];
+        LOG_I(RRC,"Adding (%d,%d) to scheduling_info_br_13\n",(int)schedulinginfo_br_13->si_Narrowband_r13,(int)schedulinginfo_br_13->si_TBS_r13);
+        ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13);
       }
-      else
-          sib1_1310->cellSelectionInfoCE_r13 = NULL;
-
-      if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id])
-      {
-
-
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13
-                  = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13));
-
-          LOG_I(RRC,"Allocating memory for BR access of SI (%p)\n",
-                sib1_1310->bandwidthReducedAccessRelatedInfo_r13);
-
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
-                  = configuration->si_WindowLength_BR_r13[CC_id]; // 0
-
-
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13
-                  = configuration->si_RepetitionPattern_r13[CC_id]; // 0
-
-
-
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t));
-
-          LTE_SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t));
-          memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t));
-
-          int num_sched_info_br = configuration->scheduling_info_br_size[CC_id];
-          int index;
-          for (index = 0; index < num_sched_info_br; ++index)
-          {
-
-              schedulinginfo_br_13->si_Narrowband_r13 = configuration->si_Narrowband_r13[CC_id][index];
-              schedulinginfo_br_13->si_TBS_r13 = configuration->si_TBS_r13[CC_id][index];
-              LOG_I(RRC,"Adding (%d,%d) to scheduling_info_br_13\n",(int)schedulinginfo_br_13->si_Narrowband_r13,(int)schedulinginfo_br_13->si_TBS_r13);
-              ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13);
-          }
-
 
-          if (configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id])
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
-                  = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
-              memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
-                 sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
-
-              if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id])
-              {
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
-                         = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
-
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
-                  memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 2 * sizeof(uint8_t));
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2;
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6;
-              }
-              else
-              {
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
-                        = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern40_r13;
-
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t));
-//                  memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t));
-                  int bm_index;
-                  for (bm_index = 0; bm_index < 5; bm_index++)
-                  {
-                      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf[bm_index] = 0xFF;
-                  }
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.size = 5;
-                  sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0;
-              }
-
-          }
-          else
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL;
-          }
-
-          if (configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id])
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
-              memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
-              memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id],
+      if (configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
+          = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
+        memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
+               sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
+
+        if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) {
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
+            = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
+          memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id],
                   2 * sizeof(uint8_t));
-             sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2;
-             sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6;
-          }
-          else
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = NULL; 
-          }
-
-
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id];
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
-                  = configuration->si_HoppingConfigCommon_r13[CC_id];
-
-          if (configuration->si_ValidityTime_r13[CC_id])
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long));
-              memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long));
-              *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = *configuration->si_ValidityTime_r13[CC_id];
-
-          }
-          else
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6;
+        } else {
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
+            = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern40_r13;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t));
+          //                  memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t));
+          int bm_index;
+
+          for (bm_index = 0; bm_index < 5; bm_index++) {
+            sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf[bm_index] = 0xFF;
           }
 
-
-          LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13;
-          int num_system_info_value_tag = configuration->system_info_value_tag_SI_size[CC_id];
-          if (num_system_info_value_tag > 0)
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t));
-              for (index = 0; index < num_system_info_value_tag; ++index)
-              {
-                  systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t));
-                  if (configuration->systemInfoValueTagSi_r13[CC_id][index])
-                  {
-                      *systemInfoValueTagSi_r13 = configuration->systemInfoValueTagSi_r13[CC_id][index];
-                  }
-                  else
-                  {
-                      *systemInfoValueTagSi_r13 = 0;
-                  }
-                  ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13);
-              }
-
-          }
-          else
-          {
-              sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = NULL;
-          }
-
-      }
-      else
-      {
-          sib1_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.size = 5;
+          sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0;
+        }
+      } else {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL;
       }
 
-      sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
-      memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
-
-      /////Rel1320
-      LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension;
-
+      if (configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id]) {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
+        memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
+        memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id],
+                2 * sizeof(uint8_t));
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2;
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6;
+      } else {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = NULL;
+      }
 
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id];
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
+        = configuration->si_HoppingConfigCommon_r13[CC_id];
 
-      if (configuration->freqHoppingParametersDL_r13[CC_id])
-      {
-          sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
-          memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
+      if (configuration->si_ValidityTime_r13[CC_id]) {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long));
+        memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long));
+        *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = *configuration->si_ValidityTime_r13[CC_id];
+      } else {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL;
+      }
 
+      LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13;
+      int num_system_info_value_tag = configuration->system_info_value_tag_SI_size[CC_id];
 
-          if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id])
-          {
-              sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long));
-              *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id];
-          }
-          else
-              sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL;
+      if (num_system_info_value_tag > 0) {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t));
 
-          sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
-          memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
+        for (index = 0; index < num_system_info_value_tag; ++index) {
+          systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t));
 
-          if (configuration->interval_DLHoppingConfigCommonModeA_r13[CC_id])
-          {
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id];
+          if (configuration->systemInfoValueTagSi_r13[CC_id][index]) {
+            *systemInfoValueTagSi_r13 = configuration->systemInfoValueTagSi_r13[CC_id][index];
+          } else {
+            *systemInfoValueTagSi_r13 = 0;
           }
-          else
-          {
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_TDD_r13;
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id];
-          }
-
-          sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
-          memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
 
-          if (configuration->interval_DLHoppingConfigCommonModeB_r13[CC_id])
-          {
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id];
-          }
-          else
-          {
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_TDD_r13;
-              sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id];
-          }
+          ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13);
+        }
+      } else {
+        sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = NULL;
+      }
+    } else {
+      sib1_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL;
+    }
 
-          if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id])
-          {
+    sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
+    memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
+    /////Rel1320
+    LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension;
+
+    if (configuration->freqHoppingParametersDL_r13[CC_id]) {
+      sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
+      memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
+
+      if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]) {
+        sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long));
+        *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id];
+      } else
+        sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL;
+
+      sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1,
+          sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
+      memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0,
+             sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
+
+      if (configuration->interval_DLHoppingConfigCommonModeA_r13[CC_id]) {
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present =
+          LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id];
+      } else {
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present =
+          LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_TDD_r13;
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id];
+      }
 
-              sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long));
-              *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id];
-          }
-          else
-              sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL;
+      sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1,
+          sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
+      memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0,
+             sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
 
+      if (configuration->interval_DLHoppingConfigCommonModeB_r13[CC_id]) {
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present =
+          LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id];
+      } else {
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present =
+          LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_TDD_r13;
+        sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id];
       }
-      else
-          sib1_1320->freqHoppingParametersDL_r13 = NULL;
 
-      sib1_1320->nonCriticalExtension = NULL;
+      if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]) {
+        sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long));
+        *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id];
+      } else
+        sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL;
+    } else
+      sib1_1320->freqHoppingParametersDL_r13 = NULL;
+
+    sib1_1320->nonCriticalExtension = NULL;
   }
+
 #else
   sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
   memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
   SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
-
   sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type
   memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t));
   sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t));
   memset(sib1_1310->hyperSFN_r13->buf, 0, 2*sizeof(uint8_t));
   sib1_1310->hyperSFN_r13->size = 2;
   sib1_1310->hyperSFN_r13->bits_unused = 6;
-
   sib1_1310->eDRX_Allowed_r13 = NULL; // long*
   sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t));
   memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t));
   sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = -70; // (Q_RxLevMin_t) long
   sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; // (Q_RxLevMin_t) *long
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13
     = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13));
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
     = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms20; // 0
-
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13
     = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_everyRF; // 0
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t));
   SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t));
   memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t));
   schedulinginfo_br_13->si_Narrowband_r13 = 1;
   schedulinginfo_br_13->si_TBS_r13 = LTE_SchedulingInfo_BR_r13__si_TBS_r13_b152;
   ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13);
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
     = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
   memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
-	 sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
-
+         sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
     = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
   memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, 0, 2 * sizeof(uint8_t));
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2;
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6;
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
   memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
   memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, 0,
-	 2 * sizeof(uint8_t));
+         2 * sizeof(uint8_t));
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2;
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6;
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = 1;
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
     = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_on;
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long));
   memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long));
   *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13
     = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_ValidityTime_r13_true;
-
-
   sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t));
   LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t));
   *systemInfoValueTagSi_r13 = 0;
   ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13);
-
   sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
   memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
-
   /////Rel1320
   LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension;
   sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
   memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
-
   sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long));
   *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__mpdcch_pdsch_HoppingNB_r13_nb2;
-
-
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
-  memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13__interval_FDD_r13_int1;
-
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
-  memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
-  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13__interval_FDD_r13_int2;
-
-
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1,
+      sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
+  memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0,
+         sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present =
+    LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 =
+    LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13__interval_FDD_r13_int1;
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1,
+      sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
+  memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0,
+         sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present =
+    LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
+  sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 =
+    LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13__interval_FDD_r13_int2;
   sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long));
   *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = 1;
-
   sib1_1320->nonCriticalExtension = NULL;
 #endif
-#endif
-
   (*sib1)->si_WindowLength=LTE_SystemInformationBlockType1__si_WindowLength_ms20;
   (*sib1)->systemInfoValueTag=0;
   //  (*sib1).nonCriticalExtension = calloc(1,sizeof(*(*sib1).nonCriticalExtension));
@@ -1361,17 +1266,12 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
 
 uint8_t do_SIB23(uint8_t Mod_id,
 
-		 int CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-		 , BOOLEAN_t brOption
-#endif
+                 int CC_id, BOOLEAN_t brOption
 #if defined(ENABLE_ITTI)
-		 , RrcConfigurationReq *configuration
+  , RrcConfigurationReq *configuration
 #endif
-		 ) {
+                ) {
   struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   int eMTC_configured = configuration->eMTC_configured;
   struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib18_part, *sib19_part, *sib21_part;
   LTE_SL_CommRxPoolList_r12_t *SL_CommRxPoolList; //for SIB18
@@ -1381,46 +1281,33 @@ uint8_t do_SIB23(uint8_t Mod_id,
   //SL_DiscRxPoolList_r12_t *SL_DiscRxPoolPSList; //for SIB19 (discRxPoolPS)
   //struct SL_DiscResourcePool_r12 *SL_DiscResourcePoolPS; //for SIB19 (discRxPoolPS)
   //struct SL_V2X_ConfigCommon_r14 *SL_V2X_ConfigCommon;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part=NULL;
   LTE_MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList;
   LTE_MBSFN_AreaInfoList_r9_t *MBSFNArea_list;
   struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1, *MBSFN_Area2;
-#endif
   asn_enc_rval_t enc_rval;
-
-
   LTE_BCCH_DL_SCH_Message_t         *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation;
   uint8_t                       *buffer;
   LTE_SystemInformationBlockType2_t **sib2;
   RadioResourceConfig           *rrconfig;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (brOption) {
     buffer   = RC.rrc[Mod_id]->carrier[CC_id].SIB23_BR;
     sib2     = &RC.rrc[Mod_id]->carrier[CC_id].sib2_BR;
     rrconfig = &configuration->radioresourceconfig_BR[CC_id];
     LOG_I(RRC,"Running SIB2/3 Encoding for eMTC\n");
+  } else {
+    buffer   = RC.rrc[Mod_id]->carrier[CC_id].SIB23;
+    sib2     = &RC.rrc[Mod_id]->carrier[CC_id].sib2;
+    rrconfig = &configuration->radioresourceconfig[CC_id];
   }
-  else
-#endif
-    {
-      buffer   = RC.rrc[Mod_id]->carrier[CC_id].SIB23;
-      sib2     = &RC.rrc[Mod_id]->carrier[CC_id].sib2;
-      rrconfig = &configuration->radioresourceconfig[CC_id];
-    }
-    
+
   LTE_SystemInformationBlockType3_t       **sib3        = &RC.rrc[Mod_id]->carrier[CC_id].sib3;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   LTE_SystemInformationBlockType13_r9_t   **sib13       = &RC.rrc[Mod_id]->carrier[CC_id].sib13;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   //TTN - for D2D
   LTE_SystemInformationBlockType18_r12_t     **sib18        = &RC.rrc[Mod_id]->carrier[CC_id].sib18;
   LTE_SystemInformationBlockType19_r12_t     **sib19        = &RC.rrc[Mod_id]->carrier[CC_id].sib19;
   LTE_SystemInformationBlockType21_r14_t     **sib21        = &RC.rrc[Mod_id]->carrier[CC_id].sib21;
-#endif
 
   if (bcch_message) {
     memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
@@ -1439,12 +1326,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
     exit(-1);
   }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   LOG_I(RRC,"[eNB %d] Configuration SIB2/3, eMBMS = %d\n", Mod_id, configuration->eMBMS_configured);
-#else
-  LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id);
-#endif
   sib2_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
   sib3_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
   memset(sib2_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
@@ -1453,7 +1335,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
   sib3_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3;
   *sib2 = &sib2_part->choice.sib2;
   *sib3 = &sib3_part->choice.sib3;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   if ((configuration->eMBMS_configured > 0) && (brOption==FALSE)) {
     sib13_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
@@ -1462,32 +1343,26 @@ uint8_t do_SIB23(uint8_t Mod_id,
     *sib13 = &sib13_part->choice.sib13_v920;
   }
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   if (configuration->SL_configured > 0) {
-  //TTN - for D2D
+    //TTN - for D2D
     sib18_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     sib19_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     sib21_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     memset(sib18_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     memset(sib19_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     memset(sib21_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
-    
     sib18_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250;
     sib19_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250;
     sib21_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430;
-    
     *sib18 = &sib18_part->choice.sib18_v1250;
     *sib19 = &sib19_part->choice.sib19_v1250;
     *sib21 = &sib21_part->choice.sib21_v1430;
   }
-#endif
+
   // sib2
   (*sib2)->ac_BarringInfo = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   (*sib2)->ext1 = NULL;
   (*sib2)->ext2 = NULL;
-#endif
 #if defined(ENABLE_ITTI)
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles                         = rrconfig->rach_numberOfRA_Preambles;
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig                        = NULL;
@@ -1513,42 +1388,39 @@ uint8_t do_SIB23(uint8_t Mod_id,
   if (eMTC_configured>0) {
     (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct LTE_RACH_ConfigCommon__ext1));
     memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct LTE_RACH_ConfigCommon__ext1));
-    
+
     if (rrconfig->preambleTransMax_CE_r13) {
       (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t));
       *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = *rrconfig->preambleTransMax_CE_r13; // to be re-initialized when we find the enum
-    }
-    else (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL;
-  
+    } else (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL;
 
     (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
     memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
-
     LTE_RACH_CE_LevelInfo_r13_t *rach_ce_levelinfo_r13;
     int num_rach_ce_level_info = configuration->rach_CE_LevelInfoList_r13_size[CC_id];
     int index;
+
     for (index = 0; index < num_rach_ce_level_info; ++index) {
       rach_ce_levelinfo_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfo_r13_t));
+
       if (configuration->rach_CE_LevelInfoList_r13_size[CC_id]) {
-          rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = configuration->firstPreamble_r13[CC_id][index];
-          rach_ce_levelinfo_r13->preambleMappingInfo_r13.lastPreamble_r13  = configuration->lastPreamble_r13[CC_id][index];
-          rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13                 = configuration->ra_ResponseWindowSize_r13[CC_id][index];
-          rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13         = configuration->mac_ContentionResolutionTimer_r13[CC_id][index];
-          rach_ce_levelinfo_r13->rar_HoppingConfig_r13                     = configuration->rar_HoppingConfig_r13[CC_id][index];
-      }
-      else
-      {
-          rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = 0;
-          rach_ce_levelinfo_r13->preambleMappingInfo_r13.lastPreamble_r13 = 63;
-          rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13 = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80;
-          rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200;
-          rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = LTE_RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off;
+        rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = configuration->firstPreamble_r13[CC_id][index];
+        rach_ce_levelinfo_r13->preambleMappingInfo_r13.lastPreamble_r13  = configuration->lastPreamble_r13[CC_id][index];
+        rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13                 = configuration->ra_ResponseWindowSize_r13[CC_id][index];
+        rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13         = configuration->mac_ContentionResolutionTimer_r13[CC_id][index];
+        rach_ce_levelinfo_r13->rar_HoppingConfig_r13                     = configuration->rar_HoppingConfig_r13[CC_id][index];
+      } else {
+        rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = 0;
+        rach_ce_levelinfo_r13->preambleMappingInfo_r13.lastPreamble_r13 = 63;
+        rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13 = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80;
+        rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200;
+        rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = LTE_RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off;
       }
+
       ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13);
     }
   }
 
-
   // BCCH-Config
   (*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff
     = rrconfig->bcch_modificationPeriodCoeff;
@@ -1613,7 +1485,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
 
     if (rrconfig->srs_MaxUpPts) {
       (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts
-	= CALLOC(1,sizeof(long));
+        = CALLOC(1,sizeof(long));
       *(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts=1;
     } else {
       (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts = NULL;
@@ -1659,248 +1531,216 @@ uint8_t do_SIB23(uint8_t Mod_id,
       (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t));
       (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id];
       (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id];
-      if (configuration->nb_v1310[CC_id])
-      {
-          (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = CALLOC(1, sizeof(long));
-          *(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = *configuration->nb_v1310[CC_id];
-      }
-      else
-      {
-          (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = NULL;
-      }
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL;
- 
 
+      if (configuration->nb_v1310[CC_id]) {
+        (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = CALLOC(1, sizeof(long));
+        *(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = *configuration->nb_v1310[CC_id];
+      } else {
+        (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->nB_v1310 = NULL;
+      }
+    } else (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL;
 
-  
     if (configuration->sib2_freq_hoppingParameters_r13_exists[CC_id]) {
-
       (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = CALLOC(1, sizeof(LTE_FreqHoppingParameters_r13_t));
-  
-      if (configuration->sib2_interval_ULHoppingConfigCommonModeA_r13[CC_id]) {
-          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13
-                  = CALLOC(1, sizeof(struct LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13));
-          if (*configuration->sib2_interval_ULHoppingConfigCommonModeA_r13[CC_id] == 0) {
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->present
-                      = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->choice.interval_FDD_r13
-                      = configuration->sib2_interval_ULHoppingConfigCommonModeA_r13_val[CC_id];
 
-          }
-          else
-          {
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->present
-                      = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_TDD_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->choice.interval_TDD_r13
-                      = configuration->sib2_interval_ULHoppingConfigCommonModeA_r13_val[CC_id];
-
-          }
-      }
-      else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13 = NULL;
-      
+      if (configuration->sib2_interval_ULHoppingConfigCommonModeA_r13[CC_id]) {
+        (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13
+          = CALLOC(1, sizeof(struct LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13));
+
+        if (*configuration->sib2_interval_ULHoppingConfigCommonModeA_r13[CC_id] == 0) {
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->present
+            = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_FDD_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->choice.interval_FDD_r13
+            = configuration->sib2_interval_ULHoppingConfigCommonModeA_r13_val[CC_id];
+        } else {
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->present
+            = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_TDD_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13->choice.interval_TDD_r13
+            = configuration->sib2_interval_ULHoppingConfigCommonModeA_r13_val[CC_id];
+        }
+      } else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeA_r13 = NULL;
 
       if (configuration->sib2_interval_ULHoppingConfigCommonModeB_r13[CC_id]) {
-          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13
-                  = CALLOC(1, sizeof(struct LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13));
-          if (*configuration->sib2_interval_ULHoppingConfigCommonModeB_r13[CC_id] == 0)  {
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->present
-                      = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->choice.interval_FDD_r13
-                      = configuration->sib2_interval_ULHoppingConfigCommonModeB_r13_val[CC_id];
-          }
-          else {
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->present
-                      = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_TDD_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->choice.interval_TDD_r13
-                      = configuration->sib2_interval_ULHoppingConfigCommonModeB_r13_val[CC_id];
-          }
-      }
-      else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13 = NULL;     
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL;
-  // pdsch_ConfigCommon_v1310
+        (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13
+          = CALLOC(1, sizeof(struct LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13));
+
+        if (*configuration->sib2_interval_ULHoppingConfigCommonModeB_r13[CC_id] == 0)  {
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->present
+            = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_FDD_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->choice.interval_FDD_r13
+            = configuration->sib2_interval_ULHoppingConfigCommonModeB_r13_val[CC_id];
+        } else {
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->present
+            = LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_TDD_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13->choice.interval_TDD_r13
+            = configuration->sib2_interval_ULHoppingConfigCommonModeB_r13_val[CC_id];
+        }
+      } else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13->interval_ULHoppingConfigCommonModeB_r13 = NULL;
+    } else (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL;
+
+    // pdsch_ConfigCommon_v1310
     (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = CALLOC(1,sizeof(LTE_PDSCH_ConfigCommon_v1310_t));
 
     if (configuration->pdsch_maxNumRepetitionCEmodeA_r13[CC_id]) {
-        (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = CALLOC(1, sizeof(long));
-        *(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = *configuration->pdsch_maxNumRepetitionCEmodeA_r13[CC_id];
+      (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = CALLOC(1, sizeof(long));
+      *(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = *configuration->pdsch_maxNumRepetitionCEmodeA_r13[CC_id];
     } else {
-        (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = NULL;
+      (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = NULL;
     }
 
     if (configuration->pdsch_maxNumRepetitionCEmodeB_r13[CC_id]) {
-        (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = CALLOC(1, sizeof(long)); // check if they're really long
+      (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = CALLOC(1, sizeof(long)); // check if they're really long
       *(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = *configuration->pdsch_maxNumRepetitionCEmodeB_r13[CC_id];
     } else {
       (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = NULL;
     }
 
-  //  *(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = 0;
-  //  (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = NULL;
-
-  //  pusch_ConfigCommon_v1310
+    //  *(*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeA_r13 = 0;
+    //  (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310->pdsch_maxNumRepetitionCEmodeB_r13 = NULL;
+    //  pusch_ConfigCommon_v1310
     (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = calloc(1,sizeof(LTE_PUSCH_ConfigCommon_v1310_t));
 
     if (configuration->pusch_maxNumRepetitionCEmodeA_r13[CC_id]) {
-        (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = calloc(1,sizeof(long));
-        *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = *configuration->pusch_maxNumRepetitionCEmodeA_r13[CC_id];
+      (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = calloc(1,sizeof(long));
+      *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = *configuration->pusch_maxNumRepetitionCEmodeA_r13[CC_id];
     } else {
-        (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = NULL;
+      (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = NULL;
     }
 
     if (configuration->pusch_maxNumRepetitionCEmodeB_r13[CC_id]) {
-        (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = CALLOC(1, sizeof(long));
-        *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = *configuration->pusch_maxNumRepetitionCEmodeB_r13[CC_id];
+      (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = CALLOC(1, sizeof(long));
+      *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = *configuration->pusch_maxNumRepetitionCEmodeB_r13[CC_id];
     } else {
       (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = NULL;
     }
 
     if (configuration->pusch_HoppingOffset_v1310[CC_id]) {
-        (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = CALLOC(1, sizeof(long));
-        *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = *configuration->pusch_HoppingOffset_v1310[CC_id];
+      (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = CALLOC(1, sizeof(long));
+      *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = *configuration->pusch_HoppingOffset_v1310[CC_id];
     } else {
-        (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = NULL;
+      (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = NULL;
     }
 
-  //  *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = 0;
-  //  (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = NULL;
-  //  (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = NULL;
-
+    //  *(*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeA_r13 = 0;
+    //  (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_maxNumRepetitionCEmodeB_r13 = NULL;
+    //  (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310->pusch_HoppingOffset_v1310 = NULL;
 
     if (rrconfig->prach_ConfigCommon_v1310) {
       (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PRACH_ConfigSIB_v1310_t));
       memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(LTE_PRACH_ConfigSIB_v1310_t));
-
       LTE_RSRP_Range_t *rsrp_range;
       int num_rsrp_range = configuration->rsrp_range_list_size[CC_id];
       int rsrp_index;
+
       for (rsrp_index = 0; rsrp_index < num_rsrp_range; ++rsrp_index) {
-          rsrp_range = CALLOC(1, sizeof(LTE_RSRP_Range_t));
-          if (configuration->rsrp_range_list_size[CC_id]) *rsrp_range = configuration->rsrp_range[CC_id][rsrp_index];
-          else                                            *rsrp_range = 60;
-          ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, rsrp_range);
+        rsrp_range = CALLOC(1, sizeof(LTE_RSRP_Range_t));
+
+        if (configuration->rsrp_range_list_size[CC_id]) *rsrp_range = configuration->rsrp_range[CC_id][rsrp_index];
+        else                                            *rsrp_range = 60;
+
+        ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, rsrp_range);
       }
 
       (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = NULL;
 
       if (rrconfig->mpdcch_startSF_CSS_RA_r13) {
-          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
-          memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
-
-          if (*rrconfig->mpdcch_startSF_CSS_RA_r13) {
-              (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val;
-          }
-          else {
-              (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_tdd_r13;
-              (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.tdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val;
-          }
+        (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
+        memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
+
+        if (*rrconfig->mpdcch_startSF_CSS_RA_r13) {
+          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val;
+        } else {
+          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_tdd_r13;
+          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.tdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val;
+        }
       }
 
       if (rrconfig->prach_HoppingOffset_r13) {
-          (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = calloc(1, sizeof(long));
-          *(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = *rrconfig->prach_HoppingOffset_r13;
-      }
-      else (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL;
-       
-      LTE_PRACH_ParametersCE_r13_t *prach_parametersce_r13;
+        (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = calloc(1, sizeof(long));
+        *(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = *rrconfig->prach_HoppingOffset_r13;
+      } else (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL;
 
+      LTE_PRACH_ParametersCE_r13_t *prach_parametersce_r13;
       int num_prach_parameters_ce = configuration->prach_parameters_list_size[CC_id];
       int prach_parameters_index;
       AssertFatal(num_prach_parameters_ce > 0, "PRACH CE parameter list is empty\n");
 
       for (prach_parameters_index = 0; prach_parameters_index < num_prach_parameters_ce; ++prach_parameters_index) {
-          prach_parametersce_r13 = CALLOC(1, sizeof(LTE_PRACH_ParametersCE_r13_t));
-          prach_parametersce_r13->prach_ConfigIndex_r13 = configuration->prach_config_index[CC_id][prach_parameters_index];
-          prach_parametersce_r13->prach_FreqOffset_r13 = configuration->prach_freq_offset[CC_id][prach_parameters_index];
-
-          AssertFatal(configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index]!=NULL,
-                      "configuration->prach_StartingSubframe_r13[%d][%d] is null",
-                      (int)CC_id,(int)prach_parameters_index);
-          if (configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index]){
-              prach_parametersce_r13->prach_StartingSubframe_r13 = CALLOC(1, sizeof(long));
-              *prach_parametersce_r13->prach_StartingSubframe_r13 = *configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index];
-          }
-          else prach_parametersce_r13->prach_StartingSubframe_r13 = NULL;
-        
-
-          if (configuration->maxNumPreambleAttemptCE_r13[CC_id][prach_parameters_index]) {
-              prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = CALLOC(1, sizeof(long));
-              *prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = *configuration->maxNumPreambleAttemptCE_r13[CC_id][prach_parameters_index];
-          }
-          else prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = NULL;
-         
-          prach_parametersce_r13->numRepetitionPerPreambleAttempt_r13 = configuration->numRepetitionPerPreambleAttempt_r13[CC_id][prach_parameters_index];
-          prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = configuration->mpdcch_NumRepetition_RA_r13[CC_id][prach_parameters_index];
-          prach_parametersce_r13->prach_HoppingConfig_r13 = configuration->prach_HoppingConfig_r13[CC_id][prach_parameters_index];
-
-          long *maxavailablenarrowband;
-          int num_narrow_bands = configuration->max_available_narrow_band_size[CC_id][prach_parameters_index];
-          int narrow_band_index;
-          for (narrow_band_index = 0; narrow_band_index < num_narrow_bands; narrow_band_index++)
-          {
-              maxavailablenarrowband = CALLOC(1, sizeof(long));
-              *maxavailablenarrowband = configuration->max_available_narrow_band[CC_id][prach_parameters_index][narrow_band_index];
-              ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, maxavailablenarrowband);
-          }
-
-
-          prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
-          prach_parametersce_r13->prach_HoppingConfig_r13 = LTE_PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
-
+        prach_parametersce_r13 = CALLOC(1, sizeof(LTE_PRACH_ParametersCE_r13_t));
+        prach_parametersce_r13->prach_ConfigIndex_r13 = configuration->prach_config_index[CC_id][prach_parameters_index];
+        prach_parametersce_r13->prach_FreqOffset_r13 = configuration->prach_freq_offset[CC_id][prach_parameters_index];
+        AssertFatal(configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index]!=NULL,
+                    "configuration->prach_StartingSubframe_r13[%d][%d] is null",
+                    (int)CC_id,(int)prach_parameters_index);
+
+        if (configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index]) {
+          prach_parametersce_r13->prach_StartingSubframe_r13 = CALLOC(1, sizeof(long));
+          *prach_parametersce_r13->prach_StartingSubframe_r13 = *configuration->prach_StartingSubframe_r13[CC_id][prach_parameters_index];
+        } else prach_parametersce_r13->prach_StartingSubframe_r13 = NULL;
+
+        if (configuration->maxNumPreambleAttemptCE_r13[CC_id][prach_parameters_index]) {
+          prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = CALLOC(1, sizeof(long));
+          *prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = *configuration->maxNumPreambleAttemptCE_r13[CC_id][prach_parameters_index];
+        } else prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = NULL;
+
+        prach_parametersce_r13->numRepetitionPerPreambleAttempt_r13 = configuration->numRepetitionPerPreambleAttempt_r13[CC_id][prach_parameters_index];
+        prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = configuration->mpdcch_NumRepetition_RA_r13[CC_id][prach_parameters_index];
+        prach_parametersce_r13->prach_HoppingConfig_r13 = configuration->prach_HoppingConfig_r13[CC_id][prach_parameters_index];
+        long *maxavailablenarrowband;
+        int num_narrow_bands = configuration->max_available_narrow_band_size[CC_id][prach_parameters_index];
+        int narrow_band_index;
+
+        for (narrow_band_index = 0; narrow_band_index < num_narrow_bands; narrow_band_index++) {
+          maxavailablenarrowband = CALLOC(1, sizeof(long));
+          *maxavailablenarrowband = configuration->max_available_narrow_band[CC_id][prach_parameters_index][narrow_band_index];
+          ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, maxavailablenarrowband);
+        }
 
-          ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13);
+        prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
+        prach_parametersce_r13->prach_HoppingConfig_r13 = LTE_PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
+        ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13);
       }
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = NULL;
-  
-
+    } else (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = NULL;
 
     (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
     memset((*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
     (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(LTE_N1PUCCH_AN_InfoList_r13_t));
-
     int num_pucch_info_list = configuration->pucch_info_value_size[CC_id];
     int pucch_index;
     long *pucch_info_value;
+
     for (pucch_index = 0; pucch_index <  num_pucch_info_list; ++pucch_index) {
       pucch_info_value = CALLOC(1, sizeof(long));
+
       if (configuration->pucch_info_value_size[CC_id]) *pucch_info_value = configuration->pucch_info_value[CC_id][pucch_index];
       else                                             *pucch_info_value = 0;
-      
+
       ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, pucch_info_value);
     }
 
     if (configuration->pucch_NumRepetitionCE_Msg4_Level0_r13[CC_id]) {
       (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13  = CALLOC(1, sizeof(long));
       *(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 =  *configuration->pucch_NumRepetitionCE_Msg4_Level0_r13[CC_id];
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL;
+    } else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL;
 
     if (configuration->pucch_NumRepetitionCE_Msg4_Level1_r13[CC_id]) {
       (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13  = CALLOC(1, sizeof(long));
       *(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 =  *configuration->pucch_NumRepetitionCE_Msg4_Level1_r13[CC_id];
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL;
-  
+    } else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL;
 
     if (configuration->pucch_NumRepetitionCE_Msg4_Level2_r13[CC_id]) {
       (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13  = CALLOC(1, sizeof(long));
       *(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 =  *configuration->pucch_NumRepetitionCE_Msg4_Level2_r13[CC_id];
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL;
+    } else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL;
 
     if (configuration->pucch_NumRepetitionCE_Msg4_Level3_r13[CC_id]) {
       (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13  = CALLOC(1, sizeof(long));
       *(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 =  *configuration->pucch_NumRepetitionCE_Msg4_Level3_r13[CC_id];
-    }
-    else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL;
-
+    } else (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL;
   } // eMTC_configured>0
-  //-----------------------------------------------------------------------------------------------------------------------------------------
-
 
+  //-----------------------------------------------------------------------------------------------------------------------------------------
   // UE Timers and Constants
   (*sib2)->ue_TimersAndConstants.t300
     = rrconfig->ue_TimersAndConstants_t300;
@@ -1925,14 +1765,12 @@ uint8_t do_SIB23(uint8_t Mod_id,
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=
     LTE_RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4;
-
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct LTE_RACH_ConfigCommon__ext1));
   memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct LTE_RACH_ConfigCommon__ext1));
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t));
   *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = LTE_PreambleTransMax_n5; // to be re-initialized when we find the enum
   (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
   memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
-
   LTE_RACH_CE_LevelInfo_r13_t *rach_ce_levelinfo_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfo_r13_t));
   memset(rach_ce_levelinfo_r13, 0, sizeof(LTE_RACH_CE_LevelInfo_r13_t));
   rach_ce_levelinfo_r13->preambleMappingInfo_r13.firstPreamble_r13 = 0;
@@ -1940,12 +1778,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
   rach_ce_levelinfo_r13->ra_ResponseWindowSize_r13 = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80;
   rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200;
   rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = LTE_RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off;
-
   ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13);
- 
   // BCCH-Config
   (*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=LTE_BCCH_Config__modificationPeriodCoeff_n2;
-
   // PCCH-Config
   (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf128;
   (*sib2)->radioResourceConfigCommon.pcch_Config.nB=LTE_PCCH_Config__nB_oneT;
@@ -1985,7 +1820,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
   (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
   (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6;
   (*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1;
-
   (*sib2)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct LTE_RadioResourceConfigCommonSIB__ext4));
   memset((*sib2)->radioResourceConfigCommon.ext4, 0, sizeof(struct LTE_RadioResourceConfigCommonSIB__ext4));
   (*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(LTE_BCCH_Config_v1310_t));
@@ -1997,36 +1831,28 @@ uint8_t do_SIB23(uint8_t Mod_id,
   (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL;
   (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PRACH_ConfigSIB_v1310_t));
   memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t));
-
   LTE_RSRP_Range_t rsrp_range = 60;
   ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range);
-
   (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
   memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13));
   (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13;
   (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = LTE_PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13__fdd_r13_v5;
   (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL;
-
   LTE_PRACH_ParametersCE_r13_t *prach_parametersce_r13 = calloc(1, sizeof(LTE_PRACH_ParametersCE_r13_t));
   memset(prach_parametersce_r13, 0, sizeof(LTE_PRACH_ParametersCE_r13_t));
-
   prach_parametersce_r13->prach_ConfigIndex_r13 = 3;
   prach_parametersce_r13->prach_FreqOffset_r13 = 1;
   prach_parametersce_r13->prach_StartingSubframe_r13 = NULL;
   prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = calloc(1, sizeof(long));
   *prach_parametersce_r13->maxNumPreambleAttemptCE_r13 = LTE_PRACH_ParametersCE_r13__maxNumPreambleAttemptCE_r13_n3;
   prach_parametersce_r13->numRepetitionPerPreambleAttempt_r13 = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n1;
-
   long maxavailablenarrowband = 2;
   ASN_SEQUENCE_ADD(&prach_parametersce_r13->mpdcch_NarrowbandsToMonitor_r13.list, &maxavailablenarrowband);
-
   prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
   prach_parametersce_r13->prach_HoppingConfig_r13 = LTE_PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off;
   ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13);
-
   (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
   memset((*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(LTE_PUCCH_ConfigCommon_v1310_t));
-
   (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(LTE_N1PUCCH_AN_InfoList_r13_t));
   long pucch_info_value1 = 0;
   long pucch_info_value2 = 2;
@@ -2036,20 +1862,17 @@ uint8_t do_SIB23(uint8_t Mod_id,
   (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL;
   (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL;
   (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL;
-
   (*sib2)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000;
   (*sib2)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000;
   (*sib2)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000;
   (*sib2)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20;
   (*sib2)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000;
   (*sib2)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1;
-
 #endif
   (*sib2)->freqInfo.additionalSpectrumEmission = 1;
   (*sib2)->freqInfo.ul_CarrierFreq = NULL;
   (*sib2)->freqInfo.ul_Bandwidth = NULL;
   //  (*sib2)->mbsfn_SubframeConfigList = NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   if (configuration->eMBMS_configured > 0) {
     LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2\n");
@@ -2065,10 +1888,8 @@ uint8_t do_SIB23(uint8_t Mod_id,
     sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
     sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
     sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=0x38<<2;
-
     ASN_SEQUENCE_ADD(&MBSFNSubframeConfigList->list,sib2_mbsfn_SubframeConfig1);
 
-
     if (configuration->eMBMS_configured == 4 ) {
       LOG_I(RRC,"Adding MBSFN subframe Configuration 2 to SIB2\n");
       LTE_MBSFN_SubframeConfig_t *sib2_mbsfn_SubframeConfig2;
@@ -2081,25 +1902,18 @@ uint8_t do_SIB23(uint8_t Mod_id,
       sib2_mbsfn_SubframeConfig2->subframeAllocation.choice.oneFrame.size= 1;
       sib2_mbsfn_SubframeConfig2->subframeAllocation.choice.oneFrame.bits_unused= 2;
       sib2_mbsfn_SubframeConfig2->subframeAllocation.choice.oneFrame.buf[0]=0x07<<2;
-
       ASN_SEQUENCE_ADD(&MBSFNSubframeConfigList->list,sib2_mbsfn_SubframeConfig2);
     }
   }
 
-#else // no MBMS transmission
-  (*sib2)->mbsfn_SubframeConfigList = NULL;
-#endif
   (*sib2)->timeAlignmentTimerCommon=LTE_TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
   /// (*SIB3)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   (*sib3)->ext1 = NULL;
-#endif
   (*sib3)->cellReselectionInfoCommon.q_Hyst=LTE_SystemInformationBlockType3__cellReselectionInfoCommon__q_Hyst_dB4;
   (*sib3)->cellReselectionInfoCommon.speedStateReselectionPars=NULL;
   (*sib3)->cellReselectionServingFreqInfo.s_NonIntraSearch=NULL;
   (*sib3)->cellReselectionServingFreqInfo.threshServingLow=31;
   (*sib3)->cellReselectionServingFreqInfo.cellReselectionPriority=7;
-
   (*sib3)->intraFreqCellReselectionInfo.q_RxLevMin = -70;
   (*sib3)->intraFreqCellReselectionInfo.p_Max = NULL;
   (*sib3)->intraFreqCellReselectionInfo.s_IntraSearch = CALLOC(1,sizeof(*(*sib3)->intraFreqCellReselectionInfo.s_IntraSearch));
@@ -2113,12 +1927,10 @@ uint8_t do_SIB23(uint8_t Mod_id,
   (*sib3)->intraFreqCellReselectionInfo.neighCellConfig.bits_unused = 6;
   (*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA = 1;
   (*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA_SF = (struct LTE_SpeedStateScaleFactors *)NULL;
-
   (*sib3)->ext1 = CALLOC(1, sizeof(struct LTE_SystemInformationBlockType3__ext1));
   (*sib3)->ext1->s_IntraSearch_v920 = CALLOC(1, sizeof(struct LTE_SystemInformationBlockType3__ext1__s_IntraSearch_v920));
   (*sib3)->ext1->s_IntraSearch_v920->s_IntraSearchP_r9 = 31; // FIXME
   (*sib3)->ext1->s_IntraSearch_v920->s_IntraSearchQ_r9 = 4;
-
   (*sib3)->ext4 = CALLOC(1, sizeof(struct LTE_SystemInformationBlockType3__ext4));
   (*sib3)->ext4->cellSelectionInfoCE_r13 = CALLOC(1, sizeof(LTE_CellSelectionInfoCE_r13_t));
   (*sib3)->ext4->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = -70;
@@ -2128,8 +1940,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
 
   // SIB13
   // fill in all elements of SIB13 if present
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-
   if (configuration->eMBMS_configured > 0 ) {
     //  Notification for mcch change
     (*sib13)->notificationConfig_r9.notificationRepetitionCoeff_r9= LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
@@ -2175,8 +1985,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
     //  end of adding for MBMS SIB13
   }
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   if (configuration->SL_configured>0) {
     //TTN - for D2D
     // SIB18
@@ -2194,15 +2002,15 @@ uint8_t do_SIB23(uint8_t Mod_id,
     SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_Start_r12 = configuration->rxPool_ResourceConfig_prb_Start[CC_id];
     SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_End_r12 = configuration->rxPool_ResourceConfig_prb_End[CC_id];
     SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present = configuration->rxPool_ResourceConfig_offsetIndicator_present[CC_id];
-    
+
     if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == LTE_SL_OffsetIndicator_r12_PR_small_r12 ) {
       SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
     } else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == LTE_SL_OffsetIndicator_r12_PR_large_r12 ) {
       SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
     }
-    
+
     SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present = configuration->rxPool_ResourceConfig_subframeBitmap_present[CC_id];
-    
+
     if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == LTE_SubframeBitmapSL_r12_PR_bs4_r12) {
       //for BS4
       SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
@@ -2239,7 +2047,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
       SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf  = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
       SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
     }
-    
+
     //dataHoppingConfig_r12
     SL_CommResourcePool->dataHoppingConfig_r12.hoppingParameter_r12 = 0;
     SL_CommResourcePool->dataHoppingConfig_r12.numSubbands_r12  =  LTE_SL_HoppingConfigComm_r12__numSubbands_r12_ns1;
@@ -2300,15 +2108,15 @@ uint8_t do_SIB23(uint8_t Mod_id,
     SL_DiscResourcePool->tf_ResourceConfig_r12.prb_Start_r12 = configuration->discRxPool_ResourceConfig_prb_Start[CC_id];
     SL_DiscResourcePool->tf_ResourceConfig_r12.prb_End_r12 = configuration->discRxPool_ResourceConfig_prb_End[CC_id];
     SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present = configuration->discRxPool_ResourceConfig_offsetIndicator_present[CC_id];
-    
+
     if (SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present == LTE_SL_OffsetIndicator_r12_PR_small_r12 ) {
       SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->discRxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
     } else if (SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present == LTE_SL_OffsetIndicator_r12_PR_large_r12 ) {
       SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->discRxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
     }
-    
+
     SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present = configuration->discRxPool_ResourceConfig_subframeBitmap_present[CC_id];
-    
+
     if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == LTE_SubframeBitmapSL_r12_PR_bs4_r12) {
       //for BS4
       SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
@@ -2345,36 +2153,36 @@ uint8_t do_SIB23(uint8_t Mod_id,
       SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf  = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
       SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
     }
-    
+
     //add SL_DiscResourcePool to SL_DiscRxPoolList
     ASN_SEQUENCE_ADD(&SL_DiscRxPoolList->list,SL_DiscResourcePool);
     /*
     //for DiscRxPoolPS
     (*sib19)->ext1 = CALLOC (1, sizeof(*(*sib19)->ext1));
     (*sib19)->ext1->discConfigPS_13 = CALLOC (1, sizeof(*((*sib19)->ext1->discConfigPS_13)));
-    
+
     SL_DiscRxPoolPSList = &(*sib19)->ext1->discConfigPS_13->discRxPoolPS_r13;
     memset(SL_DiscRxPoolPSList,0,sizeof(*SL_DiscRxPoolPSList));
     //fill SL_DiscResourcePool
     SL_DiscResourcePoolPS = CALLOC(1, sizeof(*SL_DiscResourcePoolPS));
-    
+
     SL_DiscResourcePoolPS->cp_Len_r12 = configuration->discRxPoolPS_cp_Len[CC_id];
     SL_DiscResourcePoolPS->discPeriod_r12 = configuration->discRxPoolPS_discPeriod[CC_id];
     //sc_TF_ResourceConfig_r12
     SL_DiscResourcePoolPS->numRetx_r12 = configuration->discRxPoolPS_numRetx[CC_id];
     SL_DiscResourcePoolPS->numRepetition_r12 =  configuration->discRxPoolPS_numRepetition[CC_id];
-    
+
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_Num_r12 = configuration->discRxPoolPS_ResourceConfig_prb_Num[CC_id];
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_Start_r12 = configuration->discRxPoolPS_ResourceConfig_prb_Start[CC_id];
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_End_r12 = configuration->discRxPoolPS_ResourceConfig_prb_End[CC_id];
-    
+
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_present[CC_id];
     if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) {
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_choice[CC_id] ;
     } else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_choice[CC_id] ;
     }
-    
+
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_present[CC_id];
     if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs4_r12){
     //for BS4
@@ -2412,7 +2220,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf  = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
     SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
     }
-    
+
     //add SL_DiscResourcePool to SL_DiscRxPoolList
     ASN_SEQUENCE_ADD(&SL_DiscRxPoolPSList->list,SL_DiscResourcePoolPS);
     */
@@ -2453,14 +2261,13 @@ uint8_t do_SIB23(uint8_t Mod_id,
     ASN_SEQUENCE_ADD(&SL_CommRxPoolListV2X->list,SL_CommResourcePoolV2X);
     //end SIB21
   }
-#endif
+
   bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_PR_c1;
   bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
   /*  memcpy((void*)&bcch_message.message.choice.c1.choice.systemInformation,
    (void*)systemInformation,
    sizeof(SystemInformation_t));*/
   bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = LTE_SystemInformation__criticalExtensions_PR_systemInformation_r8;
-
   bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
   //  asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0;
   //  systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
@@ -2468,14 +2275,11 @@ uint8_t do_SIB23(uint8_t Mod_id,
                    sib2_part);
   ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
                    sib3_part);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
   if (configuration->eMBMS_configured > 0) {
     ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib13_part);
   }
 
-#endif
-
   if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
     xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message, (void *)bcch_message);
   }
@@ -2487,7 +2291,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
                                    900);
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
                enc_rval.failed_type->name, enc_rval.encoded);
-
   LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
 
   if (enc_rval.encoded==-1) {
@@ -2699,7 +2502,6 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer,  LTE_SL_Destin
 }
 
 uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS) {
-
   asn_enc_rval_t enc_rval;
   LTE_UL_DCCH_Message_t ul_dcch_msg;
   LTE_RRCConnectionSetupComplete_t *rrcConnectionSetupComplete;
@@ -2804,11 +2606,6 @@ do_RRCConnectionSetup(
   struct LTE_SRB_ToAddMod__rlc_Config *SRB1_rlc_config = NULL;
   struct LTE_SRB_ToAddMod__logicalChannelConfig *SRB1_lchan_config = NULL;
   struct LTE_LogicalChannelConfig__ul_SpecificParameters *SRB1_ul_SpecificParameters = NULL;
-#ifdef CBA
-  struct LTE_PUSCH_CBAConfigDedicated_vlola  *pusch_CBAConfigDedicated_vlola = NULL;
-  long *betaOffset_CBA_Index = NULL;
-  long *cShift_CBA = NULL;
-#endif
   LTE_PhysicalConfigDedicated_t *physicalConfigDedicated2 = NULL;
   LTE_DL_CCCH_Message_t dl_ccch_msg;
   LTE_RRCConnectionSetup_t *rrcConnectionSetup = NULL;
@@ -2936,19 +2733,11 @@ do_RRCConnectionSetup(
   physicalConfigDedicated2->tpc_PDCCH_ConfigPUSCH->choice.setup.tpc_RNTI.buf[0]=0x22;
   physicalConfigDedicated2->tpc_PDCCH_ConfigPUSCH->choice.setup.tpc_RNTI.buf[1]=0x34+ue_context_pP->local_uid;
   physicalConfigDedicated2->tpc_PDCCH_ConfigPUSCH->choice.setup.tpc_RNTI.bits_unused=0;
-
   /* CQI ReportConfig */
   // Aperiodic configuration
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic = CALLOC(1, sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic));
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic = LTE_CQI_ReportModeAperiodic_rm30; // HLC CQI, no PMI
-#else
-  *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic = LTE_CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI
-#endif
-
   physicalConfigDedicated2->cqi_ReportConfig->nomPDSCH_RS_EPRE_Offset = 0; // 0 dB (int -1...6)
-
   // Periodic configuration
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic = CALLOC(1, sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic));
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = LTE_CQI_ReportPeriodic_PR_release;
@@ -3015,7 +2804,6 @@ do_RRCConnectionSetup(
   physicalConfigDedicated2->antennaInfo->present = LTE_PhysicalConfigDedicated__antennaInfo_PR_explicitValue;
   //assign_enum(&physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode,
   //     AntennaInfoDedicated__transmissionMode_tm2);
-
   LOG_D(RRC,"physicalConfigDedicated2 %p, physicalConfigDedicated2->antennaInfo %p => %d\n",physicalConfigDedicated2,physicalConfigDedicated2->antennaInfo,transmission_mode);
 
   switch (transmission_mode) {
@@ -3132,33 +2920,29 @@ do_RRCConnectionSetup(
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2;
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = CALLOC(1,sizeof(struct LTE_RadioResourceConfigDedicated__mac_MainConfig));
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->present = LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
-
   /* MAC MainConfig */
   mac_MainConfig = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->choice.explicitValue;
-
   //* ul_SCH_Config *//
   mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
   long *maxHARQ_Tx = CALLOC(1, sizeof(long));
   *maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
   long *periodicBSR_Timer = CALLOC(1, sizeof(long));
   *periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64; // LTE_PeriodicBSR_Timer_r12_infinity
-
   mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx; // max number of UL HARQ transmission
   mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
   mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120  // regular BSR timer
   mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
-
   //* timeAlignmentTimerDedicated *//
   mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
-
   //* DRX Config *//
   mac_MainConfig->drx_Config = NULL;
-
   //* PHR Config *//
   mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
   mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
-  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
-  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
+  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
+  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;  // Value dB1 =1 dB, dB3 = 3 dB
 
   if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
@@ -3179,44 +2963,29 @@ do_RRCConnectionSetup(
 
   LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes) \n",
         enc_rval.encoded,(enc_rval.encoded+7)/8);
-
   return((enc_rval.encoded+7)/8);
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 uint8_t do_RRCConnectionSetup_BR(
-				 const protocol_ctxt_t*     const ctxt_pP,
-				 rrc_eNB_ue_context_t*      const ue_context_pP,
-				 int                              CC_id,
-				 uint8_t*                   const buffer,
-				 const uint8_t                    transmission_mode,
-				 const uint8_t                    Transaction_id,
-				 LTE_SRB_ToAddModList_t             **SRB_configList,
-				 struct LTE_PhysicalConfigDedicated **physicalConfigDedicated)
-{
-
+  const protocol_ctxt_t     *const ctxt_pP,
+  rrc_eNB_ue_context_t      *const ue_context_pP,
+  int                              CC_id,
+  uint8_t                   *const buffer,
+  const uint8_t                    transmission_mode,
+  const uint8_t                    Transaction_id,
+  LTE_SRB_ToAddModList_t             **SRB_configList,
+  struct LTE_PhysicalConfigDedicated **physicalConfigDedicated) {
   asn_enc_rval_t enc_rval;
   eNB_RRC_INST *rrc               = RC.rrc[ctxt_pP->module_id];
   rrc_eNB_carrier_data_t *carrier = &rrc->carrier[CC_id];
-
-  long* logicalchannelgroup = NULL;
-  struct LTE_SRB_ToAddMod* SRB1_config = NULL;
-  struct LTE_SRB_ToAddMod__rlc_Config* SRB1_rlc_config = NULL;
-  struct LTE_SRB_ToAddMod__logicalChannelConfig* SRB1_lchan_config = NULL;
-  struct LTE_LogicalChannelConfig__ul_SpecificParameters* SRB1_ul_SpecificParameters = NULL;
-
-#ifdef CBA
-  struct PUSCH_CBAConfigDedicated_vlola*  pusch_CBAConfigDedicated_vlola = NULL;
-  long* betaOffset_CBA_Index = NULL;
-  long* cShift_CBA = NULL;
-#endif
-  LTE_PhysicalConfigDedicated_t* physicalConfigDedicated2 = NULL;
-
+  long *logicalchannelgroup = NULL;
+  struct LTE_SRB_ToAddMod *SRB1_config = NULL;
+  struct LTE_SRB_ToAddMod__rlc_Config *SRB1_rlc_config = NULL;
+  struct LTE_SRB_ToAddMod__logicalChannelConfig *SRB1_lchan_config = NULL;
+  struct LTE_LogicalChannelConfig__ul_SpecificParameters *SRB1_ul_SpecificParameters = NULL;
+  LTE_PhysicalConfigDedicated_t *physicalConfigDedicated2 = NULL;
   LTE_DL_CCCH_Message_t dl_ccch_msg;
-
-  LTE_RRCConnectionSetup_t* rrcConnectionSetup = NULL;
-
+  LTE_RRCConnectionSetup_t *rrcConnectionSetup = NULL;
   memset((void *)&dl_ccch_msg,0,sizeof(LTE_DL_CCCH_Message_t));
   dl_ccch_msg.message.present           = LTE_DL_CCCH_MessageType_PR_c1;
   dl_ccch_msg.message.choice.c1.present = LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup;
@@ -3231,14 +3000,11 @@ uint8_t do_RRCConnectionSetup_BR(
   }
 
   *SRB_configList = CALLOC(1,sizeof(LTE_SRB_ToAddModList_t));
-
   /// SRB1
   SRB1_config = CALLOC(1,sizeof(*SRB1_config));
-
   SRB1_config->srb_Identity = 1;
   SRB1_rlc_config = CALLOC(1, sizeof(*SRB1_rlc_config));
   SRB1_config->rlc_Config  = SRB1_rlc_config; // check this
-
   SRB1_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
   SRB1_rlc_config->choice.explicitValue.present = LTE_RLC_Config_PR_am;
 #if defined(ENABLE_ITTI)
@@ -3253,58 +3019,41 @@ uint8_t do_RRCConnectionSetup_BR(
   SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU          = LTE_PollPDU_p4; // FIXME should be infinity
   SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte         = LTE_PollByte_kBinfinity;
   SRB1_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t8;
-
   SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering     = LTE_T_Reordering_ms35;
   SRB1_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
 #endif
-
   SRB1_lchan_config = CALLOC(1, sizeof(*SRB1_lchan_config));
   SRB1_config->logicalChannelConfig = SRB1_lchan_config;
-
   SRB1_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
   SRB1_ul_SpecificParameters = CALLOC(1, sizeof(*SRB1_ul_SpecificParameters));
-
   SRB1_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB1_ul_SpecificParameters;
-
   SRB1_ul_SpecificParameters->priority = 1;
-
   //assign_enum(&SRB1_ul_SpecificParameters->prioritisedBitRate,LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity);
   SRB1_ul_SpecificParameters->prioritisedBitRate=LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
-
   //assign_enum(&SRB1_ul_SpecificParameters->bucketSizeDuration,LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50);
   SRB1_ul_SpecificParameters->bucketSizeDuration=LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
-
   logicalchannelgroup = CALLOC(1,sizeof(long));
   *logicalchannelgroup=0;
   SRB1_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
-
-
   ASN_SEQUENCE_ADD(&(*SRB_configList)->list,SRB1_config);
-
   // PhysicalConfigDedicated
-
   physicalConfigDedicated2 = CALLOC(1,sizeof(*physicalConfigDedicated2));
   *physicalConfigDedicated = physicalConfigDedicated2;
-
   physicalConfigDedicated2->pdsch_ConfigDedicated         = CALLOC(1,sizeof(*physicalConfigDedicated2->pdsch_ConfigDedicated));
   physicalConfigDedicated2->pucch_ConfigDedicated         = CALLOC(1,sizeof(*physicalConfigDedicated2->pucch_ConfigDedicated));
-
   physicalConfigDedicated2->pusch_ConfigDedicated         = CALLOC(1,sizeof(*physicalConfigDedicated2->pusch_ConfigDedicated));;
   physicalConfigDedicated2->tpc_PDCCH_ConfigPUCCH         = NULL;
   physicalConfigDedicated2->tpc_PDCCH_ConfigPUSCH         = NULL;
-
   physicalConfigDedicated2->uplinkPowerControlDedicated   = CALLOC(1,sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated));
   physicalConfigDedicated2->cqi_ReportConfig              = CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig));
 
   if (rrc->srs_enable[CC_id])
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated = CALLOC(1,sizeof(*physicalConfigDedicated2->soundingRS_UL_ConfigDedicated));
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated = CALLOC(1,sizeof(*physicalConfigDedicated2->soundingRS_UL_ConfigDedicated));
   else
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated = NULL;
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated = NULL;
+
   physicalConfigDedicated2->antennaInfo                   = CALLOC(1,sizeof(*physicalConfigDedicated2->antennaInfo));
   physicalConfigDedicated2->schedulingRequestConfig       = CALLOC(1,sizeof(*physicalConfigDedicated2->schedulingRequestConfig));
-#ifdef CBA
-  physicalConfigDedicated2->pusch_CBAConfigDedicated_vlola = CALLOC(1,sizeof(*physicalConfigDedicated2->pusch_CBAConfigDedicated_vlola));
-#endif
 
   if (carrier->p_eNB==2)
     physicalConfigDedicated2->pdsch_ConfigDedicated->p_a = LTE_PDSCH_ConfigDedicated__p_a_dB_3;
@@ -3314,7 +3063,6 @@ uint8_t do_RRCConnectionSetup_BR(
   // PUCCH
   physicalConfigDedicated2->pucch_ConfigDedicated->ackNackRepetition.present=LTE_PUCCH_ConfigDedicated__ackNackRepetition_PR_release;
   physicalConfigDedicated2->pucch_ConfigDedicated->ackNackRepetition.choice.release=0;
-
   // PUSCH
   physicalConfigDedicated2->pusch_ConfigDedicated->betaOffset_ACK_Index = 10;
   physicalConfigDedicated2->pusch_ConfigDedicated->betaOffset_RI_Index = 9;
@@ -3322,7 +3070,6 @@ uint8_t do_RRCConnectionSetup_BR(
 
   //
 
-
   if (carrier->sib1->tdd_Config == NULL) {
     physicalConfigDedicated2->pucch_ConfigDedicated->tdd_AckNackFeedbackMode=NULL;//PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing;
   } else { //TDD
@@ -3341,12 +3088,10 @@ uint8_t do_RRCConnectionSetup_BR(
   physicalConfigDedicated2->uplinkPowerControlDedicated->p0_UE_PUCCH = 0; // 0 dB
   physicalConfigDedicated2->uplinkPowerControlDedicated->pSRS_Offset = 0; // 0 dB
   physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient = CALLOC(1,
-										    sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient));
+      sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient));
   //  assign_enum(physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient,FilterCoefficient_fc4); // fc4 dB
   *physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient=LTE_FilterCoefficient_fc4; // fc4 dB
-
   // TPC-PDCCH-Config
-
   // CQI ReportConfig
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic = CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic));
   *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic = LTE_CQI_ReportModeAperiodic_rm20;
@@ -3355,49 +3100,52 @@ uint8_t do_RRCConnectionSetup_BR(
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = LTE_CQI_ReportPeriodic_PR_release;
   physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.release = (NULL_t)0;
 
-    
   /// TODO to be reviewed
   if (rrc->srs_enable[CC_id]) {
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->present = LTE_SoundingRS_UL_ConfigDedicated_PR_setup;
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth =
-              LTE_SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0;
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth =
-              LTE_SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0;
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0;
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1;
-      if (carrier->sib1->tdd_Config==NULL) { // FDD
-          if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
-                  == LTE_SoundingRS_UL_ConfigCommon_PR_setup)
-              if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0)
-                  LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n",
-                        (int)carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig);
-          if (ue_context_pP->local_uid >=20)
-              LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
-                    ue_context_pP->local_uid);
-          //the current code will allow for 20 UEs - to be revised for more
-          physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=7+ue_context_pP->local_uid/2;
-          physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
-      }
-      else {
-          if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
-                  == LTE_SoundingRS_UL_ConfigCommon_PR_setup)
-              if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) {
-                  LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n",
-                        (int)carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig,
-                        (int)carrier->sib1->tdd_Config->subframeAssignment);
-              }
-          if (ue_context_pP->local_uid >=6)
-              LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
-                    ue_context_pP->local_uid);
-          physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2;
-          physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
-      }
-      LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid,
-            (int)physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,
-            (int)physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb);
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->present = LTE_SoundingRS_UL_ConfigDedicated_PR_setup;
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth =
+      LTE_SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0;
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth =
+      LTE_SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0;
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0;
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1;
+
+    if (carrier->sib1->tdd_Config==NULL) { // FDD
+      if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
+          == LTE_SoundingRS_UL_ConfigCommon_PR_setup)
+        if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0)
+          LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n",
+                (int)carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig);
+
+      if (ue_context_pP->local_uid >=20)
+        LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
+              ue_context_pP->local_uid);
+
+      //the current code will allow for 20 UEs - to be revised for more
+      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=7+ue_context_pP->local_uid/2;
+      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
+    } else {
+      if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
+          == LTE_SoundingRS_UL_ConfigCommon_PR_setup)
+        if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) {
+          LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n",
+                (int)carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig,
+                (int)carrier->sib1->tdd_Config->subframeAssignment);
+        }
+
+      if (ue_context_pP->local_uid >=6)
+        LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
+              ue_context_pP->local_uid);
+
+      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2;
+      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
+    }
 
-      physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift=
-              LTE_SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0;
+    LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid,
+          (int)physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,
+          (int)physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb);
+    physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift=
+      LTE_SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0;
   }
 
   //AntennaInfoDedicated
@@ -3405,53 +3153,51 @@ uint8_t do_RRCConnectionSetup_BR(
   physicalConfigDedicated2->antennaInfo->present = LTE_PhysicalConfigDedicated__antennaInfo_PR_explicitValue;
 
   switch (transmission_mode) {
-  default:
-    LOG_W(RRC,"At RRCConnectionSetup Transmission mode can only take values 1 or 2! Defaulting to 1!\n");
-  case 1:
-    physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     LTE_AntennaInfoDedicated__transmissionMode_tm1;
-    break;
-
-  case 2:
-    physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     LTE_AntennaInfoDedicated__transmissionMode_tm2;
-    break;
-    /*
-      case 3:
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm3;
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     CALLOC(1,
-      sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction));
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-      AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
+    default:
+      LOG_W(RRC,"At RRCConnectionSetup Transmission mode can only take values 1 or 2! Defaulting to 1!\n");
 
+    case 1:
+      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     LTE_AntennaInfoDedicated__transmissionMode_tm1;
       break;
 
-      case 4:
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm4;
+    case 2:
+      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     LTE_AntennaInfoDedicated__transmissionMode_tm2;
       break;
+      /*
+        case 3:
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm3;
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     CALLOC(1,
+        sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction));
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+        AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
 
-      case 5:
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm5;
-      break;
+        break;
 
-      case 6:
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm6;
-      break;
+        case 4:
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm4;
+        break;
 
-      case 7:
-      physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm7;
-      break;
-    */
-  }
+        case 5:
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm5;
+        break;
 
+        case 6:
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm6;
+        break;
+
+        case 7:
+        physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode=     AntennaInfoDedicated__transmissionMode_tm7;
+        break;
+      */
+  }
 
   physicalConfigDedicated2->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.present = LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection_PR_release;
   physicalConfigDedicated2->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.release = 0;
-
   // SchedulingRequestConfig
-
   physicalConfigDedicated2->schedulingRequestConfig->present = LTE_SchedulingRequestConfig_PR_setup;
   physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex = 18;//ue_context_pP->local_uid;
 
@@ -3459,44 +3205,39 @@ uint8_t do_RRCConnectionSetup_BR(
     physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 76+(ue_context_pP->local_uid%10);  // Isr = 76 (every 80 subframes, offset=2+UE_id mod3)
   } else {
     switch (carrier->sib1->tdd_Config->subframeAssignment) {
-    case 1:
-      physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+((
-															ue_context_pP->local_uid&3)>>1)*5;  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..)
-      break;
+      case 1:
+        physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+((
+              ue_context_pP->local_uid&3)>>1)*5;  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..)
+        break;
 
-    case 3:
-      physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+
-	(ue_context_pP->local_uid%3);  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..)
-      break;
+      case 3:
+        physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+
+            (ue_context_pP->local_uid%3);  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..)
+        break;
 
-    case 4:
-      physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+
-	(ue_context_pP->local_uid&1);  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..)
-      break;
+      case 4:
+        physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+
+            (ue_context_pP->local_uid&1);  // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..)
+        break;
 
-    default:
-      physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7;  // Isr = 5 (every 10 subframes, offset=2 for all UE0 etc..)
-      break;
+      default:
+        physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7;  // Isr = 5 (every 10 subframes, offset=2 for all UE0 etc..)
+        break;
     }
   }
 
-
   physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = LTE_SchedulingRequestConfig__setup__dsr_TransMax_n16;
-
   physicalConfigDedicated2->ext4 =  calloc(1, sizeof(struct LTE_PhysicalConfigDedicated__ext4) );
   physicalConfigDedicated2->ext4->csi_RS_ConfigNZPToReleaseList_r11 = NULL;
   physicalConfigDedicated2->ext4->csi_RS_ConfigNZPToAddModList_r11 = NULL;
   physicalConfigDedicated2->ext4->csi_RS_ConfigZPToAddModList_r11 = NULL;
   physicalConfigDedicated2->ext4->csi_RS_ConfigZPToReleaseList_r11 = NULL;
-
   physicalConfigDedicated2->ext4->epdcch_Config_r11 = calloc(1, sizeof(struct LTE_EPDCCH_Config_r11 ));
   physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.present = LTE_EPDCCH_Config_r11__config_r11_PR_setup;
   physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.subframePatternConfig_r11 = NULL;
   physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 = calloc(1,sizeof(long));
   *physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 = 2;
   physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToReleaseList_r11 = NULL;
-
-
   physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = calloc(1, sizeof(LTE_EPDCCH_SetConfigToAddModList_r11_t));
   //  memset(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, 0, sizeof())
   LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(1, sizeof(LTE_EPDCCH_SetConfig_r11_t));
@@ -3508,11 +3249,9 @@ uint8_t do_RRCConnectionSetup_BR(
   epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.size = 5;
   epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.bits_unused = 2;
   memset(epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf, 0, 5 * sizeof(uint8_t));
-
   epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11 = 54;
   epdcch_setconfig_r11->pucch_ResourceStartOffset_r11 = 0;
   epdcch_setconfig_r11->re_MappingQCL_ConfigId_r11 = NULL;
-
   epdcch_setconfig_r11->ext2 = calloc(1, sizeof(struct LTE_EPDCCH_SetConfig_r11__ext2));
   epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 = calloc(1,sizeof(struct LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310));
   epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present =  LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup;
@@ -3526,35 +3265,24 @@ uint8_t do_RRCConnectionSetup_BR(
   epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_NumRepetition_r13               = LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_NumRepetition_r13_r1;
   epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13                  = 3; // note: this is narrowband index 2
   ASN_SEQUENCE_ADD(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, epdcch_setconfig_r11);
-
-
   // FIXME allocate physicalConfigDedicated2->ext7
   physicalConfigDedicated2->ext7 = CALLOC(1, sizeof(struct LTE_PhysicalConfigDedicated__ext7));
-
   physicalConfigDedicated2->ext7->pdsch_ConfigDedicated_v1310 = NULL; // has some parameters to be filled
-
   physicalConfigDedicated2->ext7->pusch_ConfigDedicated_r13 = NULL;
   physicalConfigDedicated2->ext7->pucch_ConfigDedicated_r13 = NULL;
-
   physicalConfigDedicated2->ext7->pdcch_CandidateReductions_r13 = NULL;
-
   physicalConfigDedicated2->ext7->cqi_ReportConfig_v1310 = NULL;
-
   physicalConfigDedicated2->ext7->soundingRS_UL_ConfigDedicated_v1310 = NULL;
   physicalConfigDedicated2->ext7->soundingRS_UL_ConfigDedicatedUpPTsExt_r13 = NULL;
   physicalConfigDedicated2->ext7->soundingRS_UL_ConfigDedicatedAperiodic_v1310 = NULL;
   physicalConfigDedicated2->ext7->soundingRS_UL_ConfigDedicatedAperiodicUpPTsExt_r13 = NULL;
-
   physicalConfigDedicated2->ext7->csi_RS_Config_v1310 = NULL;
-
   // FIXME ce_Mode_r13 allocation
   physicalConfigDedicated2->ext7->ce_Mode_r13 = CALLOC(1, sizeof(struct LTE_PhysicalConfigDedicated__ext7__ce_Mode_r13));
   physicalConfigDedicated2->ext7->ce_Mode_r13->present      = LTE_PhysicalConfigDedicated__ext7__ce_Mode_r13_PR_setup;
   physicalConfigDedicated2->ext7->ce_Mode_r13->choice.setup = LTE_PhysicalConfigDedicated__ext7__ce_Mode_r13__setup_ce_ModeA;
   physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToAddModListExt_r13 = NULL;
   physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL;
-
-
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = CALLOC(1,sizeof(struct LTE_RadioResourceConfigDedicated__mac_MainConfig));
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->present = LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
   LTE_MAC_MainConfig_t *mac_MainConfig = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->choice.explicitValue;
@@ -3574,8 +3302,6 @@ uint8_t do_RRCConnectionSetup_BR(
   mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3;  // Value dB1 =1 dB, dB3 = 3 dB
-
-
   rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id;
   rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1;
   rrcConnectionSetup->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ;
@@ -3585,18 +3311,16 @@ uint8_t do_RRCConnectionSetup_BR(
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL;
   rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2;
   // rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL;
-
 #ifdef XER_PRINT
-  xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
+  xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void *)&dl_ccch_msg);
 #endif
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message,
-				   NULL,
-				   (void*)&dl_ccch_msg,
-				   buffer,
-				   100);
+                                   NULL,
+                                   (void *)&dl_ccch_msg,
+                                   buffer,
+                                   100);
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
-	       enc_rval.failed_type->name, enc_rval.encoded);
-
+               enc_rval.failed_type->name, enc_rval.encoded);
 #if defined(ENABLE_ITTI)
 # if !defined(DISABLE_XER_SPRINT)
   {
@@ -3605,42 +3329,36 @@ uint8_t do_RRCConnectionSetup_BR(
 
     if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_CCCH_Message, (void *) &dl_ccch_msg)) > 0) {
       MessageDef *msg_p;
-
       msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
       msg_p->ittiMsg.rrc_dl_ccch.size = message_string_size;
       memcpy(&msg_p->ittiMsg.rrc_dl_ccch.text, message_string, message_string_size);
-
       itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
     }
   }
 # endif
 #endif
-
 #ifdef USER_MODE
   LOG_D(RRC,"RRCConnectionSetup_BR Encoded %d bits (%d bytes), ecause %d\n",
-	enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
+        enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
 #endif
-
   //  FREEMEM(SRB_list);
   //  free(SRB1_config);
   //  free(SRB1_rlc_config);
   //  free(SRB1_lchan_config);
   //  free(SRB1_ul_SpecificParameters);
-
   return((enc_rval.encoded+7)/8);
 }
-#endif
 
 
 
 
 uint8_t do_SecurityModeCommand(
-			       const protocol_ctxt_t *const ctxt_pP,
-			       uint8_t *const buffer,
-			       const uint8_t Transaction_id,
-			       const uint8_t cipheringAlgorithm,
-			       const uint8_t integrityProtAlgorithm
-			       )
+  const protocol_ctxt_t *const ctxt_pP,
+  uint8_t *const buffer,
+  const uint8_t Transaction_id,
+  const uint8_t cipheringAlgorithm,
+  const uint8_t integrityProtAlgorithm
+)
 //------------------------------------------------------------------------------
 {
   LTE_DL_DCCH_Message_t dl_dcch_msg;
@@ -3648,7 +3366,6 @@ uint8_t do_SecurityModeCommand(
   memset(&dl_dcch_msg,0,sizeof(LTE_DL_DCCH_Message_t));
   dl_dcch_msg.message.present           = LTE_DL_DCCH_MessageType_PR_c1;
   dl_dcch_msg.message.choice.c1.present = LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand;
-
   dl_dcch_msg.message.choice.c1.choice.securityModeCommand.rrc_TransactionIdentifier = Transaction_id;
   dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.present = LTE_SecurityModeCommand__criticalExtensions_PR_c1;
   dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.choice.c1.present =
@@ -3683,8 +3400,8 @@ uint8_t do_SecurityModeCommand(
 
   if (enc_rval.encoded==-1) {
     LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
-	  ctxt_pP->module_id,
-	  ctxt_pP->rnti);
+          ctxt_pP->module_id,
+          ctxt_pP->rnti);
     return(-1);
   }
 
@@ -3695,8 +3412,8 @@ uint8_t do_SecurityModeCommand(
 
 //------------------------------------------------------------------------------
 uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
-				uint8_t               *const buffer,
-				const uint8_t                Transaction_id)
+                                uint8_t               *const buffer,
+                                const uint8_t                Transaction_id)
 //------------------------------------------------------------------------------
 {
   LTE_DL_DCCH_Message_t dl_dcch_msg;
@@ -3711,7 +3428,7 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
     LTE_UECapabilityEnquiry__criticalExtensions__c1_PR_ueCapabilityEnquiry_r8;
   dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0;
   ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
-		   &rat);
+                   &rat);
 
   if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
     xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg);
@@ -3737,55 +3454,48 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
 
   if (enc_rval.encoded==-1) {
     LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n",
-	  ctxt_pP->module_id,
-	  ctxt_pP->rnti);
+          ctxt_pP->module_id,
+          ctxt_pP->rnti);
     return(-1);
   }
 
   return((enc_rval.encoded+7)/8);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t*        const ctxt_pP,
-					    uint8_t                            *buffer,
-					    uint8_t                             Transaction_id,
-					    LTE_SRB_ToAddModList_t                 *SRB_list,
-					    LTE_DRB_ToAddModList_t                 *DRB_list,
-					    LTE_DRB_ToReleaseList_t                *DRB_list2,
-					    struct LTE_SPS_Config                  *sps_Config,
-					    struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
-					    LTE_MeasObjectToAddModList_t           *MeasObj_list,
-					    LTE_ReportConfigToAddModList_t         *ReportConfig_list,
-					    LTE_QuantityConfig_t                   *quantityConfig,
-					    LTE_MeasIdToAddModList_t               *MeasId_list,
-					    LTE_MAC_MainConfig_t                   *mac_MainConfig,
-					    LTE_MeasGapConfig_t                    *measGapConfig,
-					    LTE_MobilityControlInfo_t              *mobilityInfo,
-					    struct LTE_MeasConfig__speedStatePars  *speedStatePars,
-					    LTE_RSRP_Range_t                       *rsrp,
-					    LTE_C_RNTI_t                           *cba_rnti,
-					    struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
-					    LTE_SCellToAddMod_r10_t  *SCell_config)
-{
-  asn_enc_rval_t enc_rval;
 
+uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t        *const ctxt_pP,
+    uint8_t                            *buffer,
+    uint8_t                             Transaction_id,
+    LTE_SRB_ToAddModList_t                 *SRB_list,
+    LTE_DRB_ToAddModList_t                 *DRB_list,
+    LTE_DRB_ToReleaseList_t                *DRB_list2,
+    struct LTE_SPS_Config                  *sps_Config,
+    struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
+    LTE_MeasObjectToAddModList_t           *MeasObj_list,
+    LTE_ReportConfigToAddModList_t         *ReportConfig_list,
+    LTE_QuantityConfig_t                   *quantityConfig,
+    LTE_MeasIdToAddModList_t               *MeasId_list,
+    LTE_MAC_MainConfig_t                   *mac_MainConfig,
+    LTE_MeasGapConfig_t                    *measGapConfig,
+    LTE_MobilityControlInfo_t              *mobilityInfo,
+    struct LTE_MeasConfig__speedStatePars  *speedStatePars,
+    LTE_RSRP_Range_t                       *rsrp,
+    LTE_C_RNTI_t                           *cba_rnti,
+    struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
+    LTE_SCellToAddMod_r10_t  *SCell_config) {
+  asn_enc_rval_t enc_rval;
   LTE_DL_DCCH_Message_t dl_dcch_msg;
   LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration;
-
-
   memset(&dl_dcch_msg,0,sizeof(LTE_DL_DCCH_Message_t));
-
   dl_dcch_msg.message.present           = LTE_DL_DCCH_MessageType_PR_c1;
   dl_dcch_msg.message.choice.c1.present = LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration;
   rrcConnectionReconfiguration          = &dl_dcch_msg.message.choice.c1.choice.rrcConnectionReconfiguration;
-
   // RRCConnectionReconfiguration
   rrcConnectionReconfiguration->rrc_TransactionIdentifier = Transaction_id;
   rrcConnectionReconfiguration->criticalExtensions.present = LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.present =LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ;
-
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1,
-																	  sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated));
+      sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated));
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = SRB_list;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = DRB_list;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = DRB_list2;
@@ -3798,41 +3508,40 @@ uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t*        const
 
   if (mac_MainConfig!=NULL) {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1,
-																			    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig));
+        sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig));
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present
       =LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
     memcpy(&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue,
-	   mac_MainConfig,
-	   sizeof(*mac_MainConfig));
+           mac_MainConfig,
+           sizeof(*mac_MainConfig));
   } else {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig=NULL;
   }
 
   if (MeasId_list != NULL) {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig           = CALLOC(1,
-																    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
-    memset((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig,
-	   0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
-
+        sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
+    memset((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig,
+           0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList       = MeasId_list;
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList   = MeasObj_list;
 
     if (quantityConfig!=NULL) {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = CALLOC(1,
-																	    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
+          sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
       memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig,
-	     (void *)quantityConfig,
-	     sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
+             (void *)quantityConfig,
+             sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
     } else {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = NULL;
     }
 
     if(speedStatePars != NULL) {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = CALLOC(1,
-																	    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars));
+          sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars));
       memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars,
-	     (void *)speedStatePars,sizeof(*speedStatePars));
+             (void *)speedStatePars,sizeof(*speedStatePars));
     } else {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = NULL;
     }
@@ -3844,29 +3553,25 @@ uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t*        const
 
   if (mobilityInfo !=NULL) {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = CALLOC(1,
-																   sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo));
-    memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo, (void*)mobilityInfo,
-	   sizeof(LTE_MobilityControlInfo_t));
-
+        sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo));
+    memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo, (void *)mobilityInfo,
+           sizeof(LTE_MobilityControlInfo_t));
   } else {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo  = NULL;
   }
 
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO     = NULL;
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message,
-				   NULL,
-				   (void*)&dl_dcch_msg,
-				   buffer,
-				   RRC_BUF_SIZE);
+                                   NULL,
+                                   (void *)&dl_dcch_msg,
+                                   buffer,
+                                   RRC_BUF_SIZE);
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed %s, %lu!\n",
-	       enc_rval.failed_type->name, enc_rval.encoded);
-
+               enc_rval.failed_type->name, enc_rval.encoded);
 #ifdef XER_PRINT
-  xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg);
+  xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void *)&dl_dcch_msg);
 #endif
-
 #if defined(ENABLE_ITTI)
 # if !defined(DISABLE_XER_SPRINT)
   {
@@ -3875,55 +3580,47 @@ uint16_t do_RRCConnectionReconfiguration_BR(const protocol_ctxt_t*        const
 
     if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_DCCH_Message, (void *) &dl_dcch_msg)) > 0) {
       MessageDef *msg_p;
-
       msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
       msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size;
       memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size);
-
       itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
     }
   }
 # endif
 #endif
-
-
   LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",(int)enc_rval.encoded,(int)(enc_rval.encoded+7)/8);
-
   return((enc_rval.encoded+7)/8);
 }
-#endif
 
 //------------------------------------------------------------------------------
 /*
  * Copy the different Information Elements in the RRC structure
  */
 uint16_t do_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
-					 uint8_t                                *buffer,
-					 uint8_t                                 Transaction_id,
-					 LTE_SRB_ToAddModList_t                 *SRB_list,
-					 LTE_DRB_ToAddModList_t                 *DRB_list,
-					 LTE_DRB_ToReleaseList_t                *DRB_list2,
-					 struct LTE_SPS_Config                  *sps_Config,
-					 struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
-					 LTE_MeasObjectToAddModList_t           *MeasObj_list,
-					 LTE_ReportConfigToAddModList_t         *ReportConfig_list,
-					 LTE_QuantityConfig_t                   *quantityConfig,
-					 LTE_MeasIdToAddModList_t               *MeasId_list,
-					 LTE_MAC_MainConfig_t                   *mac_MainConfig,
-					 LTE_MeasGapConfig_t                    *measGapConfig,
-					 LTE_MobilityControlInfo_t              *mobilityInfo,
-                     LTE_SecurityConfigHO_t                 *securityConfigHO,
-					 struct LTE_MeasConfig__speedStatePars  *speedStatePars,
-					 LTE_RSRP_Range_t                       *rsrp,
-					 LTE_C_RNTI_t                           *cba_rnti,
-					 struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
-					 *dedicatedInfoNASList,
-					 LTE_SL_CommConfig_r12_t                *sl_CommConfig,
-					 LTE_SL_DiscConfig_r12_t                *sl_DiscConfig
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-					 , LTE_SCellToAddMod_r10_t              *SCell_config
-#endif
-					 )
+    uint8_t                                *buffer,
+    uint8_t                                 Transaction_id,
+    LTE_SRB_ToAddModList_t                 *SRB_list,
+    LTE_DRB_ToAddModList_t                 *DRB_list,
+    LTE_DRB_ToReleaseList_t                *DRB_list2,
+    struct LTE_SPS_Config                  *sps_Config,
+    struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
+    LTE_MeasObjectToAddModList_t           *MeasObj_list,
+    LTE_ReportConfigToAddModList_t         *ReportConfig_list,
+    LTE_QuantityConfig_t                   *quantityConfig,
+    LTE_MeasIdToAddModList_t               *MeasId_list,
+    LTE_MAC_MainConfig_t                   *mac_MainConfig,
+    LTE_MeasGapConfig_t                    *measGapConfig,
+    LTE_MobilityControlInfo_t              *mobilityInfo,
+    LTE_SecurityConfigHO_t                 *securityConfigHO,
+    struct LTE_MeasConfig__speedStatePars  *speedStatePars,
+    LTE_RSRP_Range_t                       *rsrp,
+    LTE_C_RNTI_t                           *cba_rnti,
+    struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
+    *dedicatedInfoNASList,
+    LTE_SL_CommConfig_r12_t                *sl_CommConfig,
+    LTE_SL_DiscConfig_r12_t                *sl_DiscConfig,
+    LTE_SCellToAddMod_r10_t              *SCell_config
+                                        )
 //------------------------------------------------------------------------------
 {
   asn_enc_rval_t enc_rval;
@@ -3933,30 +3630,26 @@ uint16_t do_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
   dl_dcch_msg.message.present           = LTE_DL_DCCH_MessageType_PR_c1;
   dl_dcch_msg.message.choice.c1.present = LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration;
   rrcConnectionReconfiguration          = &dl_dcch_msg.message.choice.c1.choice.rrcConnectionReconfiguration;
-  
   /* RRC Connection Reconfiguration */
   rrcConnectionReconfiguration->rrc_TransactionIdentifier = Transaction_id;
   rrcConnectionReconfiguration->criticalExtensions.present = LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.present = LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1,
-																	  sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated));
+      sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated));
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = SRB_list;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = DRB_list;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = DRB_list2;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->sps_Config = sps_Config;
   rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->physicalConfigDedicated = physicalConfigDedicated;
-#ifdef CBA
-  rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->cba_RNTI_vlola= cba_rnti;
-#endif
 
   if (mac_MainConfig!=NULL) {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1,
-																			    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig));
+        sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig));
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present
       =LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
     memcpy(&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue,
-	   mac_MainConfig,
-	   sizeof(*mac_MainConfig));
+           mac_MainConfig,
+           sizeof(*mac_MainConfig));
   } else {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig=NULL;
   }
@@ -3966,26 +3659,25 @@ uint16_t do_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
         sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
     memset((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig,
            0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
-
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList       = MeasId_list;
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList   = MeasObj_list;
 
     if (quantityConfig!=NULL) {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = CALLOC(1,
-																	    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
+          sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
       memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig,
-	     (void *)quantityConfig,
-	     sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
+             (void *)quantityConfig,
+             sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig));
     } else {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = NULL;
     }
 
     if(speedStatePars != NULL) {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = CALLOC(1,
-																	    sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars));
+          sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars));
       memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars,
-	     (void *)speedStatePars,sizeof(*speedStatePars));
+             (void *)speedStatePars,sizeof(*speedStatePars));
     } else {
       rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = NULL;
     }
@@ -4007,7 +3699,7 @@ uint16_t do_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
   if (securityConfigHO != NULL) {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO     = CALLOC(1,
         sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO));
-    memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO, (void*)securityConfigHO,
+    memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO, (void *)securityConfigHO,
            sizeof(LTE_SecurityConfigHO_t));
   } else {
     rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO     = NULL;
@@ -4104,11 +3796,6 @@ do_RRCConnectionReestablishment(
   struct LTE_SRB_ToAddMod__logicalChannelConfig *SRB1_lchan_config = NULL;
   struct LTE_LogicalChannelConfig__ul_SpecificParameters *SRB1_ul_SpecificParameters = NULL;
   eNB_RRC_INST *rrc               = RC.rrc[ctxt_pP->module_id];
-#ifdef CBA
-  struct LTE_PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola = NULL;
-  long *betaOffset_CBA_Index = NULL;
-  long *cShift_CBA = NULL;
-#endif
   LTE_PhysicalConfigDedicated_t *physicalConfigDedicated2 = NULL;
   LTE_DL_CCCH_Message_t dl_ccch_msg;
   LTE_RRCConnectionReestablishment_t *rrcConnectionReestablishment = NULL;
@@ -4260,7 +3947,7 @@ do_RRCConnectionReestablishment(
 
 //------------------------------------------------------------------------------
 uint8_t do_RRCConnectionReestablishmentReject(uint8_t                    Mod_id,
-					      uint8_t                   *const buffer)
+    uint8_t                   *const buffer)
 //------------------------------------------------------------------------------
 {
   asn_enc_rval_t enc_rval;
@@ -4296,7 +3983,7 @@ uint8_t do_RRCConnectionReestablishmentReject(uint8_t                    Mod_id,
 
 //------------------------------------------------------------------------------
 uint8_t do_RRCConnectionReject(uint8_t                    Mod_id,
-			       uint8_t                   *const buffer)
+                               uint8_t                   *const buffer)
 //------------------------------------------------------------------------------
 {
   asn_enc_rval_t enc_rval;
@@ -4334,9 +4021,8 @@ uint8_t do_RRCConnectionReject(uint8_t                    Mod_id,
 }
 
 uint8_t do_RRCConnectionRelease(uint8_t                             Mod_id,
-				uint8_t                            *buffer,
-				uint8_t                             Transaction_id)
-{
+                                uint8_t                            *buffer,
+                                uint8_t                             Transaction_id) {
   asn_enc_rval_t enc_rval;
   LTE_DL_DCCH_Message_t dl_dcch_msg;
   LTE_RRCConnectionRelease_t *rrcConnectionRelease;
@@ -4353,7 +4039,6 @@ uint8_t do_RRCConnectionRelease(uint8_t                             Mod_id,
   rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.idleModeMobilityControlInfo = NULL;
   rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension=CALLOC(1,
       sizeof(*rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension));
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message,
                                    NULL,
                                    (void *)&dl_dcch_msg,
@@ -4365,7 +4050,6 @@ uint8_t do_RRCConnectionRelease(uint8_t                             Mod_id,
 uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
                            uint8_t sync_area,
                            uint8_t *buffer,
@@ -4492,7 +4176,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
 
   return((enc_rval.encoded+7)/8);
 }
-#endif
+
 
 uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t) {
   asn_enc_rval_t enc_rval;
@@ -4505,15 +4189,9 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
   measurementReport->criticalExtensions.choice.c1.present=LTE_MeasurementReport__criticalExtensions__c1_PR_measurementReport_r8;
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension=CALLOC(1,
       sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension));
-
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult=rsrp_s;
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrqResult=rsrq_s;
-#else
-  measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultServCell.rsrpResult=rsrp_s;
-  measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultServCell.rsrqResult=rsrq_s;
-#endif
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells=CALLOC(1,
       sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells));
   measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->present=LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA;
@@ -4584,7 +4262,6 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
 
   free(measResultListEUTRA2);
   measResultListEUTRA2 = NULL;
-
   return((enc_rval.encoded+7)/8);
 }
 
@@ -4688,85 +4365,61 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t
   return encoded;
 }
 
-int do_HandoverPreparation(char *ho_buf, int ho_size, LTE_UE_EUTRA_Capability_t *ue_eutra_cap, int rrc_size)
-{
+int do_HandoverPreparation(char *ho_buf, int ho_size, LTE_UE_EUTRA_Capability_t *ue_eutra_cap, int rrc_size) {
   asn_enc_rval_t enc_rval;
   LTE_HandoverPreparationInformation_t ho;
   LTE_HandoverPreparationInformation_r8_IEs_t *ho_info;
   LTE_UE_CapabilityRAT_Container_t *ue_cap_rat_container;
-
   char rrc_buf[rrc_size];
-
   memset(rrc_buf, 0, rrc_size);
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UE_EUTRA_Capability,
                                    NULL,
                                    ue_eutra_cap,
                                    rrc_buf,
                                    rrc_size);
-
   /* TODO: free the OCTET_STRING */
-
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
                enc_rval.failed_type->name, enc_rval.encoded);
-
-
   memset(&ho, 0, sizeof(ho));
-
   ho.criticalExtensions.present = LTE_HandoverPreparationInformation__criticalExtensions_PR_c1;
   ho.criticalExtensions.choice.c1.present = LTE_HandoverPreparationInformation__criticalExtensions__c1_PR_handoverPreparationInformation_r8;
-
   ho_info = &ho.criticalExtensions.choice.c1.choice.handoverPreparationInformation_r8;
   {
-      ue_cap_rat_container = (LTE_UE_CapabilityRAT_Container_t *)calloc(1,sizeof(LTE_UE_CapabilityRAT_Container_t));
-      ue_cap_rat_container->rat_Type = LTE_RAT_Type_eutra;
-
-      AssertFatal (OCTET_STRING_fromBuf(
+    ue_cap_rat_container = (LTE_UE_CapabilityRAT_Container_t *)calloc(1,sizeof(LTE_UE_CapabilityRAT_Container_t));
+    ue_cap_rat_container->rat_Type = LTE_RAT_Type_eutra;
+    AssertFatal (OCTET_STRING_fromBuf(
                    &ue_cap_rat_container->ueCapabilityRAT_Container,
                    rrc_buf, rrc_size) != -1, "fatal: OCTET_STRING_fromBuf failed\n");
-
-      ASN_SEQUENCE_ADD(&ho_info->ue_RadioAccessCapabilityInfo.list, ue_cap_rat_container);
+    ASN_SEQUENCE_ADD(&ho_info->ue_RadioAccessCapabilityInfo.list, ue_cap_rat_container);
   }
-
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_HandoverPreparationInformation,
                                    NULL,
                                    &ho,
                                    ho_buf,
                                    ho_size);
-
   /* TODO: free the OCTET_STRING */
-
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
                enc_rval.failed_type->name, enc_rval.encoded);
-
   return((enc_rval.encoded+7)/8);
 }
 
-int do_HandoverCommand(char *ho_buf, int ho_size, char *rrc_buf, int rrc_size)
-{
+int do_HandoverCommand(char *ho_buf, int ho_size, char *rrc_buf, int rrc_size) {
   asn_enc_rval_t enc_rval;
   LTE_HandoverCommand_t ho;
-
   memset(&ho, 0, sizeof(ho));
-
   ho.criticalExtensions.present = LTE_HandoverCommand__criticalExtensions_PR_c1;
   ho.criticalExtensions.choice.c1.present = LTE_HandoverCommand__criticalExtensions__c1_PR_handoverCommand_r8;
-
   AssertFatal (OCTET_STRING_fromBuf(
-               &ho.criticalExtensions.choice.c1.choice.handoverCommand_r8.handoverCommandMessage,
-               rrc_buf, rrc_size) != -1, "fatal: OCTET_STRING_fromBuf failed\n");
-
+                 &ho.criticalExtensions.choice.c1.choice.handoverCommand_r8.handoverCommandMessage,
+                 rrc_buf, rrc_size) != -1, "fatal: OCTET_STRING_fromBuf failed\n");
   enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_HandoverCommand,
                                    NULL,
                                    &ho,
                                    ho_buf,
                                    ho_size);
-
   /* TODO: free the OCTET_STRING */
-
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
                enc_rval.failed_type->name, enc_rval.encoded);
-
   return((enc_rval.encoded+7)/8);
 }
 
@@ -4897,8 +4550,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) {
                                    &UECapability.sdu[0],
                                    MAX_UE_CAPABILITY_SIZE);
   AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
-	       enc_rval.failed_type->name, enc_rval.encoded);
-
+               enc_rval.failed_type->name, enc_rval.encoded);
   UECapability.sdu_size = (enc_rval.encoded + 7) / 8;
   LOG_I(PHY, "[RRC]UE Capability encoded, %d bytes (%zd bits)\n",
         UECapability.sdu_size, enc_rval.encoded + 7);
diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.h b/openair2/RRC/LTE/MESSAGES/asn1_msg.h
index 7ddf939e6de36868e08ce1f85249722f7ce8973d..5203bc64ed2f584087189faf0d6dd77c6e023961 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.h
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.h
@@ -64,14 +64,9 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
 @param phich_duration PHICH duration parameter
 @param frame radio frame number
 @return size of encoded bit stream in bytes*/
-uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-	       , uint32_t schedulingInfoSIB1
-#endif
-	       );
+uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame, uint32_t schedulingInfoSIB1);
 
 /**
-<<<<<<< HEAD
 \brief Generate configuration for MIB (eNB).
 @param carrier pointer to Carrier information
 @param N_RB_DL Number of downlink PRBs
@@ -93,16 +88,13 @@ LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *c
 @param carrier pointer to Carrier information
 @param Mod_id Instance of eNB
 @param Component carrier Component carrier to configure
-@param configuration Pointer Configuration Request structure  
+@param configuration Pointer Configuration Request structure
 @param br_flag Do for BL/CE UE configuration
 @return size of encoded bit stream in bytes*/
 
-uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                , BOOLEAN_t brOption
-#endif
+uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, BOOLEAN_t brOption
 #if defined(ENABLE_ITTI)
-                ,RrcConfigurationReq *configuration
+  ,RrcConfigurationReq *configuration
 #endif
                );
 
@@ -114,7 +106,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id
 @param configuration Pointer Configuration Request structure
 @return size of encoded bit stream in bytes*/
 uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration
-               );
+                    );
 
 
 
@@ -129,11 +121,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcCo
 @param MBMS_flag Indicates presence of MBMS system information (when 1)
 @return size of encoded bit stream in bytes*/
 
-uint8_t do_SIB23(uint8_t Mod_id,
-                 int CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-		 , BOOLEAN_t brOption
-#endif
+uint8_t do_SIB23(uint8_t Mod_id,int CC_id, BOOLEAN_t brOption
 #if defined(ENABLE_ITTI)
   , RrcConfigurationReq *configuration
 #endif
@@ -196,47 +184,46 @@ do_RRCConnectionSetup(
   LTE_SRB_ToAddModList_t             **SRB_configList,
   struct LTE_PhysicalConfigDedicated **physicalConfigDedicated
 );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
+
 uint8_t
 do_RRCConnectionSetup_BR(
-	const protocol_ctxt_t*     const ctxt_pP,
-	rrc_eNB_ue_context_t*      const ue_context_pP,
-	int                              CC_id,
-	uint8_t*                   const buffer,
-	const uint8_t                    transmission_mode,
-	const uint8_t                    Transaction_id,
-	LTE_SRB_ToAddModList_t**             SRB_configList,
-	struct LTE_PhysicalConfigDedicated** physicalConfigDedicated
+  const protocol_ctxt_t     *const ctxt_pP,
+  rrc_eNB_ue_context_t      *const ue_context_pP,
+  int                              CC_id,
+  uint8_t                   *const buffer,
+  const uint8_t                    transmission_mode,
+  const uint8_t                    Transaction_id,
+  LTE_SRB_ToAddModList_t             **SRB_configList,
+  struct LTE_PhysicalConfigDedicated **physicalConfigDedicated
 );
-#endif
 
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
+
+
 uint16_t
 do_RRCConnectionReconfiguration_BR(
-                   const protocol_ctxt_t*        const ctxt_pP,
-                   uint8_t                            *buffer,
-                   uint8_t                             Transaction_id,
-                   LTE_SRB_ToAddModList_t                 *SRB_list,
-                   LTE_DRB_ToAddModList_t                 *DRB_list,
-                   LTE_DRB_ToReleaseList_t                *DRB_list2,
-                   struct LTE_SPS_Config                  *sps_Config,
-                   struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
-                   LTE_MeasObjectToAddModList_t           *MeasObj_list,
-                   LTE_ReportConfigToAddModList_t         *ReportConfig_list,
-                   LTE_QuantityConfig_t                   *quantityConfig,
-                   LTE_MeasIdToAddModList_t               *MeasId_list,
-                   LTE_MAC_MainConfig_t                   *mac_MainConfig,
-                   LTE_MeasGapConfig_t                    *measGapConfig,
-                   LTE_MobilityControlInfo_t              *mobilityInfo,
-                   struct LTE_MeasConfig__speedStatePars  *speedStatePars,
-                   LTE_RSRP_Range_t                       *rsrp,
-                   LTE_C_RNTI_t                           *cba_rnti,
-                   struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
-                   LTE_SCellToAddMod_r10_t  *SCell_config
-                   );
-#endif
+  const protocol_ctxt_t        *const ctxt_pP,
+  uint8_t                            *buffer,
+  uint8_t                             Transaction_id,
+  LTE_SRB_ToAddModList_t                 *SRB_list,
+  LTE_DRB_ToAddModList_t                 *DRB_list,
+  LTE_DRB_ToReleaseList_t                *DRB_list2,
+  struct LTE_SPS_Config                  *sps_Config,
+  struct LTE_PhysicalConfigDedicated     *physicalConfigDedicated,
+  LTE_MeasObjectToAddModList_t           *MeasObj_list,
+  LTE_ReportConfigToAddModList_t         *ReportConfig_list,
+  LTE_QuantityConfig_t                   *quantityConfig,
+  LTE_MeasIdToAddModList_t               *MeasId_list,
+  LTE_MAC_MainConfig_t                   *mac_MainConfig,
+  LTE_MeasGapConfig_t                    *measGapConfig,
+  LTE_MobilityControlInfo_t              *mobilityInfo,
+  struct LTE_MeasConfig__speedStatePars  *speedStatePars,
+  LTE_RSRP_Range_t                       *rsrp,
+  LTE_C_RNTI_t                           *cba_rnti,
+  struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
+  LTE_SCellToAddMod_r10_t  *SCell_config
+);
 /**
 \brief Generate an RRCConnectionReconfiguration DL-DCCH-Message (eNB).  This routine configures SRBToAddMod (SRB2) and one DRBToAddMod
 (DRB3).  PhysicalConfigDedicated is not updated.
@@ -261,9 +248,9 @@ do_RRCConnectionReconfiguration_BR(
 
 uint16_t
 do_RRCConnectionReconfiguration(
-  const protocol_ctxt_t        *const ctxt_pP,
-  uint8_t                            *buffer,
-  uint8_t                             Transaction_id,
+  const protocol_ctxt_t                  *const ctxt_pP,
+  uint8_t                                *buffer,
+  uint8_t                                Transaction_id,
   LTE_SRB_ToAddModList_t                 *SRB_list,
   LTE_DRB_ToAddModList_t                 *DRB_list,
   LTE_DRB_ToReleaseList_t                *DRB_list2,
@@ -282,10 +269,8 @@ do_RRCConnectionReconfiguration(
   LTE_C_RNTI_t                           *cba_rnti,
   struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList,
   LTE_SL_CommConfig_r12_t                *sl_CommConfig,
-  LTE_SL_DiscConfig_r12_t                *sl_DiscConfig
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  , LTE_SCellToAddMod_r10_t  *SCell_config
-#endif
+  LTE_SL_DiscConfig_r12_t                *sl_DiscConfig,
+  LTE_SCellToAddMod_r10_t                *SCell_config
 );
 /**
 \brief Generate an RRCConnectionReestablishment DL-CCCH-Message (eNB).  This routine configures SRB_ToAddMod (SRB1/SRB2) and
@@ -346,7 +331,6 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_
  * @returns Size of encoded bit stream in bytes
 */
 uint8_t do_MCCHMessage(uint8_t *buffer);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 /***
  * \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
  * @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
@@ -357,7 +341,6 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
                            uint8_t *buffer,
                            LTE_MCCH_Message_t *mcch_message,
                            LTE_MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
-#endif
 
 uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t);
 
diff --git a/openair2/RRC/LTE/defs_NB_IoT.h b/openair2/RRC/LTE/defs_NB_IoT.h
index 8f0c4d16e664e7bb0fe1ceb74109939113c8e167..06b150a67346b0419e948362f859cddd1655b5e7 100644
--- a/openair2/RRC/LTE/defs_NB_IoT.h
+++ b/openair2/RRC/LTE/defs_NB_IoT.h
@@ -110,9 +110,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
   uint8_t SIB1systemInfoValueTag;
   uint32_t SIStatus;
   uint32_t SIcnt;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
-#endif
   uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
   uint8_t handoverTarget;
   //HO_STATE_t ho_state;
@@ -475,79 +473,10 @@ typedef struct UE_RRC_INST_NB_IoT_s {
   SRB_INFO_TABLE_ENTRY_NB_IoT     Srb1[NB_CNX_UE];
   SRB_INFO_TABLE_ENTRY_NB_IoT     Srb2[NB_CNX_UE];
   HANDOVER_INFO_UE_NB_IoT         HandoverInfoUe;
-  /*
-  uint8_t *SIB1[NB_CNX_UE];
-  uint8_t sizeof_SIB1[NB_CNX_UE];
-  uint8_t *SI[NB_CNX_UE];
-  uint8_t sizeof_SI[NB_CNX_UE];
-  uint8_t SIB1Status[NB_CNX_UE];
-  uint8_t SIStatus[NB_CNX_UE];
-  SystemInformationBlockType1_t *sib1[NB_CNX_UE];
-  SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
-  */
   LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
-  /*
-  SystemInformationBlockType3_t *sib3[NB_CNX_UE];
-  SystemInformationBlockType4_t *sib4[NB_CNX_UE];
-  SystemInformationBlockType5_t *sib5[NB_CNX_UE];
-  SystemInformationBlockType6_t *sib6[NB_CNX_UE];
-  SystemInformationBlockType7_t *sib7[NB_CNX_UE];
-  SystemInformationBlockType8_t *sib8[NB_CNX_UE];
-  SystemInformationBlockType9_t *sib9[NB_CNX_UE];
-  SystemInformationBlockType10_t *sib10[NB_CNX_UE];
-  SystemInformationBlockType11_t *sib11[NB_CNX_UE];
-
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  uint8_t                           MBMS_flag;
-  uint8_t *MCCH_MESSAGE[NB_CNX_UE];
-  uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
-  uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
-  MBSFNAreaConfiguration_r9_t       *mcch_message[NB_CNX_UE];
-  SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
-  SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
-  #endif
-  #ifdef CBA
-  uint8_t                         num_active_cba_groups;
-  uint16_t                        cba_rnti[NUM_MAX_CBA_GROUP];
-  #endif
-  uint8_t                         num_srb;
-  struct SRB_ToAddMod             *SRB1_config[NB_CNX_UE];
-  struct SRB_ToAddMod             *SRB2_config[NB_CNX_UE];
-  struct DRB_ToAddMod             *DRB_config[NB_CNX_UE][8];
-  rb_id_t                         *defaultDRB; // remember the ID of the default DRB
-  MeasObjectToAddMod_t            *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
-  struct ReportConfigToAddMod     *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
-  */
+
   struct QuantityConfig           *QuantityConfig[NB_CNX_UE];
-  /*
-  struct MeasIdToAddMod           *MeasId[NB_CNX_UE][MAX_MEAS_ID];
-  MEAS_REPORT_LIST      *measReportList[NB_CNX_UE][MAX_MEAS_ID];
-  uint32_t           measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
-  RSRP_Range_t                    s_measure;
-  struct MeasConfig__speedStatePars *speedStatePars;
-  struct PhysicalConfigDedicated  *physicalConfigDedicated[NB_CNX_UE];
-  struct SPS_Config               *sps_Config[NB_CNX_UE];
-  MAC_MainConfig_t                *mac_MainConfig[NB_CNX_UE];
-  MeasGapConfig_t                 *measGapConfig[NB_CNX_UE];
-  double                          filter_coeff_rsrp; // [7] ???
-  double                          filter_coeff_rsrq; // [7] ???
-  float                           rsrp_db[7];
-  float                           rsrq_db[7];
-  float                           rsrp_db_filtered[7];
-  float                           rsrq_db_filtered[7];
-  #if ENABLE_RAL
-  obj_hash_table_t               *ral_meas_thresholds;
-  ral_transaction_id_t            scan_transaction_id;
-  #endif
-  #if defined(ENABLE_SECURITY)
-  // KeNB as computed from parameters within USIM card //
-  uint8_t kenb[32];
-  #endif
 
-  // Used integrity/ciphering algorithms //
-  CipheringAlgorithm_r12_t                          ciphering_algorithm;
-  e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
-  */
 } UE_RRC_INST_NB_IoT;
 
 
diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c
index 840ec9f386d17823014ec1ab34a2f12f78c183e8..17cef8112e79b34605954c5c80d4fd3cb9b074d8 100644
--- a/openair2/RRC/LTE/rrc_UE.c
+++ b/openair2/RRC/LTE/rrc_UE.c
@@ -54,9 +54,7 @@
 #include "LTE_DL-DCCH-Message.h"
 #include "LTE_BCCH-DL-SCH-Message.h"
 #include "LTE_PCCH-Message.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  #include "LTE_MCCH-Message.h"
-#endif
+#include "LTE_MCCH-Message.h"
 #include "LTE_MeasConfig.h"
 #include "LTE_MeasGapConfig.h"
 #include "LTE_MeasObjectEUTRA.h"
@@ -83,24 +81,21 @@
 
 #include "openair2/LAYER2/MAC/mac_extern.h"
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-   #include "LTE_BCCH-BCH-Message-MBMS.h"
-   #include "LTE_BCCH-DL-SCH-Message-MBMS.h"
-   #include "LTE_SystemInformation-MBMS-r14.h"
-   #include "LTE_SystemInformationBlockType1-MBMS-r14.h"
-   #include "LTE_NonMBSFN-SubframeConfig-r14.h"
-#endif
+#include "LTE_BCCH-BCH-Message-MBMS.h"
+#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
+#include "LTE_SystemInformation-MBMS-r14.h"
+#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
+#include "LTE_NonMBSFN-SubframeConfig-r14.h"
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  #include "LTE_SL-Preconfiguration-r12.h"
 
-  //for D2D
-  int ctrl_sock_fd;
-  #define BUFSIZE 1024
-  struct sockaddr_in prose_app_addr;
-  int slrb_id;
-  int send_ue_information = 0;
-#endif
+#include "LTE_SL-Preconfiguration-r12.h"
+
+//for D2D
+int ctrl_sock_fd;
+#define BUFSIZE 1024
+struct sockaddr_in prose_app_addr;
+int slrb_id;
+int send_ue_information = 0;
 
 // for malloc_clear
 #include "PHY/defs_UE.h"
@@ -120,15 +115,14 @@ extern void pdcp_config_set_security(
 void rrc_ue_process_securityModeCommand( const protocol_ctxt_t *const ctxt_pP, LTE_SecurityModeCommand_t *const securityModeCommand, const uint8_t eNB_index );
 
 static int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 static int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index );
-#endif
+
 
 static int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t rsrq, const uint8_t rsrp );
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 static int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t rsrq, const uint8_t rsrp );
-#endif
+
 
 /** \brief Generates/Encodes RRCConnnectionSetupComplete message at UE
  *  \param ctxt_pP Running context
@@ -155,11 +149,9 @@ static uint8_t check_trigger_meas_event(
   LTE_Q_OffsetRange_t ofn, LTE_Q_OffsetRange_t ocn, LTE_Hysteresis_t hys,
   LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
-  uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t  *destinationInfoList, long *discTxResourceReq,
-  SL_TRIGGER_t mode);
-#endif
+static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
+uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t  *destinationInfoList, long *discTxResourceReq,
+    SL_TRIGGER_t mode);
 
 
 
@@ -248,12 +240,10 @@ static void init_SI_UE(  protocol_ctxt_t const *ctxt_pP, const uint8_t eNB_index
   UE_rrc_inst[ctxt_pP->module_id].sizeof_SI[eNB_index] = 0;
   UE_rrc_inst[ctxt_pP->module_id].SIB1[eNB_index] = (uint8_t *)malloc16_clear( 32 );
   UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType1_t) );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   UE_rrc_inst[ctxt_pP->module_id].sizeof_SIB1_MBMS[eNB_index] = 0;
   UE_rrc_inst[ctxt_pP->module_id].sizeof_SI_MBMS[eNB_index] = 0;
   UE_rrc_inst[ctxt_pP->module_id].SIB1_MBMS[eNB_index] = (uint8_t *)malloc16_clear( 32 );
   UE_rrc_inst[ctxt_pP->module_id].sib1_MBMS[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType1_MBMS_r14_t) );
-#endif
   UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType2_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib3[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType3_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib4[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType4_t) );
@@ -264,26 +254,21 @@ static void init_SI_UE(  protocol_ctxt_t const *ctxt_pP, const uint8_t eNB_index
   UE_rrc_inst[ctxt_pP->module_id].sib9[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType9_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib10[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType10_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib11[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType11_t) );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType12_r9_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType13_r9_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType18_r12_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType19_r12_t) );
   UE_rrc_inst[ctxt_pP->module_id].sib21[eNB_index] = malloc16_clear( sizeof(LTE_SystemInformationBlockType21_r14_t) );
-#endif
   UE_rrc_inst[ctxt_pP->module_id].SI[eNB_index] = (uint8_t *)malloc16_clear( 64 );
   UE_rrc_inst[ctxt_pP->module_id].si[eNB_index] = (LTE_SystemInformation_t *)malloc16_clear( sizeof(LTE_SystemInformation_t) );
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 0;
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt    = 0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   UE_rrc_inst[ctxt_pP->module_id].SI_MBMS[eNB_index] = (uint8_t *)malloc16_clear( 64 );
   UE_rrc_inst[ctxt_pP->module_id].si_MBMS[eNB_index] = (LTE_SystemInformation_MBMS_r14_t *)malloc16_clear( sizeof(LTE_SystemInformation_MBMS_r14_t) );
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 0;
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt_MBMS    = 0;
-#endif
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) {
   LOG_I(RRC,"Initializing Sidelink Pre-configuration for UE\n");
   UE->SL_Preconfiguration[eNB_index] = malloc16_clear( sizeof(struct LTE_SL_Preconfiguration_r12) );
@@ -351,102 +336,9 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) {
   ASN_SEQUENCE_ADD(&UE->SL_Preconfiguration[eNB_index]->preconfigComm_r12.list,preconfigpool);
   // Rel13 extensions
   UE->SL_Preconfiguration[eNB_index]->ext1 = NULL;
-  /*
-    // Establish a SLRB (using DRB 3 for now)
-    protocol_ctxt_t ctxt;
-    PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, 0x1234, 0, 0,0);
-
-    UE->DRB_config[0][0] = CALLOC(1,sizeof(struct DRB_ToAddMod));
-    UE->DRB_config[0][0]->eps_BearerIdentity = CALLOC(1, sizeof(long));
-    UE->DRB_config[0][0]->drb_Identity =  3;
-    UE->DRB_config[0][0]->eps_BearerIdentity = CALLOC(1, sizeof(long));
-    // allowed value 5..15, value : x+4
-    *(UE->DRB_config[0][0]->eps_BearerIdentity) = 3;
-    UE->DRB_config[0][0]->logicalChannelIdentity = CALLOC(1, sizeof(long));
-    *(UE->DRB_config[0][0]->logicalChannelIdentity) = UE->DRB_config[0][0]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
-
-    // TTN - Establish a new SLRB for PC5-S (using DRB 10 for now)
-    UE->DRB_config[0][1] = CALLOC(1,sizeof(struct DRB_ToAddMod));
-    UE->DRB_config[0][1]->eps_BearerIdentity = CALLOC(1, sizeof(long));
-    UE->DRB_config[0][1]->drb_Identity =  10;
-    UE->DRB_config[0][1]->eps_BearerIdentity = CALLOC(1, sizeof(long));
-    // allowed value 5..15, value : x+4
-    *(UE->DRB_config[0][1]->eps_BearerIdentity) = 10;
-    UE->DRB_config[0][1]->logicalChannelIdentity = CALLOC(1, sizeof(long));
-    *(UE->DRB_config[0][1]->logicalChannelIdentity) = UE->DRB_config[0][1]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
-
-    struct RLC_Config                  *DRB_rlc_config                   = CALLOC(1,sizeof(struct RLC_Config));
-    struct PDCP_Config                 *DRB_pdcp_config                  = CALLOC(1,sizeof(struct PDCP_Config));
-    struct PDCP_Config__rlc_UM         *PDCP_rlc_UM                      = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM));
-    struct LogicalChannelConfig        *DRB_lchan_config                 = CALLOC(1,sizeof(struct LogicalChannelConfig));
-    struct LogicalChannelConfig__ul_SpecificParameters
-      *DRB_ul_SpecificParameters                                         = CALLOC(1, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
-    long                               *logicalchannelgroup_drb          = CALLOC(1, sizeof(long));
-
-    DRB_rlc_config->present = RLC_Config_PR_um_Bi_Directional;
-    DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
-    DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
-    DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = T_Reordering_ms35;
-    UE->DRB_config[0][0]->rlc_Config = DRB_rlc_config;
-    UE->DRB_config[0][1]->rlc_Config = DRB_rlc_config;
-
-    DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
-    UE->DRB_config[0][0]->pdcp_Config = DRB_pdcp_config;
-    UE->DRB_config[0][1]->pdcp_Config = DRB_pdcp_config;
-    DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
-    *DRB_pdcp_config->discardTimer = PDCP_Config__discardTimer_infinity;
-    DRB_pdcp_config->rlc_AM = NULL;
-    DRB_pdcp_config->rlc_UM = NULL;
-
-    // avoid gcc warnings
-    (void)PDCP_rlc_UM;
-
-    DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
-    PDCP_rlc_UM->pdcp_SN_Size = PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
-    DRB_pdcp_config->headerCompression.present = PDCP_Config__headerCompression_PR_notUsed;
-
-    UE->DRB_config[0][0]->logicalChannelConfig = DRB_lchan_config;
-    UE->DRB_config[0][1]->logicalChannelConfig = DRB_lchan_config;
-    DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters));
-    DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
-
-    DRB_ul_SpecificParameters->priority = 12;    // lower priority than srb1, srb2 and other dedicated bearer
-    DRB_ul_SpecificParameters->prioritisedBitRate =LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8 ;
-      //LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
-    DRB_ul_SpecificParameters->bucketSizeDuration =
-      LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
-
-    // LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
-
-    *logicalchannelgroup_drb = 1;
-    DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
-
-    UE->DRB_configList = CALLOC(1,sizeof(DRB_ToAddModList_t));
-    ASN_SEQUENCE_ADD(&UE->DRB_configList->list,UE->DRB_config[0][0]);
-    ASN_SEQUENCE_ADD(&UE->DRB_configList->list,UE->DRB_config[0][1]);
-
-    rrc_pdcp_config_asn1_req(&ctxt,
-           (SRB_ToAddModList_t *) NULL,
-           UE->DRB_configList,
-           (DRB_ToReleaseList_t*) NULL,
-           0xff, NULL, NULL, NULL
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                             , (LTE_PMCH_InfoList_r9_t *) NULL
-  #endif
-                             ,NULL);
-
-    rrc_rlc_config_asn1_req(&ctxt,
-          (SRB_ToAddModList_t*)NULL,
-          UE->DRB_configList,
-          (DRB_ToReleaseList_t*)NULL
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-          ,(LTE_PMCH_InfoList_r9_t *)NULL
-  #endif
-          );
-  */
 }
 
-#endif
+
 
 //-----------------------------------------------------------------------------
 void openair_rrc_ue_init_security( const protocol_ctxt_t *const ctxt_pP ) {
@@ -485,11 +377,7 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_
   UE_rrc_inst[ctxt.module_id].Srb2[eNB_index].Active=0;
   UE_rrc_inst[ctxt.module_id].HandoverInfoUe.measFlag=1;
   UE_rrc_inst[ctxt.module_id].ciphering_algorithm = LTE_CipheringAlgorithm_r12_eea0;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
   UE_rrc_inst[ctxt.module_id].integrity_algorithm = LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920;
-#else
-  UE_rrc_inst[ctxt.module_id].integrity_algorithm = LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_reserved;
-#endif
   openair_rrc_ue_init_security(&ctxt);
   init_SI_UE(&ctxt,eNB_index);
   LOG_D(RRC,PROTOCOL_RRC_CTXT_FMT"  INIT: phy_sync_2_ch_ind\n",
@@ -502,15 +390,6 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_
 #endif
 #ifdef NO_RRM //init ch SRB0, SRB1 & BDTCH
   openair_rrc_on_ue(&ctxt);
-#endif
-#ifdef CBA
-  int j;
-
-  for(j=0; j<NUM_MAX_CBA_GROUP; j++) {
-    UE_rrc_inst[ue_mod_idP].cba_rnti[j] = 0x0000;
-  }
-
-  UE_rrc_inst[ue_mod_idP].num_active_cba_groups = 0;
 #endif
   return 0;
 }
@@ -804,7 +683,6 @@ rrc_ue_establish_srb2(
   // copy default configuration for now
   //  memcpy(&UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE);
   //  memcpy(&UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Lchan_desc[1],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE);
-
   LOG_I(RRC,"[UE %d], CONFIG_SRB2 %d corresponding to eNB_index %d\n",ue_mod_idP,DCCH1,eNB_index);
   //rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD, lchan_id, UNDEF_SECURITY_MODE);
   //  rrc_rlc_config_req(ue_mod_idP+NB_eNB_INST,frameP,0,CONFIG_ACTION_ADD,lchan_id,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
@@ -912,10 +790,7 @@ rrc_ue_process_measConfig(
     rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index,
                           (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                           (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                           (LTE_SCellToAddMod_r10_t *)NULL,
-                          //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                           UE_rrc_inst[ctxt_pP->module_id].MeasObj[eNB_index],
                           (LTE_MAC_MainConfig_t *)NULL,
                           0,
@@ -928,29 +803,16 @@ rrc_ue_process_measConfig(
                           NULL,
                           NULL,
                           NULL,
-                          NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                          ,0,
-                          (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                          (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                          ,
+                          NULL,
                           0,
-                          0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                          ,
+                          (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
+                          (LTE_PMCH_InfoList_r9_t *)NULL,
                           0,
                           NULL,
-                          NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                          NULL,
+                          0,
+                          (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                          (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                          );
   }
 
@@ -1254,10 +1116,6 @@ rrc_ue_process_radioResourceConfigDedicated(
   long SRB_id,DRB_id;
   int i,cnt;
   LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
-#ifdef CBA
-  uint8_t cba_found = 0;
-  uint16_t cba_RNTI;
-#endif
 
   // Save physicalConfigDedicated if present
   if (radioResourceConfigDedicated->physicalConfigDedicated) {
@@ -1298,31 +1156,6 @@ rrc_ue_process_radioResourceConfigDedicated(
     }
   }
 
-#ifdef CBA
-
-  if (radioResourceConfigDedicated->cba_RNTI_vlola) {
-    cba_RNTI = (uint16_t) (((radioResourceConfigDedicated->cba_RNTI_vlola->buf[1]&0xff) << 8) |
-                           (radioResourceConfigDedicated->cba_RNTI_vlola->buf[0]&0xff));
-
-    for (i=0 ; i< NUM_MAX_CBA_GROUP; i++) {
-      if (UE_rrc_inst[ctxt_pP->module_id].cba_rnti[i] == cba_RNTI ) {
-        cba_found=1;
-        break;
-      } else if (UE_rrc_inst[ctxt_pP->module_id].cba_rnti[i] == 0 ) {
-        break;
-      }
-    }
-
-    if (cba_found==0) {
-      UE_rrc_inst[ctxt_pP->module_id].num_active_cba_groups++;
-      UE_rrc_inst[ctxt_pP->module_id].cba_rnti[i]=cba_RNTI;
-      LOG_D(RRC, "[UE %d] Frame %d: radioResourceConfigDedicated reveived CBA_RNTI = %x for group %d from eNB %d \n",
-            ctxt_pP->module_id,frameP, UE_rrc_inst[ctxt_pP->module_id].cba_rnti[i], i, eNB_index);
-    }
-  }
-
-#endif
-
   // Establish SRBs if present
   // loop through SRBToAddModList
   if (radioResourceConfigDedicated->srb_ToAddModList) {
@@ -1341,20 +1174,16 @@ rrc_ue_process_radioResourceConfigDedicated(
                              (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4),
                              kRRCenc,
                              kRRCint,
-                             NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                             ,(LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-                             ,NULL);
+                             NULL,
+                             (LTE_PMCH_InfoList_r9_t *)NULL,
+                             NULL);
     // Refresh SRBs
     rrc_rlc_config_asn1_req(ctxt_pP,
                             radioResourceConfigDedicated->srb_ToAddModList,
                             (LTE_DRB_ToAddModList_t *)NULL,
-                            (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                            ,(LTE_PMCH_InfoList_r9_t *)NULL
-                            , 0, 0
-#endif
+                            (LTE_DRB_ToReleaseList_t *)NULL,
+                            (LTE_PMCH_InfoList_r9_t *)NULL,
+                            0, 0
                            );
 #if ENABLE_RAL
     // first msg that includes srb config
@@ -1389,10 +1218,7 @@ rrc_ue_process_radioResourceConfigDedicated(
           rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index,
                                 (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                                 UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                 (LTE_SCellToAddMod_r10_t *)NULL,
-                                //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                                 (LTE_MeasObjectToAddMod_t **)NULL,
                                 UE_rrc_inst[ctxt_pP->module_id].mac_MainConfig[eNB_index],
                                 1,
@@ -1405,31 +1231,16 @@ rrc_ue_process_radioResourceConfigDedicated(
                                 NULL,
                                 NULL,
                                 NULL,
-                                NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                ,
+                                NULL,
                                 0,
                                 (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,
-                                0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
                                 0,
                                 NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                                NULL,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
         }
       } else {
@@ -1460,10 +1271,7 @@ rrc_ue_process_radioResourceConfigDedicated(
           rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index,
                                 (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                                 UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                 (LTE_SCellToAddMod_r10_t *)NULL,
-                                //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                                 (LTE_MeasObjectToAddMod_t **)NULL,
                                 UE_rrc_inst[ctxt_pP->module_id].mac_MainConfig[eNB_index],
                                 2,
@@ -1476,31 +1284,16 @@ rrc_ue_process_radioResourceConfigDedicated(
                                 NULL,
                                 NULL,
                                 NULL,
-                                NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                ,
+                                NULL,
                                 0,
                                 (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,
-                                0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
                                 0,
                                 NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                                NULL,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
         }
       }
@@ -1539,20 +1332,15 @@ rrc_ue_process_radioResourceConfigDedicated(
                              (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4),
                              NULL,
                              NULL,
-                             kUPenc
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                             ,(LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-                             , UE_rrc_inst[ctxt_pP->module_id].defaultDRB);
+                             kUPenc,
+                             (LTE_PMCH_InfoList_r9_t *)NULL,
+                             UE_rrc_inst[ctxt_pP->module_id].defaultDRB);
     // Refresh DRBs
     rrc_rlc_config_asn1_req(ctxt_pP,
                             (LTE_SRB_ToAddModList_t *)NULL,
                             radioResourceConfigDedicated->drb_ToAddModList,
-                            (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                            ,(LTE_PMCH_InfoList_r9_t *)NULL
-                            , 0, 0
-#endif
+                            (LTE_DRB_ToReleaseList_t *)NULL,
+                            (LTE_PMCH_InfoList_r9_t *)NULL, 0, 0
                            );
 
     for (i=0; i<radioResourceConfigDedicated->drb_ToAddModList->list.count; i++) {
@@ -1574,10 +1362,7 @@ rrc_ue_process_radioResourceConfigDedicated(
         rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index,
                               (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                               UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                               (LTE_SCellToAddMod_r10_t *)NULL,
-                              //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                               (LTE_MeasObjectToAddMod_t **)NULL,
                               UE_rrc_inst[ctxt_pP->module_id].mac_MainConfig[eNB_index],
                               *UE_rrc_inst[ctxt_pP->module_id].DRB_config[eNB_index][DRB_id]->logicalChannelIdentity,
@@ -1590,31 +1375,16 @@ rrc_ue_process_radioResourceConfigDedicated(
                               NULL,
                               NULL,
                               NULL,
-                              NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                              ,
+                              NULL,
                               0,
                               (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                              (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                              ,
-                              UE_rrc_inst[ue_mod_idP].num_active_cba_groups, //
-                              UE_rrc_inst[ue_mod_idP].cba_rnti[0]
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                              ,
+                              (LTE_PMCH_InfoList_r9_t *)NULL,
                               0,
                               NULL,
-                              NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                              NULL,
+                              0,
+                              (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                              (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                              );
       }
     }
@@ -2045,46 +1815,6 @@ rrc_ue_process_mobilityControlInfo(
   rrc_rlc_config_req(ctxt_pP, SRB_FLAG_YES,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ctxt_pP->module_id+DCCH1,Rlc_info_am_config);
   rrc_pdcp_config_req (ctxt_pP, SRB_FLAG_NO, CONFIG_ACTION_REMOVE, DTCH,UNDEF_SECURITY_MODE);
   rrc_rlc_config_req(ctxt_pP, SRB_FLAG_NO,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ctxt_pP->module_id+DTCH,Rlc_info_um);
-  /*
-  rrc_pdcp_config_asn1_req(NB_eNB_INST+ue_mod_idP,frameP, 0,eNB_index,
-         NULL, // SRB_ToAddModList
-         NULL, // DRB_ToAddModList
-         drb2release_list,
-         0, // security mode
-         NULL, // key rrc encryption
-         NULL, // key rrc integrity
-         NULL // key encryption
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-         ,NULL
-  #endif
-         ,NULL);
-
-  rrc_rlc_config_asn1_req(NB_eNB_INST+ue_mod_idP, frameP,0,eNB_index,
-        NULL,// SRB_ToAddModList
-        NULL,// DRB_ToAddModList
-        drb2release_list // DRB_ToReleaseList
-  #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-        ,NULL
-  #endif
-        ,NULL);
-   */
-  //A little cleanup at RRC...
-  //Copying current queue config to free RRC index
-  /*
-    memcpy((void *)UE_rrc_inst[ue_mod_idP].SRB1_config[~(7<<eNB_index)],(void *)UE_rrc_inst[ue_mod_idP].SRB1_config[7<<eNB_index],sizeof(SRB_ToAddMod_t));
-    memcpy((void *)UE_rrc_inst[ue_mod_idP].SRB2_config[~(7<<eNB_index)],(void *)UE_rrc_inst[ue_mod_idP].SRB2_config[7<<eNB_index],sizeof(SRB_ToAddMod_t));
-    memcpy((void *)UE_rrc_inst[ue_mod_idP].DRB_config[~(7<<eNB_index)][0],(void *)UE_rrc_inst[ue_mod_idP].DRB_config[7<<eNB_index][0],sizeof(DRB_ToAddMod_t));
-   */
-  /*
-  LOG_I(RRC,"Not sure if Freeing the current queue config works properly: Fix me\n");
-  free((void *)&UE_rrc_inst[ue_mod_idP].SRB1_config[eNB_index]);
-  free((void *)&UE_rrc_inst[ue_mod_idP].SRB2_config[eNB_index]);
-  free((void *)&UE_rrc_inst[ue_mod_idP].DRB_config[eNB_index][0]);
-
-  UE_rrc_inst[ue_mod_idP].SRB1_config[eNB_index] = NULL;
-  UE_rrc_inst[ue_mod_idP].SRB2_config[eNB_index] = NULL;
-  UE_rrc_inst[ue_mod_idP].DRB_config[eNB_index][0] = NULL;
-   */
   //Synchronisation to DL of target cell
   LOG_I(RRC,
         "HO: Reset PDCP and RLC for configured RBs.. \n[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ  (SRB2 eNB %d) --->][MAC_UE][MOD %02d][]\n",
@@ -2095,10 +1825,7 @@ rrc_ue_process_mobilityControlInfo(
                         eNB_index,
                         (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                         (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                         (LTE_SCellToAddMod_r10_t *)NULL,
-                        //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                         (LTE_MeasObjectToAddMod_t **)NULL,
                         (LTE_MAC_MainConfig_t *)NULL,
                         0,
@@ -2111,29 +1838,16 @@ rrc_ue_process_mobilityControlInfo(
                         NULL,
                         NULL,
                         NULL,
-                        NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                        ,0,
+                        NULL,
+                        0,
                         (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                        (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                        ,0,
-                        0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
+                        (LTE_PMCH_InfoList_r9_t *)NULL,
                         0,
                         NULL,
-                        NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                        NULL,
+                        0,
+                        (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                        (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                        );
   // Re-establish PDCP for all RBs that are established
   // rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD, ue_mod_idP+DCCH);
@@ -2438,26 +2152,19 @@ rrc_ue_decode_dcch(
 
         case LTE_DL_DCCH_MessageType__c1_PR_counterCheck:
           break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 
         case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
           break;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
         case LTE_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
           break;
 
         case LTE_DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
           break;
-#endif
 
         case LTE_DL_DCCH_MessageType__c1_PR_spare1:
         case LTE_DL_DCCH_MessageType__c1_PR_spare2:
         case LTE_DL_DCCH_MessageType__c1_PR_spare3:
-#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-        case LTE_DL_DCCH_MessageType__c1_PR_spare4:
-#endif
           break;
 
         default:
@@ -2624,8 +2331,6 @@ const char *SIB2nB( long value ) {
   return str[value];
 }
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int decode_BCCH_MBMS_DLSCH_Message(
   const protocol_ctxt_t *const ctxt_pP,
   const uint8_t                eNB_index,
@@ -2636,7 +2341,6 @@ int decode_BCCH_MBMS_DLSCH_Message(
   LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = NULL;
   //LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms = UE_rrc_inst[ctxt_pP->module_id].sib1_MBMS[eNB_index];
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN );
-
   /*if (((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS&1) == 1) &&  // SIB1 received
       (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt_MBMS == sib1->schedulingInfoList_MBMS_r14.list.count)) {
     // Avoid decoding  SystemInformationBlockType1_t* sib1_MBMS = UE_rrc_inst[ctxt_pP->module_id].sib1_MBMS[eNB_index];
@@ -2644,13 +2348,10 @@ int decode_BCCH_MBMS_DLSCH_Message(
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
     return 0;
   }*/
-
   rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_RECEIVING_SIB );
-
   //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-    //xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
+  //xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
   //}
-
   asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
                             &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
                             (void **)&bcch_message,
@@ -2669,7 +2370,7 @@ int decode_BCCH_MBMS_DLSCH_Message(
   }
 
   //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-    //xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
+  //xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,(void *)bcch_message );
   //}
 
   if (bcch_message->message.present == LTE_BCCH_DL_SCH_MessageType_MBMS_r14_PR_c1) {
@@ -2685,13 +2386,13 @@ int decode_BCCH_MBMS_DLSCH_Message(
             LOG_D( RRC, "[UE %"PRIu8"] Decoding \"First\" SIB1-MBMS\n", ctxt_pP->module_id );
             decode_SIB1_MBMS( ctxt_pP, eNB_index, rsrq, rsrp );
           }
-	}
+        }
 
         break;
 
       case LTE_BCCH_DL_SCH_MessageType_MBMS_r14__c1_PR_systemInformation_MBMS_r14:
         if ((ctxt_pP->frame % 4) == 0) {
-        //if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 1) {
+          //if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 1) {
           // SIB1 with schedulingInfoList is available
           // you miss this on the eNB!!!!
           LTE_SystemInformation_MBMS_r14_t *si_mbms = UE_rrc_inst[ctxt_pP->module_id].si_MBMS[eNB_index];
@@ -2703,8 +2404,8 @@ int decode_BCCH_MBMS_DLSCH_Message(
                  ctxt_pP->frame );
           decode_SI_MBMS( ctxt_pP, eNB_index ); //TODO
           //UE_mac_inst[ctxt_pP->module_id].SI_Decoded = 1;
-        //}
-	}
+          //}
+        }
 
         break;
 
@@ -2714,8 +2415,6 @@ int decode_BCCH_MBMS_DLSCH_Message(
     }
   }
 
-
-
   /*if (bcch_message->message.present == LTE_BCCH_DL_SCH_MessageType_PR_c1) {
     switch (bcch_message->message.choice.c1.present) {
       case LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1:
@@ -2755,22 +2454,18 @@ int decode_BCCH_MBMS_DLSCH_Message(
         break;
     }
   }*/
-
   /*if ((rrc_get_sub_state(ctxt_pP->module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE)
-#if defined(ENABLE_USE_MME)
+  #if defined(ENABLE_USE_MME)
       && (UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL)
-#endif
+  #endif
      ) {
     rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
     rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
   }*/
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
   return 0;
 }
 
-#endif
-
 
 
 //-----------------------------------------------------------------------------
@@ -2862,7 +2557,7 @@ int decode_BCCH_DLSCH_Message(
       rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
     }
   }
-  
+
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT );
   return 0;
 }
@@ -2900,12 +2595,10 @@ int decode_PCCH_DLSCH_Message(
   return(0);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t rsrq, const uint8_t rsrp ) {
   LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS = UE_rrc_inst[ctxt_pP->module_id].sib1_MBMS[eNB_index];
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_IN );
   LOG_I( RRC, "[UE %d] : Dumping SIB 1 SIB1-MBMS\n", ctxt_pP->module_id );
-
   //cannot parse ! ... TODO
   /*LTE_PLMN_Identity_t *PLMN_identity = ((LTE_PLMN_Identity_t*)(&sib1_MBMS->cellAccessRelatedInfo_r14.plmn_IdentityList_r14.list.array[0]))->plmn_Identity;
   int mccdigits = PLMN_identity->mcc->list.count;
@@ -2945,7 +2638,7 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
   if (plmn_data[plmn_ind].mcc < 0) {
     LOG_I( RRC, "Found Unknown operator (no entry in internal table)\n" );
   }
-*/
+  */
   LOG_I( RRC, "cellAccessRelatedInfo.cellIdentity         : raw:%"PRIu32" decoded:%02x.%02x.%02x.%02x\n",
          BIT_STRING_to_uint32( &sib1_MBMS->cellAccessRelatedInfo_r14.cellIdentity_r14 ),
          sib1_MBMS->cellAccessRelatedInfo_r14.cellIdentity_r14.buf[0],
@@ -2955,24 +2648,20 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
   //LOG_I( RRC, "cellAccessRelatedInfo.cellBarred           : raw:%ld decoded:%s\n", sib1_MBMS->cellAccessRelatedInfo_r14.cellBarred, SIBbarred(sib1_MBMS->cellAccessRelatedInfo_r14.cellBarred) );
   //LOG_I( RRC, "cellAccessRelatedInfo.intraFreqReselection : raw:%ld decoded:%s\n", sib1->cellAccessRelatedInfo.intraFreqReselection, SIBallowed(sib1->cellAccessRelatedInfo.intraFreqReselection) );
   //LOG_I( RRC, "cellAccessRelatedInfo.csg_Indication       : %d\n", sib1->cellAccessRelatedInfo.csg_Indication );
-
   //if (sib1->cellAccessRelatedInfo.csg_Identity)
-    //LOG_I( RRC, "cellAccessRelatedInfo.csg_Identity         : %"PRIu32"\n", BIT_STRING_to_uint32(sib1->cellAccessRelatedInfo.csg_Identity) );
+  //LOG_I( RRC, "cellAccessRelatedInfo.csg_Identity         : %"PRIu32"\n", BIT_STRING_to_uint32(sib1->cellAccessRelatedInfo.csg_Identity) );
   //else
-    //LOG_I( RRC, "cellAccessRelatedInfo.csg_Identity         : not defined\n" );
-//
+  //LOG_I( RRC, "cellAccessRelatedInfo.csg_Identity         : not defined\n" );
+  //
   //LOG_I( RRC, "cellSelectionInfo.q_RxLevMin               : %ld\n", sib1->cellSelectionInfo.q_RxLevMin );
-
   //if (sib1->cellSelectionInfo.q_RxLevMinOffset)
-    //LOG_I( RRC, "cellSelectionInfo.q_RxLevMinOffset         : %ld\n", *sib1->cellSelectionInfo.q_RxLevMinOffset );
+  //LOG_I( RRC, "cellSelectionInfo.q_RxLevMinOffset         : %ld\n", *sib1->cellSelectionInfo.q_RxLevMinOffset );
   //else
-    //LOG_I( RRC, "cellSelectionInfo.q_RxLevMinOffset         : not defined\n" );
-
+  //LOG_I( RRC, "cellSelectionInfo.q_RxLevMinOffset         : not defined\n" );
   //if (sib1->p_Max)
-    //LOG_I( RRC, "p_Max                                      : %ld\n", *sib1->p_Max );
+  //LOG_I( RRC, "p_Max                                      : %ld\n", *sib1->p_Max );
   //else
-    //LOG_I( RRC, "p_Max                                      : not defined\n" );
-
+  //LOG_I( RRC, "p_Max                                      : not defined\n" );
   LOG_I( RRC, "freqBandIndicator                          : %ld\n", sib1_MBMS->freqBandIndicator_r14 );
 
   if (sib1_MBMS->schedulingInfoList_MBMS_r14.list.count > 0) {
@@ -2997,25 +2686,19 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
   }
 
   //if (sib1_MBMS->tdd_Config) {
-    //LOG_I( RRC, "TDD subframeAssignment                     : %ld\n", sib1_MBMS->tdd_Config->subframeAssignment );
-    //LOG_I( RRC, "TDD specialSubframePatterns                : %ld\n", sib1_MBMS->tdd_Config->specialSubframePatterns );
+  //LOG_I( RRC, "TDD subframeAssignment                     : %ld\n", sib1_MBMS->tdd_Config->subframeAssignment );
+  //LOG_I( RRC, "TDD specialSubframePatterns                : %ld\n", sib1_MBMS->tdd_Config->specialSubframePatterns );
   //}
-
   LOG_I( RRC, "siWindowLength                             : %s\n", siWindowLength[min(sib1_MBMS->si_WindowLength_r14,7)] );
   LOG_I( RRC, "systemInfoValueTag                         : %ld\n", sib1_MBMS->systemInfoValueTag_r14 );
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIperiod_MBMS     = siPeriod_int[sib1_MBMS->schedulingInfoList_MBMS_r14.list.array[0]->si_Periodicity_r14];
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIwindowsize_MBMS = siWindowLength_int[sib1_MBMS->si_WindowLength_r14];
-  
-  
   LOG_I( RRC, "[FRAME unknown][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB1-MBMS params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
          ctxt_pP->module_id, eNB_index, ctxt_pP->module_id );
   rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index,
                         (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                         (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                         (LTE_SCellToAddMod_r10_t *)NULL,
-                        //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                         (LTE_MeasObjectToAddMod_t **)NULL,
                         (LTE_MAC_MainConfig_t *)NULL,
                         0,
@@ -3028,100 +2711,83 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
                         NULL,
                         NULL,
                         NULL,
-                        (LTE_MBSFN_SubframeConfigList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                        ,0,
+                        (LTE_MBSFN_SubframeConfigList_t *)NULL,0,
                         (sib1_MBMS->systemInformationBlockType13_r14==NULL?(LTE_MBSFN_AreaInfoList_r9_t *)NULL:&(sib1_MBMS->systemInformationBlockType13_r14)->mbsfn_AreaInfoList_r9),//(LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                        (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                        ,
-                        0,
-                        0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
+                        (LTE_PMCH_InfoList_r9_t *)NULL,
                         0,
                         NULL,
-                        NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (sib1_MBMS->nonMBSFN_SubframeConfig_r14==NULL?(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL:sib1_MBMS->nonMBSFN_SubframeConfig_r14),//(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                        NULL,
+                        0,
+                        (sib1_MBMS->nonMBSFN_SubframeConfig_r14==NULL?(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL:sib1_MBMS->nonMBSFN_SubframeConfig_r14),//(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                        (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                        );
   LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 1;
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag_MBMS = sib1_MBMS->systemInfoValueTag_r14;
 #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
-/*
-  {
-    int cell_valid = 0;
+  /*
+    {
+      int cell_valid = 0;
 
-    if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
-      int plmn;
-      int plmn_number;
-      plmn_number = sib1->cellAccessRelatedInfo.plmn_IdentityList.list.count;
+      if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
+        int plmn;
+        int plmn_number;
+        plmn_number = sib1->cellAccessRelatedInfo.plmn_IdentityList.list.count;
 
-      for (plmn = 0; plmn < plmn_number; plmn++) {
-        LTE_PLMN_Identity_t *plmn_Identity;
-        plmn_Identity = &sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[plmn]->plmn_Identity;
+        for (plmn = 0; plmn < plmn_number; plmn++) {
+          LTE_PLMN_Identity_t *plmn_Identity;
+          plmn_Identity = &sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[plmn]->plmn_Identity;
 
-        if (
-          (
-            (plmn_Identity->mcc == NULL)
-            ||
+          if (
             (
-              (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
-              (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
-              (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
+              (plmn_Identity->mcc == NULL)
+              ||
+              (
+                (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
+                (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
+                (UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
+              )
             )
-          )
-          &&
-          (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
-          &&
-          (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
-          &&
-          (
-            ((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
-            ||
-            (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
-          )
-        ) {
-          MessageDef  *msg_p;
-          msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
-          NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
-          NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
-          NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
-          NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
-          NAS_CELL_SELECTION_CNF (msg_p).rsrq = rsrq;
-          NAS_CELL_SELECTION_CNF (msg_p).rsrp = rsrp;
-          itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
-          cell_valid = 1;
-          break;
+            &&
+            (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
+            &&
+            (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
+            &&
+            (
+              ((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
+              ||
+              (UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
+            )
+          ) {
+            MessageDef  *msg_p;
+            msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_CELL_SELECTION_CNF);
+            NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
+            NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
+            NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
+            NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
+            NAS_CELL_SELECTION_CNF (msg_p).rsrq = rsrq;
+            NAS_CELL_SELECTION_CNF (msg_p).rsrp = rsrp;
+            itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
+            cell_valid = 1;
+            break;
+          }
         }
-      } 
-    }
+      }
 
-    if (cell_valid == 0) {
-      MessageDef  *msg_p;
-      msg_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_NEXT_CELL_REQ);
-      itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
-      LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
+      if (cell_valid == 0) {
+        MessageDef  *msg_p;
+        msg_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_NEXT_CELL_REQ);
+        itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
+        LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
+      }
     }
-  }
-*/
+  */
 #endif
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
   return 0;
 }
 
 
-
-#endif
-
 //-----------------------------------------------------------------------------
 int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t rsrq, const uint8_t rsrp ) {
   LTE_SystemInformationBlockType1_t *sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
@@ -3230,10 +2896,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
   rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index,
                         (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                         (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                         (LTE_SCellToAddMod_r10_t *)NULL,
-                        //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                         (LTE_MeasObjectToAddMod_t **)NULL,
                         (LTE_MAC_MainConfig_t *)NULL,
                         0,
@@ -3246,30 +2909,15 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
                         NULL,
                         NULL,
                         NULL,
-                        (LTE_MBSFN_SubframeConfigList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                        ,0,
+                        (LTE_MBSFN_SubframeConfigList_t *)NULL,0,
                         (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                        (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                        ,
-                        0,
-                        0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
+                        (LTE_PMCH_InfoList_r9_t *)NULL,
                         0,
                         NULL,
-                        NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                        NULL,
+                        0,
+                        (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                        (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                        );
   LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
   UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
@@ -3496,10 +3144,6 @@ void dump_sib2( LTE_SystemInformationBlockType2_t *sib2 ) {
          sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 );
   LOG_I( RRC, "radioResourceConfigCommon.ul_CyclicPrefixLength : %ld\n",
          sib2->radioResourceConfigCommon.ul_CyclicPrefixLength );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
-  // UplinkPowerControlCommon_v1020
-  // ...
-#endif
   LOG_I( RRC, "ue_TimersAndConstants.t300 : %ld\n", sib2->ue_TimersAndConstants.t300 );
   LOG_I( RRC, "ue_TimersAndConstants.t301 : %ld\n", sib2->ue_TimersAndConstants.t301 );
   LOG_I( RRC, "ue_TimersAndConstants.t310 : %ld\n", sib2->ue_TimersAndConstants.t310 );
@@ -3526,16 +3170,12 @@ void dump_sib2( LTE_SystemInformationBlockType2_t *sib2 ) {
     LOG_I( RRC, "mbsfn_SubframeConfigList : not defined\n" );
 
   LOG_I( RRC, "timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 
   if (sib2->lateNonCriticalExtension) {
     LOG_I( RRC, "lateNonCriticalExtension : %p\n", sib2->lateNonCriticalExtension );
   } else
     LOG_I( RRC, "lateNonCriticalExtension : not defined\n" );
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-
   if (sib2->ext1 && sib2->ext1->ssac_BarringForMMTEL_Voice_r9) {
     LOG_I( RRC, "ssac_BarringForMMTEL_Voice_r9->ac_BarringFactor       : %ld\n",
            sib2->ext1->ssac_BarringForMMTEL_Voice_r9->ac_BarringFactor );
@@ -3556,9 +3196,6 @@ void dump_sib2( LTE_SystemInformationBlockType2_t *sib2 ) {
   } else
     LOG_I( RRC, "ssac_BarringForMMTEL_Video_r9 : not defined\n" );
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
   if (sib2->ext2 && sib2->ext2->ac_BarringForCSFB_r10) {
     LOG_I( RRC, "ac_BarringForCSFB_r10->ac_BarringFactor       : %ld\n",
            sib2->ext2->ac_BarringForCSFB_r10->ac_BarringFactor );
@@ -3568,8 +3205,6 @@ void dump_sib2( LTE_SystemInformationBlockType2_t *sib2 ) {
            BIT_STRING_to_uint32(&sib2->ext2->ac_BarringForCSFB_r10->ac_BarringForSpecialAC) );
   } else
     LOG_I( RRC, "ac_BarringForCSFB_r10 : not defined\n" );
-
-#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -3810,8 +3445,6 @@ void dump_sib5( LTE_SystemInformationBlockType5_t *sib5 ) {
       }
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-
     if (ifcfInfo->ext1 && ifcfInfo->ext1->q_QualMin_r9)
       LOG_I(RRC,"   Q_QualMin_r9 : %ld\n",*ifcfInfo->ext1->q_QualMin_r9);
 
@@ -3819,12 +3452,10 @@ void dump_sib5( LTE_SystemInformationBlockType5_t *sib5 ) {
       LOG_I(RRC,"   threshX_HighQ_r9 : %ld\n",ifcfInfo->ext1->threshX_Q_r9->threshX_HighQ_r9);
       LOG_I(RRC,"   threshX_LowQ_r9: %ld\n",ifcfInfo->ext1->threshX_Q_r9->threshX_LowQ_r9);
     }
-
-#endif
   }
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
+
 void dump_sib13( LTE_SystemInformationBlockType13_r9_t *sib13 ) {
   LOG_I( RRC, "[UE] Dumping SIB13\n" );
   LOG_I( RRC, "[UE] dumping sib13 second time\n" );
@@ -3883,28 +3514,25 @@ void dump_sib21(LTE_SystemInformationBlockType21_r14_t *sib21) {
   }
 }
 
+//-----------------------------------------------------------------------------
+int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
+  return 0;
+}
 
-#endif
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 //-----------------------------------------------------------------------------
-int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
-  /*LTE_SystemInformation_t **si = &UE_rrc_inst[ctxt_pP->module_id].si[eNB_index];
+int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
+  LTE_SystemInformation_t **si = &UE_rrc_inst[ctxt_pP->module_id].si[eNB_index];
   int new_sib = 0;
   LTE_SystemInformationBlockType1_t *sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN );
 
   // Dump contents
   if ((*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_systemInformation_r8 ||
-#if (LTE_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
       (*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_criticalExtensionsFuture_r15) {
-#else
-      (*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) {
-#endif
     LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
            (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
-  }
-  else {
+  } else {
     LOG_D( RRC, "[UE] Unknown criticalExtension version (not Rel8)\n" );
     return -1;
   }
@@ -3926,9 +3554,7 @@ int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_inde
           rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index,
                                 &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->radioResourceConfigCommon,
                                 (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                 (LTE_SCellToAddMod_r10_t *)NULL,
-#endif
                                 (LTE_MeasObjectToAddMod_t **)NULL,
                                 (LTE_MAC_MainConfig_t *)NULL,
                                 0,
@@ -3941,39 +3567,22 @@ int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_inde
                                 UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_CarrierFreq,
                                 UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth,
                                 &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.additionalSpectrumEmission,
-                                UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                ,0,
+                                UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->mbsfn_SubframeConfigList,0,
                                 (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
                                 0,
                                 NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                                NULL,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
-          // After SI is received, prepare RRCConnectionRequest
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
+          // After SI is received, prepare RRCConnectionRequest
           if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
-#endif
-#if !(defined(ENABLE_ITTI) && defined(ENABLE_USE_MME))
-            rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
-
-#endif
+            if (EPC_MODE_ENABLED) {
+              rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
+            }
 
           if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
             LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
@@ -4099,7 +3708,6 @@ int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_inde
         }
 
         break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
 
       case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
         if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&2048) == 0) {
@@ -4140,30 +3748,17 @@ int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_inde
                                 (LTE_MBSFN_SubframeConfigList_t *)NULL,
                                 0,
                                 &UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index]->mbsfn_AreaInfoList_r9,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#ifdef CBA
-                                ,0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
                                 0,
                                 NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                                NULL,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
           break;
         }
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
       //SIB18
       case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
         if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) == 0) {
@@ -4223,369 +3818,8 @@ int decode_SI_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_inde
           //TODO
         }
 
-        break;
-#endif
-
-      default:
-        break;
-    }
-  }
-
-  if (new_sib == 1) {
-    UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt++;
-
-    if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt == sib1->schedulingInfoList.list.count)
-      rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_SIB_COMPLETE );
-
-    LOG_I(RRC,"SIStatus %x, SIcnt %d/%d\n",
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus,
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt,
-          sib1->schedulingInfoList.list.count);
-  }
-
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI  , VCD_FUNCTION_OUT);*/
-  return 0;
-}
-
-
-#endif
-
-//-----------------------------------------------------------------------------
-int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
-  LTE_SystemInformation_t **si = &UE_rrc_inst[ctxt_pP->module_id].si[eNB_index];
-  int new_sib = 0;
-  LTE_SystemInformationBlockType1_t *sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN );
-
-  // Dump contents
-  if ((*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_systemInformation_r8 ||
-#if (LTE_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
-      (*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_criticalExtensionsFuture_r15) {
-#else
-      (*si)->criticalExtensions.present == LTE_SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) {
-#endif
-    LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
-           (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
-  } else {
-    LOG_D( RRC, "[UE] Unknown criticalExtension version (not Rel8)\n" );
-    return -1;
-  }
-
-  for (int i=0; i<(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) {
-    struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo;
-    typeandinfo = (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
-
-    switch(typeandinfo->present) {
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&2) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=2;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index], &typeandinfo->choice.sib2, sizeof(LTE_SystemInformationBlockType2_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB2 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib2( UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index] );
-          LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB2 params  eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
-                 ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id );
-          rrc_mac_config_req_ue(ctxt_pP->module_id, 0, eNB_index,
-                                &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->radioResourceConfigCommon,
-                                (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                (LTE_SCellToAddMod_r10_t *)NULL,
-#endif
-                                (LTE_MeasObjectToAddMod_t **)NULL,
-                                (LTE_MAC_MainConfig_t *)NULL,
-                                0,
-                                (struct LTE_LogicalChannelConfig *)NULL,
-                                (LTE_MeasGapConfig_t *)NULL,
-                                (LTE_TDD_Config_t *)NULL,
-                                (LTE_MobilityControlInfo_t *)NULL,
-                                NULL,
-                                NULL,
-                                UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_CarrierFreq,
-                                UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth,
-                                &UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.additionalSpectrumEmission,
-                                UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                ,0,
-                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
-                                0,
-                                NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-                               );
-          // After SI is received, prepare RRCConnectionRequest
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
-          if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
-#endif
-            if (EPC_MODE_ENABLED) {
-              rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
-            }
-
-          if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
-            LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
-            UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_SI_RECEIVED;
-#if ENABLE_RAL
-            {
-              MessageDef                            *message_ral_p = NULL;
-              rrc_ral_system_information_ind_t       ral_si_ind;
-              message_ral_p = itti_alloc_new_message (TASK_RRC_UE, RRC_RAL_SYSTEM_INFORMATION_IND);
-              memset(&ral_si_ind, 0, sizeof(rrc_ral_system_information_ind_t));
-              ral_si_ind.plmn_id.MCCdigit2 = '0';
-              ral_si_ind.plmn_id.MCCdigit1 = '2';
-              ral_si_ind.plmn_id.MNCdigit3 = '0';
-              ral_si_ind.plmn_id.MCCdigit3 = '8';
-              ral_si_ind.plmn_id.MNCdigit2 = '9';
-              ral_si_ind.plmn_id.MNCdigit1 = '9';
-              ral_si_ind.cell_id        = 1;
-              ral_si_ind.dbm            = 0;
-              //ral_si_ind.dbm            = fifo_dump_emos_UE.PHY_measurements->rx_rssi_dBm[eNB_index];
-              // TO DO
-              ral_si_ind.sinr           = 0;
-              //ral_si_ind.sinr           = fifo_dump_emos_UE.PHY_measurements->subband_cqi_dB[eNB_index][phy_vars_ue->lte_frame_parms.nb_antennas_rx][0];
-              // TO DO
-              ral_si_ind.link_data_rate = 0;
-              memcpy (&message_ral_p->ittiMsg, (void *) &ral_si_ind, sizeof(rrc_ral_system_information_ind_t));
-#warning "ue_mod_idP ? for instance ?"
-              itti_send_msg_to_task (TASK_RAL_UE, UE_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), message_ral_p);
-            }
-#endif
-          }
-        }
-
-        break; // case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&4) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=4;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib3[eNB_index], &typeandinfo->choice.sib3, sizeof(LTE_SystemInformationBlockType3_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB3 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib3( UE_rrc_inst[ctxt_pP->module_id].sib3[eNB_index] );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=8;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib4[eNB_index], &typeandinfo->choice.sib4, sizeof(LTE_SystemInformationBlockType4_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB4 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=16;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib5[eNB_index], &typeandinfo->choice.sib5, sizeof(LTE_SystemInformationBlockType5_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB5 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib5(UE_rrc_inst[ctxt_pP->module_id].sib5[eNB_index]);
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&32) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=32;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib6[eNB_index], &typeandinfo->choice.sib6, sizeof(LTE_SystemInformationBlockType6_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB6 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&64) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=64;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib7[eNB_index], &typeandinfo->choice.sib7, sizeof(LTE_SystemInformationBlockType7_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB7 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&128) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=128;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib8[eNB_index], &typeandinfo->choice.sib8, sizeof(LTE_SystemInformationBlockType8_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB8 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&256) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=256;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib9[eNB_index], &typeandinfo->choice.sib9, sizeof(LTE_SystemInformationBlockType9_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB9 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&512) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=512;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib10[eNB_index], &typeandinfo->choice.sib10, sizeof(LTE_SystemInformationBlockType10_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB10 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
         break;
 
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1024) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=1024;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib11[eNB_index], &typeandinfo->choice.sib11, sizeof(LTE_SystemInformationBlockType11_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB11 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&2048) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=2048;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index], &typeandinfo->choice.sib12_v920, sizeof(LTE_SystemInformationBlockType12_r9_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB12 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-        }
-
-        break;
-
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&4096) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=4096;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index], &typeandinfo->choice.sib13_v920, sizeof(LTE_SystemInformationBlockType13_r9_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB13 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib13( UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] );
-          // adding here function to store necessary parameters for using in decode_MCCH_Message + maybe transfer to PHY layer
-          LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB13 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
-                 ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
-          rrc_mac_config_req_ue(ctxt_pP->module_id,0,eNB_index,
-                                (LTE_RadioResourceConfigCommonSIB_t *)NULL,
-                                (struct LTE_PhysicalConfigDedicated *)NULL,
-                                (LTE_SCellToAddMod_r10_t *)NULL,
-                                (LTE_MeasObjectToAddMod_t **)NULL,
-                                (LTE_MAC_MainConfig_t *)NULL,
-                                0,
-                                (struct LTE_LogicalChannelConfig *)NULL,
-                                (LTE_MeasGapConfig_t *)NULL,
-                                (LTE_TDD_Config_t *)NULL,
-                                (LTE_MobilityControlInfo_t *)NULL,
-                                NULL,
-                                NULL,
-                                NULL,
-                                NULL,
-                                NULL,
-                                (LTE_MBSFN_SubframeConfigList_t *)NULL,
-                                0,
-                                &UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index]->mbsfn_AreaInfoList_r9,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#ifdef CBA
-                                ,0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,
-                                0,
-                                NULL,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-                               );
-          break;
-        }
-
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
-      //SIB18
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=8192;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index], &typeandinfo->choice.sib18_v1250, sizeof(LTE_SystemInformationBlockType18_r12_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB18 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib18( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] );
-          // adding here function to store necessary parameters to transfer to PHY layer
-          LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB18 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
-                 ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
-          //process SIB18 to transfer SL-related parameters to PHY
-          rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index,
-              UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index],
-              (LTE_SystemInformationBlockType19_r12_t *)NULL,
-              (LTE_SL_CommConfig_r12_t *)NULL,
-              (LTE_SL_DiscConfig_r12_t *)NULL
-                                                     );
-        }
-
-        break;
-
-      //SIB19
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16384) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=16384;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index], &typeandinfo->choice.sib19_v1250, sizeof(LTE_SystemInformationBlockType19_r12_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB19 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib19( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] );
-          // adding here function to store necessary parameters to transfer to PHY layer
-          LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB19 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
-                 ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
-          //process SIB19 to transfer SL-related parameters to PHY
-          rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index,
-              (LTE_SystemInformationBlockType18_r12_t *)NULL,
-              UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index],
-              (LTE_SL_CommConfig_r12_t *)NULL,
-              (LTE_SL_DiscConfig_r12_t *)NULL
-                                                     );
-        }
-
-        break;
-
-      //SIB21
-      case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430:
-        if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&32768) == 0) {
-          UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=32768;
-          new_sib=1;
-          memcpy( UE_rrc_inst[ctxt_pP->module_id].sib21[eNB_index], &typeandinfo->choice.sib21_v1430, sizeof(LTE_SystemInformationBlockType21_r14_t) );
-          LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB21 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
-          dump_sib21( UE_rrc_inst[ctxt_pP->module_id].sib21[eNB_index] );
-          // adding here function to store necessary parameters to transfer to PHY layer
-          LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB21 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
-                 ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
-          //process SIB21
-          //TODO
-        }
-
-        break;
-#endif
-
       default:
         break;
     }
@@ -4727,11 +3961,7 @@ void rrc_ue_generate_MeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t e
         size = do_MeasurementReport(ctxt_pP->module_id, buffer,measId,targetCellId,rsrp_s,rsrq_s,rsrp_t,rsrq_t);
         LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n",
               ctxt_pP->module_id, ctxt_pP->frame, eNB_index);
-        result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                               ,NULL, NULL
-#endif
-                              );
+        result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
         AssertFatal (result == TRUE, "PDCP data request failed!\n");
         //LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH);
       }
@@ -4916,7 +4146,6 @@ uint8_t check_trigger_meas_event(
   return 0;
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 //-----------------------------------------------------------------------------
 int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t *const Sdu, const uint8_t Sdu_len, const uint8_t mbsfn_sync_area ) {
   LTE_MCCH_Message_t               *mcch=NULL;
@@ -5003,10 +4232,7 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
   rrc_mac_config_req_ue(ue_mod_idP,0,eNB_index,
                         (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                         (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                         (LTE_SCellToAddMod_r10_t *)NULL,
-                        //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                         (LTE_MeasObjectToAddMod_t **)NULL,
                         (LTE_MAC_MainConfig_t *)NULL,
                         0,
@@ -5019,31 +4245,16 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
                         NULL,
                         NULL,
                         NULL,
-                        (LTE_MBSFN_SubframeConfigList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                        ,
+                        (LTE_MBSFN_SubframeConfigList_t *)NULL,
                         0,
                         (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                        &UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9
-#endif
-#ifdef CBA
-                        ,
-                        0,
-                        0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
+                        &UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9,
                         0,
                         NULL,
-                        NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
-
+                        NULL,
+                        0,
+                        (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                        (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                        );
   UE_rrc_inst[ue_mod_idP].Info[eNB_index].MCCHStatus[mbsfn_sync_area] = 1;
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_idP, ENB_FLAG_NO, UE_rrc_inst[ue_mod_idP].Info[eNB_index].rnti, frameP, 0,eNB_index);
@@ -5055,24 +4266,19 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
                            0, // security mode
                            NULL, // key rrc encryption
                            NULL, // key rrc integrity
-                           NULL // key encryption
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                           ,&(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9)
-#endif
-                           ,NULL);
+                           NULL, // key encryption
+                           &(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9),
+                           NULL
+                          );
   rrc_rlc_config_asn1_req(&ctxt,
                           NULL,// SRB_ToAddModList
                           NULL,// DRB_ToAddModList
                           NULL,// DRB_ToReleaseList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                          &(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9)
-                          , 0, 0
-#endif
+                          &(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9), 0, 0
                          );
   // */
 }
 
-#endif // rel10
 
 //-----------------------------------------------------------------------------
 void *rrc_ue_task( void *args_p ) {
@@ -5131,21 +4337,18 @@ void *rrc_ue_task( void *args_p ) {
                                    RRC_MAC_BCCH_DATA_IND (msg_p).rsrp);
         break;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-     case RRC_MAC_BCCH_MBMS_DATA_IND:
+      case RRC_MAC_BCCH_MBMS_DATA_IND:
         LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
               RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).frame, RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index);
         //      PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0);
         PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).frame, 0,RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index);
         decode_BCCH_MBMS_DLSCH_Message (&ctxt,
-                                   RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index,
-                                   RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu,
-                                   RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu_size,
-                                   RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrq,
-                                   RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrp);
+                                        RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).enb_index,
+                                        RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu,
+                                        RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).sdu_size,
+                                        RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrq,
+                                        RRC_MAC_BCCH_MBMS_DATA_IND (msg_p).rsrp);
         break;
-#endif
-
 
       case RRC_MAC_CCCH_DATA_CNF:
         LOG_D(RRC, "[UE %d] Received %s: eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
@@ -5171,7 +4374,6 @@ void *rrc_ue_task( void *args_p ) {
                             srb_info_p,
                             RRC_MAC_CCCH_DATA_IND (msg_p).enb_index);
         break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
       case RRC_MAC_MCCH_DATA_IND:
         LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
@@ -5185,15 +4387,15 @@ void *rrc_ue_task( void *args_p ) {
           RRC_MAC_MCCH_DATA_IND (msg_p).sdu_size,
           RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
         break;
-        /*  //TTN (for D2D)
-          case RRC_MAC_SL_DISCOVERY_DATA_IND:
-             LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
-                   RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).frame, RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).enb_index);
-             PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, M_RNTI, RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).frame, 0,RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).enb_index);
-             //send to ProSeApp
-             break;
-        */
-# endif
+
+      /*  //TTN (for D2D)
+        case RRC_MAC_SL_DISCOVERY_DATA_IND:
+           LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
+                 RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).frame, RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).enb_index);
+           PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, M_RNTI, RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).frame, 0,RRC_MAC_SL_DISCOVERY_DATA_IND (msg_p).enb_index);
+           //send to ProSeApp
+           break;
+      */
 
       /* PDCP messages */
       case RRC_DCCH_DATA_IND:
@@ -5522,8 +4724,8 @@ void *rrc_ue_task( void *args_p ) {
 
 
 
-	
-    
+
+
 
 /*------------------------------------------------------------------------------*/
 void
@@ -5555,20 +4757,16 @@ openair_rrc_top_init_ue(
       UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size;
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active);
 
     for (module_id=0; module_id<NB_UE_INST; module_id++) {
       UE_rrc_inst[module_id].MBMS_flag = (uint8_t)eMBMS_active;
     }
 
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     /* TODO: this is disabled for the moment because the standard UE
      * crashes when calling this function.
      */
     //init_SL_preconfig(&UE_rrc_inst[module_id],0);
-#endif
   } else {
     UE_rrc_inst = NULL;
   }
@@ -5789,6 +4987,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
           } else {
             //SL_DiscConfig_r12__ext2__discTxResourcesPS_r13__setup_PR_NOTHING, /* No components present */
           }
+
           break;
 
         case LTE_SL_DiscConfig_r12__ext2__discTxResourcesPS_r13_PR_release:
@@ -5805,15 +5004,15 @@ rrc_ue_process_sidelink_radioResourceConfig(
   }
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 //-----------------------------------------------------------
 void rrc_control_socket_init() {
   struct sockaddr_in rrc_ctrl_socket_addr;
   int optval; // flag value for setsockopt
   //int n; // message byte size
-
   // create the control socket
   ctrl_sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
+
   if (ctrl_sock_fd == -1) {
     LOG_E(RRC,"[rrc_control_socket_init] :Error opening socket %d (%d:%s)\n", ctrl_sock_fd, errno, strerror(errno));
     exit(EXIT_FAILURE);
@@ -5835,9 +5034,8 @@ void rrc_control_socket_init() {
     exit(1);
   }
 
-   pthread_t rrc_control_socket_thread;
-
-   threadCreate(&rrc_control_socket_thread, rrc_control_socket_thread_fct, NULL, "RRC/ProSeApp", -1, OAI_PRIORITY_RT);
+  pthread_t rrc_control_socket_thread;
+  threadCreate(&rrc_control_socket_thread, rrc_control_socket_thread_fct, NULL, "RRC/ProSeApp", -1, OAI_PRIORITY_RT);
 }
 
 //--------------------------------------------------------
@@ -6000,37 +5198,28 @@ void *rrc_control_socket_thread_fct(void *arg) {
                                  (LTE_SRB_ToAddModList_t *) NULL,
                                  UE->DRB_configList,
                                  (LTE_DRB_ToReleaseList_t *) NULL,
-                                 0xff, NULL, NULL, NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                 , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
+                                 0xff, NULL, NULL, NULL,
+                                 (LTE_PMCH_InfoList_r9_t *) NULL
                                  ,NULL);
         rrc_rlc_config_asn1_req(&ctxt,
                                 (LTE_SRB_ToAddModList_t *)NULL,
                                 UE->DRB_configList,
-                                (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,(LTE_PMCH_InfoList_r9_t *)NULL
+                                (LTE_DRB_ToReleaseList_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL
                                 , 0, 0
-#endif
                                );
         rrc_rlc_config_asn1_req(&ctxt,
                                 (LTE_SRB_ToAddModList_t *)NULL,
                                 UE->DRB_configList,
-                                (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,(LTE_PMCH_InfoList_r9_t *)NULL
-                                , sourceL2Id, groupL2Id
-#endif
+                                (LTE_DRB_ToReleaseList_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
+                                sourceL2Id, groupL2Id
                                );
         //configure MAC with sourceL2Id/groupL2ID
         rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
                               (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                               (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                               (LTE_SCellToAddMod_r10_t *)NULL,
-                              //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                               (LTE_MeasObjectToAddMod_t **)NULL,
                               (LTE_MAC_MainConfig_t *)NULL,
                               3, //LCID
@@ -6043,28 +5232,15 @@ void *rrc_control_socket_thread_fct(void *arg) {
                               NULL,
                               NULL,
                               NULL,
-                              NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                              ,0,
+                              NULL,0,
                               (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                              (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                              ,
-                              0,
-                              0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                              ,CONFIG_ACTION_ADD,
+                              (LTE_PMCH_InfoList_r9_t *)NULL,
+                              CONFIG_ACTION_ADD,
                               &sourceL2Id,
-                              &groupL2Id
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                              &groupL2Id,
+                              0,
+                              (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                              (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                              );
         LOG_I(RRC,"Send GroupCommunicationEstablishResp to ProSe App\n");
         memset(send_buf, 0, BUFSIZE);
@@ -6104,10 +5280,7 @@ void *rrc_control_socket_thread_fct(void *arg) {
         rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
                               (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                               (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                               (LTE_SCellToAddMod_r10_t *)NULL,
-                              //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                               (LTE_MeasObjectToAddMod_t **)NULL,
                               (LTE_MAC_MainConfig_t *)NULL,
                               0,
@@ -6120,28 +5293,15 @@ void *rrc_control_socket_thread_fct(void *arg) {
                               NULL,
                               NULL,
                               NULL,
-                              NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                              ,0,
+                              NULL,0,
                               (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
                               (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                              ,
-                              0,
-                              0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                               ,CONFIG_ACTION_REMOVE,
                               &sourceL2Id,
-                              &destinationL2Id
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                              &destinationL2Id,
+                              0,
+                              (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                              (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                              );
         LOG_I(RRC,"Send GroupCommunicationReleaseResponse to ProSe App \n");
         memset(send_buf, 0, BUFSIZE);
@@ -6243,37 +5403,27 @@ void *rrc_control_socket_thread_fct(void *arg) {
                                  (LTE_SRB_ToAddModList_t *) NULL,
                                  UE->DRB_configList,
                                  (LTE_DRB_ToReleaseList_t *) NULL,
-                                 0xff, NULL, NULL, NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                 , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-                                 ,NULL);
+                                 0xff, NULL, NULL, NULL,
+                                 (LTE_PMCH_InfoList_r9_t *) NULL,NULL);
         rrc_rlc_config_asn1_req(&ctxt,
                                 (LTE_SRB_ToAddModList_t *)NULL,
                                 UE->DRB_configList,
-                                (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,(LTE_PMCH_InfoList_r9_t *)NULL
+                                (LTE_DRB_ToReleaseList_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL
                                 , 0, 0
-#endif
                                );
         rrc_rlc_config_asn1_req(&ctxt,
                                 (LTE_SRB_ToAddModList_t *)NULL,
                                 UE->DRB_configList,
-                                (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                ,(LTE_PMCH_InfoList_r9_t *)NULL
+                                (LTE_DRB_ToReleaseList_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL
                                 , sourceL2Id, destinationL2Id
-#endif
                                );
         //configure MAC with sourceL2Id/destinationL2Id
         rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
                               (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                               (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                               (LTE_SCellToAddMod_r10_t *)NULL,
-                              //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                               (LTE_MeasObjectToAddMod_t **)NULL,
                               (LTE_MAC_MainConfig_t *)NULL,
                               3, //LCID
@@ -6286,28 +5436,15 @@ void *rrc_control_socket_thread_fct(void *arg) {
                               NULL,
                               NULL,
                               NULL,
-                              NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                              ,0,
+                              NULL,0,
                               (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                              (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                              ,
-                              0,
-                              0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                              ,CONFIG_ACTION_ADD,
+                              (LTE_PMCH_InfoList_r9_t *)NULL,
+                              CONFIG_ACTION_ADD,
                               &sourceL2Id,
-                              &destinationL2Id
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                              &destinationL2Id,
+                              0,
+                              (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                              (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                              );
         LOG_I(RRC,"Send DirectCommunicationEstablishResp to ProSe App\n");
         memset(send_buf, 0, BUFSIZE);
@@ -6420,19 +5557,13 @@ void *rrc_control_socket_thread_fct(void *arg) {
                                  (LTE_SRB_ToAddModList_t *) NULL,
                                  UE->DRB_configList,
                                  (LTE_DRB_ToReleaseList_t *) NULL,
-                                 0xff, NULL, NULL, NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                 , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-                                 ,NULL);
+                                 0xff, NULL, NULL, NULL,
+                                 (LTE_PMCH_InfoList_r9_t *) NULL,NULL);
         rrc_rlc_config_asn1_req(&ctxt,
                                 (LTE_SRB_ToAddModList_t *)NULL,
                                 UE->DRB_configList,
-                                (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,(LTE_PMCH_InfoList_r9_t *)NULL
-                                , 0, 0
-#endif
+                                (LTE_DRB_ToReleaseList_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL, 0, 0
                                );
 
         //TX
@@ -6440,20 +5571,15 @@ void *rrc_control_socket_thread_fct(void *arg) {
           rrc_rlc_config_asn1_req(&ctxt,
                                   (LTE_SRB_ToAddModList_t *)NULL,
                                   UE->DRB_configList,
-                                  (LTE_DRB_ToReleaseList_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                  ,(LTE_PMCH_InfoList_r9_t *)NULL
-                                  , sourceL2Id, destinationL2Id
-#endif
+                                  (LTE_DRB_ToReleaseList_t *)NULL,
+                                  (LTE_PMCH_InfoList_r9_t *)NULL,
+                                  sourceL2Id, destinationL2Id
                                  );
           //configure MAC with sourceL2Id/groupL2ID
           rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
                                 (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                                 (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                 (LTE_SCellToAddMod_r10_t *)NULL,
-                                //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                                 (LTE_MeasObjectToAddMod_t **)NULL,
                                 (LTE_MAC_MainConfig_t *)NULL,
                                 10, //LCID
@@ -6466,38 +5592,23 @@ void *rrc_control_socket_thread_fct(void *arg) {
                                 NULL,
                                 NULL,
                                 NULL,
-                                NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,0,
-                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,
+                                NULL,
                                 0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,CONFIG_ACTION_ADD,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
+                                CONFIG_ACTION_ADD,
                                 &sourceL2Id,
-                                &destinationL2Id
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                                &destinationL2Id,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
         } else {//RX
           //configure MAC with sourceL2Id/groupL2ID
           rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
                                 (LTE_RadioResourceConfigCommonSIB_t *)NULL,
                                 (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                 (LTE_SCellToAddMod_r10_t *)NULL,
-                                //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
-#endif
                                 (LTE_MeasObjectToAddMod_t **)NULL,
                                 (LTE_MAC_MainConfig_t *)NULL,
                                 10, //LCID
@@ -6510,28 +5621,15 @@ void *rrc_control_socket_thread_fct(void *arg) {
                                 NULL,
                                 NULL,
                                 NULL,
-                                NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,0,
+                                NULL,0,
                                 (LTE_MBSFN_AreaInfoList_r9_t *)NULL,
-                                (LTE_PMCH_InfoList_r9_t *)NULL
-#endif
-#ifdef CBA
-                                ,
-                                0,
-                                0
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                ,CONFIG_ACTION_ADD,
+                                (LTE_PMCH_InfoList_r9_t *)NULL,
+                                CONFIG_ACTION_ADD,
                                 &sourceL2Id,
-                                NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			 ,
-			 0,
-			 (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
-			 (LTE_MBSFN_AreaInfoList_r9_t *)NULL
-#endif
+                                NULL,
+                                0,
+                                (struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
+                                (LTE_MBSFN_AreaInfoList_r9_t *)NULL
                                );
         }
 
@@ -6615,7 +5713,6 @@ int decode_SL_Discovery_Message(
   return(0);
 }
 
-#endif
 
 //-----------------------------------------------------------------------------
 RRC_status_t
diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h
index 8cb53e577b4029b0029af9be48821c204663b88d..ad51927caa2ada0e4a5fa71890fcf660c822381a 100644
--- a/openair2/RRC/LTE/rrc_defs.h
+++ b/openair2/RRC/LTE/rrc_defs.h
@@ -184,20 +184,15 @@ void *send_UE_status_notification(void *);
 #include "LTE_BCCH-DL-SCH-Message.h"
 #include "LTE_SBCCH-SL-BCH-MessageType.h"
 #include "LTE_BCCH-BCH-Message.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-  #include "LTE_MCCH-Message.h"
-  #include "LTE_MBSFNAreaConfiguration-r9.h"
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-  #include "LTE_SCellToAddMod-r10.h"
-#endif
+#include "LTE_MCCH-Message.h"
+#include "LTE_MBSFNAreaConfiguration-r9.h"
+#include "LTE_SCellToAddMod-r10.h"
 #include "LTE_AS-Config.h"
 #include "LTE_AS-Context.h"
 #include "LTE_UE-EUTRA-Capability.h"
 #include "LTE_MeasResults.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 0, 0))
-  #include "LTE_SidelinkUEInformation-r12.h"
-#endif
+#include "LTE_SidelinkUEInformation-r12.h"
+
 
 /* for ImsiMobileIdentity_t */
 #include "MobileIdentity.h"
@@ -207,68 +202,7 @@ void *send_UE_status_notification(void *);
 /* correct Rel(8|10)/Rel14 differences
  * the code is in favor of Rel14, those defines do the translation
  */
-#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
-  #define CipheringAlgorithm_r12_t e_SecurityAlgorithmConfig__cipheringAlgorithm
-  #define CipheringAlgorithm_r12_eea0 SecurityAlgorithmConfig__cipheringAlgorithm_eea0
-  #define CipheringAlgorithm_r12_eea1 SecurityAlgorithmConfig__cipheringAlgorithm_eea1
-  #define CipheringAlgorithm_r12_eea2 SecurityAlgorithmConfig__cipheringAlgorithm_eea2
-  #define CipheringAlgorithm_r12_spare1 SecurityAlgorithmConfig__cipheringAlgorithm_spare1
-  #define Alpha_r12_al0 UplinkPowerControlCommon__alpha_al0
-  #define Alpha_r12_al04 UplinkPowerControlCommon__alpha_al04
-  #define Alpha_r12_al05 UplinkPowerControlCommon__alpha_al05
-  #define Alpha_r12_al06 UplinkPowerControlCommon__alpha_al06
-  #define Alpha_r12_al07 UplinkPowerControlCommon__alpha_al07
-  #define Alpha_r12_al08 UplinkPowerControlCommon__alpha_al08
-  #define Alpha_r12_al09 UplinkPowerControlCommon__alpha_al09
-  #define Alpha_r12_al1 UplinkPowerControlCommon__alpha_al1
-  #define PreambleTransMax_n3 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3
-  #define PreambleTransMax_n4 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4
-  #define PreambleTransMax_n5 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5
-  #define PreambleTransMax_n6 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6
-  #define PreambleTransMax_n7 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7
-  #define PreambleTransMax_n8 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8
-  #define PreambleTransMax_n10 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10
-  #define PreambleTransMax_n20 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20
-  #define PreambleTransMax_n50 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50
-  #define PreambleTransMax_n100 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100
-  #define PreambleTransMax_n200 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200
-  #define PeriodicBSR_Timer_r12_sf5 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf5
-  #define PeriodicBSR_Timer_r12_sf10 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf10
-  #define PeriodicBSR_Timer_r12_sf16 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf16
-  #define PeriodicBSR_Timer_r12_sf20 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf20
-  #define PeriodicBSR_Timer_r12_sf32 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf32
-  #define PeriodicBSR_Timer_r12_sf40 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf40
-  #define PeriodicBSR_Timer_r12_sf64 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64
-  #define PeriodicBSR_Timer_r12_sf80 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf80
-  #define PeriodicBSR_Timer_r12_sf128 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf128
-  #define PeriodicBSR_Timer_r12_sf160 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf160
-  #define PeriodicBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf320
-  #define PeriodicBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf640
-  #define PeriodicBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf1280
-  #define PeriodicBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf2560
-  #define PeriodicBSR_Timer_r12_infinity MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
-  #define RetxBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320
-  #define RetxBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf640
-  #define RetxBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf1280
-  #define RetxBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560
-  #define RetxBSR_Timer_r12_sf5120 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf5120
-  #define RetxBSR_Timer_r12_sf10240 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240
-#endif
 
-// This corrects something generated by asn1c which is different between Rel8 and Rel10
-#if (LTE_RRC_VERSION <= MAKE_VERSION(10, 0, 0))
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib4
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib5
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib6
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib7
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib8
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib9
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10
-  #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
-#endif
 
 
 #define NB_SIG_CNX_CH 1
@@ -276,13 +210,6 @@ void *send_UE_status_notification(void *);
 #define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
 #define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
 
-/*
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
-#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
-#endif
-*/
-//#include "L3_rrc_defs.h"
 #ifndef NO_RRM
   #include "L3_rrc_interface.h"
   #include "rrc_rrm_msg.h"
@@ -419,25 +346,16 @@ typedef struct UE_RRC_INFO_s {
   uint8_t SIB1systemInfoValueTag;
   uint32_t SIStatus;
   uint32_t SIcnt;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t SIB1systemInfoValueTag_MBMS;
   uint32_t SIStatus_MBMS;
   uint32_t SIcnt_MBMS;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
-#endif
   uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t SIwindowsize_MBMS; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
-#endif
-
   uint8_t handoverTarget;
   HO_STATE_t ho_state;
   uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint16_t SIperiod_MBMS; //!< Corresponds to the SIB1-MBMS si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120 TODO
-#endif
   unsigned short UE_index;
   uint32_t T300_active;
   uint32_t T300_cnt;
@@ -621,9 +539,7 @@ typedef struct rrc_gummei_s {
 
 typedef struct eNB_RRC_UE_s {
   uint8_t                            primaryCC_id;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   LTE_SCellToAddMod_r10_t            sCell_config[2];
-#endif
   LTE_SRB_ToAddModList_t            *SRB_configList;
   LTE_SRB_ToAddModList_t            *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
   LTE_DRB_ToAddModList_t            *DRB_configList;
@@ -755,7 +671,6 @@ typedef struct {
   uint8_t                           sizeof_SIB1;
   uint8_t                           *SIB23;
   uint8_t                           sizeof_SIB23;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t                           *SIB1_BR;
   uint8_t                           sizeof_SIB1_BR;
   uint8_t                           *SIB23_BR;
@@ -764,7 +679,6 @@ typedef struct {
   uint8_t                           sizeof_MIB_FeMBMS;
   uint8_t                           *SIB1_MBMS;
   uint8_t                           sizeof_SIB1_MBMS;
-#endif
   int                                   physCellId;
   int                                   Ncp;
   int                                   p_eNB;
@@ -780,23 +694,17 @@ typedef struct {
   LTE_BCCH_DL_SCH_Message_t             *siblock1_DU;
   LTE_BCCH_DL_SCH_Message_t             systemInformation;
   LTE_BCCH_DL_SCH_Message_t             systemInformation_BR;
-  //  SystemInformation_t               systemInformation;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_BCCH_BCH_Message_MBMS_t            mib_fembms;
   LTE_BCCH_DL_SCH_Message_MBMS_t         siblock1_MBMS;
   LTE_BCCH_DL_SCH_Message_MBMS_t         systemInformation_MBMS;
-#endif
   LTE_SystemInformationBlockType1_t     *sib1;
   LTE_SystemInformationBlockType2_t     *sib2;
   LTE_SystemInformationBlockType3_t     *sib3;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_SystemInformationBlockType1_t     *sib1_BR;
   LTE_SystemInformationBlockType2_t     *sib2_BR;
   LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS;
   LTE_SystemInformationBlockType13_r9_t *sib13_MBMS;
-  uint8_t				FeMBMS_flag;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
+  uint8_t       FeMBMS_flag;
   LTE_SystemInformationBlockType13_r9_t *sib13;
   uint8_t                           MBMS_flag;
   uint8_t                           num_mbsfn_sync_area;
@@ -805,7 +713,6 @@ typedef struct {
   LTE_MCCH_Message_t                mcch;
   LTE_MBSFNAreaConfiguration_r9_t  *mcch_message;
   SRB_INFO                          MCCH_MESS[8];// MAX_MBSFN_AREA
-#endif
   //TTN - SIB 18,19,21 for D2D
   LTE_SystemInformationBlockType18_r12_t *sib18;
   LTE_SystemInformationBlockType19_r12_t *sib19;
@@ -816,7 +723,7 @@ typedef struct {
   uint32_t                           sizeof_paging[MAX_MOBILES_PER_ENB];
 } rrc_eNB_carrier_data_t;
 
-  
+
 typedef struct eNB_RRC_INST_s {
   /// southbound midhaul configuration
   ngran_node_t                    node_type;
@@ -898,22 +805,16 @@ typedef struct UE_RRC_INST_s {
   uint8_t sizeof_SI[NB_CNX_UE];
   uint8_t SIB1Status[NB_CNX_UE];
   uint8_t SIStatus[NB_CNX_UE];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   uint8_t *SIB1_MBMS[NB_CNX_UE];
   uint8_t sizeof_SIB1_MBMS[NB_CNX_UE];
   uint8_t *SI_MBMS[NB_CNX_UE];
   uint8_t sizeof_SI_MBMS[NB_CNX_UE];
   uint8_t SIB1Status_MBMS[NB_CNX_UE];
   uint8_t SIStatus_MBMS[NB_CNX_UE];
-#endif
   LTE_SystemInformationBlockType1_t *sib1[NB_CNX_UE];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_MBMS[NB_CNX_UE];
-#endif
   LTE_SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_SystemInformation_MBMS_r14_t *si_MBMS[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
-#endif
   LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
   LTE_SystemInformationBlockType3_t *sib3[NB_CNX_UE];
   LTE_SystemInformationBlockType4_t *sib4[NB_CNX_UE];
@@ -925,7 +826,6 @@ typedef struct UE_RRC_INST_s {
   LTE_SystemInformationBlockType10_t *sib10[NB_CNX_UE];
   LTE_SystemInformationBlockType11_t *sib11[NB_CNX_UE];
   uint8_t                           *MIB;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   //SIB18
   LTE_SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE];
   LTE_SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE];
@@ -944,9 +844,6 @@ typedef struct UE_RRC_INST_s {
   uint32_t destinationList[MAX_NUM_DEST];
   //sl_discovery..
   SRB_INFO SL_Discovery[NB_CNX_UE];
-#endif
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   uint8_t MBMS_flag;
   uint8_t *MCCH_MESSAGE[NB_CNX_UE];
   uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
@@ -954,15 +851,8 @@ typedef struct UE_RRC_INST_s {
   LTE_MBSFNAreaConfiguration_r9_t       *mcch_message[NB_CNX_UE];
   LTE_SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
   LTE_SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   LTE_SystemInformationBlockType13_r9_t *sib13_MBMS[NB_CNX_UE];
-  uint8_t 			  	FeMBMS_flag;
-#endif
-#ifdef CBA
-  uint8_t                         num_active_cba_groups;
-  uint16_t                        cba_rnti[NUM_MAX_CBA_GROUP];
-#endif
+  uint8_t           FeMBMS_flag;
   uint8_t                         num_srb;
   struct LTE_SRB_ToAddMod         *SRB1_config[NB_CNX_UE];
   struct LTE_SRB_ToAddMod         *SRB2_config[NB_CNX_UE];
@@ -994,11 +884,8 @@ typedef struct UE_RRC_INST_s {
   /* Used integrity/ciphering algorithms */
   LTE_CipheringAlgorithm_r12_t                          ciphering_algorithm;
   e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   /// Used for Sidelink Preconfiguration
   LTE_DRB_ToAddModList_t *DRB_configList;
-#endif
 } UE_RRC_INST;
 
 typedef struct UE_PF_PO_s {
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index 2c4dea77af82a8eb8f46a630530a2c0593e5afeb..3751f2ddfb3a3d0ec3fd4c866c010d454e50f162 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -62,20 +62,17 @@
 #include "LTE_SL-CommConfig-r12.h"
 #include "LTE_PeriodicBSR-Timer-r12.h"
 #include "LTE_RetxBSR-Timer-r12.h"
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-   #include "LTE_BCCH-BCH-Message-MBMS.h"
-   #include "LTE_BCCH-DL-SCH-Message-MBMS.h"
-   #include "LTE_SystemInformationBlockType1-MBMS-r14.h"
-   #include "LTE_NonMBSFN-SubframeConfig-r14.h"
-#endif
+
+#include "LTE_BCCH-BCH-Message-MBMS.h"
+#include "LTE_BCCH-DL-SCH-Message-MBMS.h"
+#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
+#include "LTE_NonMBSFN-SubframeConfig-r14.h"
+
 #include "common/utils/LOG/vcd_signal_dumper.h"
 #include "x2ap_eNB.h"
 
 #include "T.h"
-
-//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 #include "LTE_MeasResults.h"
-//#endif
 
 #include "RRC/NAS/nas_config.h"
 #include "RRC/NAS/rb_config.h"
@@ -114,7 +111,7 @@ mui_t                               rrc_eNB_mui = 0;
 extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
 extern int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, security_capabilities_t *security_capabilities_pP);
 extern void process_eNB_security_key (const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t *security_key_pP);
-extern int derive_keNB_star(const uint8_t *kenb_32, const uint16_t pci, const uint32_t earfcn_dl, const bool is_rel8_only, uint8_t * kenb_star);
+extern int derive_keNB_star(const uint8_t *kenb_32, const uint16_t pci, const uint32_t earfcn_dl, const bool is_rel8_only, uint8_t *kenb_star);
 
 pthread_mutex_t      rrc_release_freelist;
 RRC_release_list_t   rrc_release_info;
@@ -145,119 +142,106 @@ init_SI(
 )
 //-----------------------------------------------------------------------------
 {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   int                                 i;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0))
   LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL;
-#endif
   LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE){
-  LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
-        (int)configuration->N_RB_DL[CC_id]);
-  RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
-  do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
+  if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
+    LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
+          (int)configuration->N_RB_DL[CC_id]);
+    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
+    do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
 #ifdef ENABLE_ITTI
-         configuration->N_RB_DL[CC_id],
-         0 //additionalNonMBSFN
+                  configuration->N_RB_DL[CC_id],
+                  0 //additionalNonMBSFN
 #else
-         50,0
-#endif
-         ,0);
-  RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
-  RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
-  AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
-              PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
-  RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
+                  50,0
+#endif
+                  ,0);
+    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
+    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
+    AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
+                PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
+    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
 #if defined(ENABLE_ITTI)
-      , configuration
+        , configuration
 #endif
-									     );
-
- LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB1-MBMS\n",
+                                                                              );
+    LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB1-MBMS\n",
           PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
-	);
-   LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS freqBandIndicator_r14 %ld\n",
+         );
+    LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS freqBandIndicator_r14 %ld\n",
           PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
-		RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->freqBandIndicator_r14
-	);
+          RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->freqBandIndicator_r14
+         );
 
-   for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count; i++) {
-   	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS contents for Scheduling Info List %d/%d(partial)\n",
+    for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count; i++) {
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS contents for Scheduling Info List %d/%d(partial)\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             i,
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->schedulingInfoList_MBMS_r14.list.count);
-   }
-   LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN subframe allocation (partial)\n",
+    }
+
+    LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN subframe allocation (partial)\n",
           PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)
-	);
+         );
 
     for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count; i++) {
-	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN sync area %d/%d (partial)\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13-r14 contents for MBSFN sync area %d/%d (partial)\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             i,
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.count);
-	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Repetition Period: %ld (just index number, not real value)\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Repetition Period: %ld (just index number, not real value)\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
-        LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Offset: %ld\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Offset: %ld\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
-        LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Modification Period: %ld\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Modification Period: %ld\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_ModificationPeriod_r9);
-        LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Signalling MCS: %ld\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS MCCH Signalling MCS: %ld\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.signallingMCS_r9);
-	//LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13 sf_AllocInfo is = %x\n",
-        //    PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
-        //    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.sf_AllocInfo_r9.buf);
+      //LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS SIB13 sf_AllocInfo is = %x\n",
+      //    PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
+      //    RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.sf_AllocInfo_r9.buf);
 
-        if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1) {
-	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS Subcarrier Spacing MBMS: %s\n",
-            PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
-            (*RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1->subcarrierSpacingMBMS_r14 == LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25 ? "khz_1dot25": "khz_7dot5"));
-        }
+      if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1) {
+        LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS Subcarrier Spacing MBMS: %s\n",
+              PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
+              (*RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9.list.array[i]->ext1->subcarrierSpacingMBMS_r14 ==
+               LTE_MBSFN_AreaInfo_r9__ext1__subcarrierSpacingMBMS_r14_khz_1dot25 ? "khz_1dot25": "khz_7dot5"));
+      }
     }
 
-
-
     if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14) {
-    	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationPeriod-r14 %ld\n",
-          PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
-		RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14
-	);
- 	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationOffset-r14 %ld\n",
-          PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
-		RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14
-	);
-	LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config subframeAllocation-r14 is = %s\n",
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationPeriod-r14 %ld\n",
+            PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
+            RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14
+           );
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config radioFrameAllocationOffset-r14 %ld\n",
+            PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
+            RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14
+           );
+      LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB1-MBMS non MBSFN Subframe Config subframeAllocation-r14 is = %s\n",
             PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
             RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf);
-
-
-
     }
 
-
-  //AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
-}
-#endif
+    //AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
+  }
 
   eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
   rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
-
-  carrier->MIB = (uint8_t*) malloc16(4);
+  carrier->MIB = (uint8_t *) malloc16(4);
   carrier->sizeof_SIB1 = 0;
   carrier->sizeof_SIB23 = 0;
-  carrier->SIB1 = (uint8_t*) malloc16(32);
-  
+  carrier->SIB1 = (uint8_t *) malloc16(32);
   AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
-	      PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
-
+              PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
   LOG_I(RRC,"[eNB %d] Node type %d \n ", ctxt_pP->module_id, rrc->node_type);
+
   if (NODE_IS_DU(rrc->node_type) || NODE_IS_MONOLITHIC(rrc->node_type)) {
     // copy basic Cell parameters
     carrier->physCellId      = configuration->Nid_cell[CC_id];
@@ -267,74 +251,54 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
     carrier->ul_CarrierFreq  = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
     carrier->eutra_band      = configuration->eutra_band[CC_id];
     carrier->N_RB_DL         = configuration->N_RB_DL[CC_id];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     carrier->pbch_repetition = configuration->pbch_repetition[CC_id];
     LOG_I(RRC, "configuration->schedulingInfoSIB1_BR_r13[CC_id] %d\n",(int)configuration->schedulingInfoSIB1_BR_r13[CC_id]);
-#endif
-
-    LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n", 
-	  (int)configuration->N_RB_DL[CC_id],
-	  (int)configuration->radioresourceconfig[CC_id].phich_resource,
-	  (int)configuration->radioresourceconfig[CC_id].phich_duration);
-
+    LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
+          (int)configuration->N_RB_DL[CC_id],
+          (int)configuration->radioresourceconfig[CC_id].phich_resource,
+          (int)configuration->radioresourceconfig[CC_id].phich_duration);
     carrier->sizeof_MIB = do_MIB(&rrc->carrier[CC_id],
                                  configuration->N_RB_DL[CC_id],
                                  configuration->radioresourceconfig[CC_id].phich_resource,
                                  configuration->radioresourceconfig[CC_id].phich_duration,
-                                 0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                 ,configuration->schedulingInfoSIB1_BR_r13[CC_id]
-#endif
-   );
-    
-    
+                                 0,
+                                 configuration->schedulingInfoSIB1_BR_r13[CC_id]
+                                );
     carrier->sizeof_SIB1 = do_SIB1(&rrc->carrier[CC_id],
                                    ctxt_pP->module_id,
-                                   CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                   ,FALSE
-#endif
-                                   , configuration
-				   );
-    
+                                   CC_id,
+                                   FALSE,
+                                   configuration
+                                  );
     AssertFatal(carrier->sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = 0;
 
     if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) {
       RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32);
       RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
-                                                                          ctxt_pP->module_id,
-                                                                          CC_id, TRUE, configuration);
+          ctxt_pP->module_id,
+          CC_id, TRUE, configuration);
     }
-#endif
-
   }
+
   if (!NODE_IS_DU(rrc->node_type)) {
-    carrier->SIB23 = (uint8_t*) malloc16(64);
+    carrier->SIB23 = (uint8_t *) malloc16(64);
     AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB");
     carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id,
-                                     CC_id
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                     ,FALSE
-#endif
-                                     , configuration
-                                     );
-    
+                                     CC_id,
+                                     FALSE,
+                                     configuration
+                                    );
     LOG_I(RRC,"do_SIB23, size %d \n ", carrier->sizeof_SIB23);
-    
     AssertFatal(carrier->sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255");
-    
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  carrier->sizeof_SIB23_BR = 0;
-  if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) {
-    carrier->SIB23_BR = (uint8_t*) malloc16(64);
-    AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB");
-    carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration);
-  }
-    
-#endif
+    carrier->sizeof_SIB23_BR = 0;
+
+    if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) {
+      carrier->SIB23_BR = (uint8_t *) malloc16(64);
+      AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB");
+      carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration);
+    }
+
     LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
           PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
     LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.n_SB = %ld\n",
@@ -361,13 +325,11 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
     LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.cyclicShift  = %ld\n",
           PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
           carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
-    
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-    
+
     if (carrier->MBMS_flag > 0) {
       for (i = 0; i < carrier->sib2->mbsfn_SubframeConfigList->list.count; i++) {
-	// SIB 2
-	//   LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
+        // SIB 2
+        //   LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
         LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n",
               PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
               i,
@@ -382,7 +344,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
               PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
               carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
       }
-      
+
       //   SIB13
       for (i = 0; i < carrier->sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
         LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/%d (partial)\n",
@@ -397,7 +359,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
               carrier->sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
       }
     } else memset((void *)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13,0,sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13));
-    
+
     //TTN - SIB 18
     if (configuration->SL_configured > 0) {
       for (int j = 0; j < carrier->sib18->commConfig_r12->commRxPool_r12.list.count; j++) {
@@ -430,7 +392,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
               PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
               carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
       }
-      
+
       //TTN - SIB 19
       for (int j = 0; j < carrier->sib19->discConfig_r12->discRxPool_r12.list.count; j++) {
         LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB19 %d/%d \n",
@@ -466,17 +428,15 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
               carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
       }
     }
-#endif // (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))    
   }
-   
+
   LOG_D(RRC,
         PROTOCOL_RRC_CTXT_FMT" RRC_UE --- MAC_CONFIG_REQ (SIB1.tdd & SIB2 params) ---> MAC_UE\n",
         PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
 
   // LTE-M stuff here (take out CU-DU for now)
   if (NODE_IS_MONOLITHIC(rrc->node_type)) {
-    if ((carrier->mib.message.schedulingInfoSIB1_BR_r13>0) && 
+    if ((carrier->mib.message.schedulingInfoSIB1_BR_r13>0) &&
         (carrier->sib1_BR!=NULL)) {
       AssertFatal(carrier->sib1_BR->nonCriticalExtension!=NULL,
                   "sib2_br->nonCriticalExtension is null (v8.9)\n");
@@ -488,97 +448,36 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
                   "sib2_br->nonCriticalExtension is null (v12.5)\n");
       AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL,
                   "sib2_br->nonCriticalExtension is null (v13.10)\n");
-
       sib1_v13ext = carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension;
-
       // Basic Asserts for CE_level0 PRACH configuration
       LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR = &carrier[CC_id].sib2_BR->radioResourceConfigCommon;
       struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach=radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
-      LTE_PRACH_ParametersListCE_r13_t	 *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
+      LTE_PRACH_ParametersListCE_r13_t   *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
       AssertFatal(prach_ParametersListCE_r13->list.count>0,"prach_ParametersListCE_r13 is empty\n");
-                  LTE_PRACH_ParametersCE_r13_t *p = prach_ParametersListCE_r13->list.array[0];
+      LTE_PRACH_ParametersCE_r13_t *p = prach_ParametersListCE_r13->list.array[0];
       AssertFatal(p->prach_StartingSubframe_r13 != NULL, "prach_StartingSubframe_r13 celevel0 is null\n");
       AssertFatal((1<<p->numRepetitionPerPreambleAttempt_r13)<=(2<<*p->prach_StartingSubframe_r13),
                   "prachce0->numReptitionPerPreambleAttempt_r13 %d > prach_StartingSubframe_r13 %d\n",
                   1<<p->numRepetitionPerPreambleAttempt_r13,
                   2<<*p->prach_StartingSubframe_r13);
     }
-  
-  }
-#endif
-  /*
-  if (rrc->node_type == ngran_eNB_DU) {
-    LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB_DU\n");
-    
-    rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
-			   carrier->physCellId,
-			   carrier->p_eNB,
-			   carrier->Ncp,
-			   carrier->sib1->freqBandIndicator,
-			   carrier->dl_CarrierFreq,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			   carrier->pbch_repetition,
-#endif
-			   0, // rnti
-			   (BCCH_BCH_Message_t *)
-			   &carrier->mib,
-			   (RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			   (RadioResourceConfigCommonSIB_t *) NULL,
-#endif
-			   (struct PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-			   (SCellToAddMod_r10_t *)NULL,
-			   //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
-			   (MeasObjectToAddMod_t **) NULL,
-			   (MAC_MainConfig_t *) NULL, 0,
-			   (struct LogicalChannelConfig *)NULL,
-			   (MeasGapConfig_t *) NULL,
-			   carrier->sib1->tdd_Config,
-			   NULL,
-			   &carrier->sib1->schedulingInfoList,
-			   carrier->ul_CarrierFreq,
-			   NULL,
-			   NULL,
-			   NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-			   ,
-			   carrier->MBMS_flag,
-			   NULL,
-			   (PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-			   , 
-			   NULL
-#endif
-			   );
   }
-  else 
-  */
+
   if (NODE_IS_MONOLITHIC(rrc->node_type)) {
     LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB\n");
-    
     rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
                            carrier->physCellId,
                            carrier->p_eNB,
                            carrier->Ncp,
                            carrier->sib1->freqBandIndicator,
                            carrier->dl_CarrierFreq,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                            carrier->pbch_repetition,
-#endif
                            0, // rnti
                            (LTE_BCCH_BCH_Message_t *) &carrier->mib,
                            (LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                            (LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2_BR->radioResourceConfigCommon,
-#endif
                            (struct LTE_PhysicalConfigDedicated *)NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                            (LTE_SCellToAddMod_r10_t *)NULL,
-                           //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
                            (LTE_MeasObjectToAddMod_t **) NULL,
                            (LTE_MAC_MainConfig_t *) NULL, 0,
                            (struct LTE_LogicalChannelConfig *)NULL,
@@ -589,36 +488,27 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
                            carrier->ul_CarrierFreq,
                            carrier->sib2->freqInfo.ul_Bandwidth,
                            &carrier->sib2->freqInfo.additionalSpectrumEmission,
-                           (LTE_MBSFN_SubframeConfigList_t*) carrier->sib2->mbsfn_SubframeConfigList
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                           ,
+                           (LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
                            carrier->MBMS_flag,
-                           (LTE_MBSFN_AreaInfoList_r9_t*) & carrier->sib13->mbsfn_AreaInfoList_r9,
-                           (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                           ,
-                           sib1_v13ext
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-                        );
+                           (LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
+                           (LTE_PMCH_InfoList_r9_t *) NULL,
+                           sib1_v13ext,
+                           RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
+                           (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                           (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                           (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                           (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                           (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                          );
   }
-	/* set flag to indicate that cell information is configured. This is required
-	 * in DU to trigger F1AP_SETUP procedure */
+
+  /* set flag to indicate that cell information is configured. This is required
+   * in DU to trigger F1AP_SETUP procedure */
   pthread_mutex_lock(&rrc->cell_info_mutex);
   rrc->cell_info_configured=1;
   pthread_mutex_unlock(&rrc->cell_info_mutex);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 /*------------------------------------------------------------------------------*/
 static void
 init_MCCH(
@@ -630,7 +520,6 @@ init_MCCH(
   int                                 sync_area = 0;
   // initialize RRC_eNB_INST MCCH entry
   eNB_RRC_INST *rrc = RC.rrc[enb_mod_idP];
-
   RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
     malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
 
@@ -669,19 +558,13 @@ init_MCCH(
   //  LOG_I(RRC, "DUY: session ID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->sessionId_r9->buf[0]);
   if (NODE_IS_MONOLITHIC(rrc->node_type)) {
     rrc_mac_config_req_eNB(enb_mod_idP, CC_id,
-                           0,0,0,0,0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                           0,
-#endif
-                           0,//rnti
+                           0,0,0,0,0, 0, 0,//rnti
                            (LTE_BCCH_BCH_Message_t *)NULL,
                            (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                            (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
                            (struct LTE_PhysicalConfigDedicated *)NULL,
                            (LTE_SCellToAddMod_r10_t *)NULL,
-                         //(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
+                           //(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
                            (LTE_MeasObjectToAddMod_t **) NULL,
                            (LTE_MAC_MainConfig_t *) NULL,
                            0,
@@ -690,26 +573,19 @@ init_MCCH(
                            (LTE_TDD_Config_t *) NULL,
                            (LTE_MobilityControlInfo_t *)NULL,
                            (LTE_SchedulingInfoList_t *) NULL,
-                           0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
-                           ,
-                           0,
+                           0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL, 0,
                            (LTE_MBSFN_AreaInfoList_r9_t *) NULL,
-                           (LTE_PMCH_InfoList_r9_t *) & (RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                           ,
-                           (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-                        );
+                           (LTE_PMCH_InfoList_r9_t *) & (RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),
+                           (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+                           0,
+                           (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                           (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                           (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                           (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                           (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                          );
   }
+
   //LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9);
 }
 
@@ -738,22 +614,19 @@ static void init_MBMS(
                              NULL   // key encryption
                              , &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
                              ,NULL);
-    
+
     if (!NODE_IS_CU(RC.rrc[enb_mod_idP]->node_type)) {
       rrc_rlc_config_asn1_req(&ctxt,
                               NULL, // LTE_SRB_ToAddModList
                               NULL,   // LTE_DRB_ToAddModList
                               NULL,   // DRB_ToReleaseList
-                              &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-			      ,0, 0
-#endif
-			      );
+                              &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),0, 0
+                             );
     }
-	    //rrc_mac_config_req();
+
+    //rrc_mac_config_req();
   }
 }
-#endif
 
 //-----------------------------------------------------------------------------
 uint8_t
@@ -885,6 +758,7 @@ rrc_eNB_get_next_free_ue_context(
           PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
     return NULL;
   }
+
   return(ue_context_p);
 }
 
@@ -901,10 +775,8 @@ rrc_eNB_free_mem_UE_context(
         PROTOCOL_RRC_CTXT_UE_FMT" Clearing UE context 0x%p (free internal structs)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
         ue_context_pP);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_LTE_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[0]);
   ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_LTE_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[1]);
-#endif
 
   if (ue_context_pP->ue_context.SRB_configList) {
     ASN_STRUCT_FREE(asn_DEF_LTE_SRB_ToAddModList, ue_context_pP->ue_context.SRB_configList);
@@ -988,9 +860,11 @@ rrc_eNB_free_mem_UE_context(
         free(ue_context_pP->ue_context.measurement_info->events->a3_event);
         ue_context_pP->ue_context.measurement_info->events->a3_event = NULL;
       }
+
       free(ue_context_pP->ue_context.measurement_info->events);
       ue_context_pP->ue_context.measurement_info->events = NULL;
     }
+
     free(ue_context_pP->ue_context.measurement_info);
     ue_context_pP->ue_context.measurement_info = NULL;
   }
@@ -1054,16 +928,16 @@ rrc_eNB_free_UE(
     return;
   }
 
-   if(EPC_MODE_ENABLED) {
-     if (!NODE_IS_DU(RC.rrc[enb_mod_idP]->node_type)) {
-       if((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
-         LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n",
-               enb_mod_idP,
-               rnti);
-         rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP,
-                                                  ue_context_pP,
-                                                  S1AP_CAUSE_RADIO_NETWORK,
-                                                  21); // send cause 21: radio connection with ue lost
+  if(EPC_MODE_ENABLED) {
+    if (!NODE_IS_DU(RC.rrc[enb_mod_idP]->node_type)) {
+      if((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
+        LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n",
+              enb_mod_idP,
+              rnti);
+        rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP,
+            ue_context_pP,
+            S1AP_CAUSE_RADIO_NETWORK,
+            21); // send cause 21: radio connection with ue lost
         /* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
          * If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
          *  triggering the S1 UE Context Release Request procedure in order to allow the UE to perform the NAS recovery
@@ -1079,9 +953,9 @@ rrc_eNB_free_UE(
               enb_mod_idP,
               rnti);
         rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP,
-                                                 ue_context_pP,
-                                                 S1AP_CAUSE_RADIO_NETWORK,
-                                                 20); // send cause 20: user inactivity
+            ue_context_pP,
+            S1AP_CAUSE_RADIO_NETWORK,
+            20); // send cause 20: user inactivity
         return;
       }
     }
@@ -1160,6 +1034,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
 
         for (i=0; i<MAX_MOBILES_PER_ENB; i++) {
           ulsch = eNB_PHY->ulsch[i];
+
           if((ulsch != NULL) && (ulsch->rnti == rnti)) {
             void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
             LOG_I(RRC, "clean_eNb_ulsch ulsch[%d] UE %x\n", i, rnti);
@@ -1167,13 +1042,16 @@ void release_UE_in_freeList(module_id_t mod_id) {
           }
 
           dlsch = eNB_PHY->dlsch[i][0];
+
           if((dlsch != NULL) && (dlsch->rnti == rnti)) {
             void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
             LOG_I(RRC, "clean_eNb_dlsch dlsch[%d] UE %x \n", i, rnti);
             clean_eNb_dlsch(dlsch);
           }
         }
+
         ulsch = eNB_PHY->ulsch[i];
+
         if((ulsch != NULL) && (ulsch->rnti == rnti)) {
           void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
           LOG_I(RRC, "clean_eNb_ulsch ulsch[%d] UE %x\n", i, rnti);
@@ -1189,7 +1067,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
 
         if (flexran_agent_get_rrc_xface(mod_id)) {
           flexran_agent_get_rrc_xface(mod_id)->flexran_agent_notify_ue_state_change(
-              mod_id, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
+            mod_id, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
         }
 
         for(j = 0; j < 10; j++) {
@@ -1221,8 +1099,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
         rrc_mac_remove_ue(mod_id,rnti);
         rrc_rlc_remove_ue(&ctxt);
         pdcp_remove_UE(&ctxt);
-      }
-      else {
+      } else {
         MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
         F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = rnti;
         F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
@@ -1247,32 +1124,34 @@ void release_UE_in_freeList(module_id_t mod_id) {
   }
 }
 
-int rrc_eNB_previous_SRB2(rrc_eNB_ue_context_t*         ue_context_pP)
-{
+int rrc_eNB_previous_SRB2(rrc_eNB_ue_context_t         *ue_context_pP) {
   struct LTE_SRB_ToAddMod                *SRB2_config = NULL;
   uint8_t i;
-  LTE_SRB_ToAddModList_t*                 SRB_configList = ue_context_pP->ue_context.SRB_configList;
-  LTE_SRB_ToAddModList_t**                SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[ue_context_pP->ue_context.reestablishment_xid];
+  LTE_SRB_ToAddModList_t                 *SRB_configList = ue_context_pP->ue_context.SRB_configList;
+  LTE_SRB_ToAddModList_t                **SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[ue_context_pP->ue_context.reestablishment_xid];
+
   if (*SRB_configList2 != NULL) {
-    if((*SRB_configList2)->list.count!=0){
+    if((*SRB_configList2)->list.count!=0) {
       LOG_D(RRC, "rrc_eNB_previous_SRB2 SRB_configList2(%p) count is %d\n           SRB_configList2->list.array[0] addr is %p",
-              SRB_configList2, (*SRB_configList2)->list.count,  (*SRB_configList2)->list.array[0]);
+            SRB_configList2, (*SRB_configList2)->list.count,  (*SRB_configList2)->list.array[0]);
     }
+
     for (i = 0; (i < (*SRB_configList2)->list.count) && (i < 3); i++) {
-      if ((*SRB_configList2)->list.array[i]->srb_Identity == 2 ){
+      if ((*SRB_configList2)->list.array[i]->srb_Identity == 2 ) {
         SRB2_config = (*SRB_configList2)->list.array[i];
         break;
       }
     }
-  }else{
+  } else {
     LOG_E(RRC, "rrc_eNB_previous_SRB2 SRB_configList2 NULL\n");
   }
 
   if (SRB2_config != NULL) {
     ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config);
-  }else{
+  } else {
     LOG_E(RRC, "rrc_eNB_previous_SRB2 SRB2_config NULL\n");
   }
+
   return 0;
 }
 //-----------------------------------------------------------------------------
@@ -1289,11 +1168,9 @@ rrc_eNB_process_RRCConnectionSetupComplete(
 {
   LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing LTE_RRCConnectionSetupComplete from UE (SRB1 Active)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
-
   ue_context_pP->ue_context.Srb1.Active = 1;
   ue_context_pP->ue_context.Status = RRC_CONNECTED;
   ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
-
   T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE,
     T_INT(ctxt_pP->module_id),
     T_INT(ctxt_pP->frame),
@@ -1351,7 +1228,6 @@ rrc_eNB_generate_SecurityModeCommand(
 
   if (!NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
     LOG_I(RRC,"calling rrc_data_req :securityModeCommand\n");
-
     rrc_data_req(ctxt_pP,
                  DCCH,
                  rrc_eNB_mui++,
@@ -1419,12 +1295,10 @@ rrc_eNB_generate_RRCConnectionReject(
 {
   T(T_ENB_RRC_CONNECTION_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
-
   eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
   ue_p->Srb0.Tx_buffer.payload_size =
     do_RRCConnectionReject(ctxt_pP->module_id,
-                          (uint8_t*) ue_p->Srb0.Tx_buffer.Payload);
-
+                           (uint8_t *) ue_p->Srb0.Tx_buffer.Payload);
   LOG_DUMPMSG(RRC,DEBUG_RRC,
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
@@ -1461,29 +1335,24 @@ rrc_eNB_generate_RRCConnectionReestablishment(
   LTE_SRB_ToAddMod_t         *SRB1_config = NULL;
   rrc_eNB_carrier_data_t     *carrier = NULL;
   eNB_RRC_UE_t               *ue_context = NULL;
-
   module_id_t module_id = ctxt_pP->module_id;
   uint16_t rnti = ctxt_pP->rnti;
-
   T(T_ENB_RRC_CONNECTION_REESTABLISHMENT,
     T_INT(module_id),
     T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe),
     T_INT(rnti));
-
   SRB_configList = &(ue_context_pP->ue_context.SRB_configList);
   carrier = &(RC.rrc[ctxt_pP->module_id]->carrier[CC_id]);
   ue_context = &(ue_context_pP->ue_context);
-
   ue_context->Srb0.Tx_buffer.payload_size = do_RRCConnectionReestablishment(ctxt_pP,
-                                                                         ue_context_pP,
-                                                                         CC_id,
-                                                                         (uint8_t *) ue_context->Srb0.Tx_buffer.Payload,
-                                                                         (uint8_t) carrier->p_eNB, // at this point we do not have the UE capability information, so it can only be TM1 or TM2
-                                                                         rrc_eNB_get_next_transaction_identifier(module_id),
-                                                                         SRB_configList,
-                                                                         &(ue_context->physicalConfigDedicated));
-
+      ue_context_pP,
+      CC_id,
+      (uint8_t *) ue_context->Srb0.Tx_buffer.Payload,
+      (uint8_t) carrier->p_eNB, // at this point we do not have the UE capability information, so it can only be TM1 or TM2
+      rrc_eNB_get_next_transaction_identifier(module_id),
+      SRB_configList,
+      &(ue_context->physicalConfigDedicated));
   LOG_DUMPMSG(RRC, DEBUG_RRC,
               (char *)(ue_context->Srb0.Tx_buffer.Payload),
               ue_context->Srb0.Tx_buffer.payload_size,
@@ -1507,6 +1376,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
 
         LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ  (SRB1) ---> MAC_eNB\n",
               PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
+
         if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
           rrc_mac_config_req_eNB(module_id,
                                  ue_context->primaryCC_id,
@@ -1515,19 +1385,13 @@ rrc_eNB_generate_RRCConnectionReestablishment(
                                  0,
                                  0,
                                  0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                  0,
-#endif
                                  rnti,
                                  (LTE_BCCH_BCH_Message_t *) NULL,
                                  (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                  (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
                                  (struct LTE_PhysicalConfigDedicated * ) ue_context->physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                  (LTE_SCellToAddMod_r10_t *)NULL,
-#endif
                                  (LTE_MeasObjectToAddMod_t **) NULL,
                                  ue_context->mac_MainConfig,
                                  1,
@@ -1539,25 +1403,17 @@ rrc_eNB_generate_RRCConnectionReestablishment(
                                  0,
                                  NULL,
                                  NULL,
-                                 (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                 , 0,
+                                 (LTE_MBSFN_SubframeConfigList_t *) NULL, 0,
                                  (LTE_MBSFN_AreaInfoList_r9_t *) NULL,
-                                 (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                                 ,(LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-                                 );
+                                 (LTE_PMCH_InfoList_r9_t *) NULL,
+                                 (LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL,
+                                 0,
+                                 (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                                 (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                                 (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                                 (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                                 (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                                );
           break;
         }
       }  // if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1)
@@ -1572,11 +1428,9 @@ rrc_eNB_generate_RRCConnectionReestablishment(
                      MSC_AS_TIME_ARGS(ctxt_pP),
                      ue_context->rnti,
                      ue_context->Srb0.Tx_buffer.payload_size);
-
   LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishment (bytes %d)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
         ue_context->Srb0.Tx_buffer.payload_size);
-
   UE_id = find_UE_id(module_id, rnti);
 
   if (UE_id != -1) {
@@ -1589,7 +1443,6 @@ rrc_eNB_generate_RRCConnectionReestablishment(
           PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
           rnti);
   }
-
 }
 
 //-----------------------------------------------------------------------------
@@ -1637,7 +1490,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
   int                                    measurements_enabled;
   uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
   int ret = 0;
-
   ue_context_pP->ue_context.Status = RRC_CONNECTED;
   ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
   ue_context_pP->ue_context.reestablishment_xid = next_xid;
@@ -1703,66 +1555,71 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
   //ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2;
 
   if (EPC_MODE_ENABLED) {
-  hashtable_rc_t    h_rc;
-  int               j;
-  rrc_ue_s1ap_ids_t *rrc_ue_s1ap_ids_p = NULL;
-  uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
-  uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
-  eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)];
-
-  if (eNB_ue_s1ap_id > 0) {
-    h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void **)&rrc_ue_s1ap_ids_p);
-
-    if  (h_rc == HASH_TABLE_OK) {
-      rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
+    hashtable_rc_t    h_rc;
+    int               j;
+    rrc_ue_s1ap_ids_t *rrc_ue_s1ap_ids_p = NULL;
+    uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
+    uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
+    eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)];
+
+    if (eNB_ue_s1ap_id > 0) {
+      h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void **)&rrc_ue_s1ap_ids_p);
+
+      if  (h_rc == HASH_TABLE_OK) {
+        rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
+      }
     }
-  }
 
-  if (ue_initial_id != 0) {
-    h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_s1ap_ids_p);
+    if (ue_initial_id != 0) {
+      h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_s1ap_ids_p);
 
-    if  (h_rc == HASH_TABLE_OK) {
-      rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
+      if  (h_rc == HASH_TABLE_OK) {
+        rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
+      }
     }
-  }
-
-  gtpv1u_enb_create_tunnel_req_t  create_tunnel_req;
-  /* Save e RAB information for later */
-  memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
 
-  for ( j = 0, i = 0; i < NB_RB_MAX; i++) {
-    if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) {
-      create_tunnel_req.eps_bearer_id[j]   = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
-      create_tunnel_req.sgw_S1u_teid[j]  = ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
-      memcpy(&create_tunnel_req.sgw_addr[j],
-             &ue_context_pP->ue_context.e_rab[i].param.sgw_addr,
-             sizeof(transport_layer_addr_t));
-      j++;
+    gtpv1u_enb_create_tunnel_req_t  create_tunnel_req;
+    /* Save e RAB information for later */
+    memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
+
+    for ( j = 0, i = 0; i < NB_RB_MAX; i++) {
+      if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) {
+        create_tunnel_req.eps_bearer_id[j]   = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
+        create_tunnel_req.sgw_S1u_teid[j]  = ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
+        memcpy(&create_tunnel_req.sgw_addr[j],
+               &ue_context_pP->ue_context.e_rab[i].param.sgw_addr,
+               sizeof(transport_layer_addr_t));
+        j++;
+      }
     }
-  }
-
-  create_tunnel_req.rnti       = ctxt_pP->rnti; // warning put zero above
-  create_tunnel_req.num_tunnels    = j;
 
+    create_tunnel_req.rnti       = ctxt_pP->rnti; // warning put zero above
+    create_tunnel_req.num_tunnels    = j;
     ret = gtpv1u_update_s1u_tunnel(
-    ctxt_pP->instance,
-    &create_tunnel_req,
-    reestablish_rnti);
+            ctxt_pP->instance,
+            &create_tunnel_req,
+            reestablish_rnti);
+
     if ( ret != 0 ) {
       LOG_E(RRC,"gtpv1u_update_s1u_tunnel failed,start to release UE %x\n",reestablish_rnti);
+
       // update s1u tunnel failed,reset rnti?
       if (eNB_ue_s1ap_id > 0) {
-        h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&rrc_ue_s1ap_ids_p);
+        h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void **)&rrc_ue_s1ap_ids_p);
+
         if (h_rc == HASH_TABLE_OK ) {
           rrc_ue_s1ap_ids_p->ue_rnti = reestablish_rnti;
         }
       }
+
       if (ue_initial_id != 0) {
-        h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&rrc_ue_s1ap_ids_p);
+        h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_s1ap_ids_p);
+
         if (h_rc == HASH_TABLE_OK ) {
           rrc_ue_s1ap_ids_p->ue_rnti = reestablish_rnti;
         }
       }
+
       ue_context_pP->ue_context.ue_release_timer_s1 = 1;
       ue_context_pP->ue_context.ue_release_timer_thres_s1 = 100;
       ue_context_pP->ue_context.ue_release_timer = 0;
@@ -1780,12 +1637,12 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
   ue_context_pP->ue_context.rnti               = ctxt_pP->rnti;
 
   if (EPC_MODE_ENABLED) {
-  uint8_t send_security_mode_command = FALSE;
-  rrc_pdcp_config_security(
-    ctxt_pP,
-    ue_context_pP,
-    send_security_mode_command);
-  LOG_D(RRC, "set security successfully \n");
+    uint8_t send_security_mode_command = FALSE;
+    rrc_pdcp_config_security(
+      ctxt_pP,
+      ue_context_pP,
+      send_security_mode_command);
+    LOG_D(RRC, "set security successfully \n");
   }
 
   // Measurement ID list
@@ -2022,31 +1879,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
     //memcpy((void *)rrc_inst->handover_info[ue_mod_idP]->as_config.sourceRadioResourceConfig.sps_Config,(void *)rrc_inst->sps_Config[ue_mod_idP],sizeof(SPS_Config_t));
   }
 
-#ifdef CBA
-  //struct PUSCH_CBAConfigDedicated_vlola  *pusch_CBAConfigDedicated_vlola;
-  uint8_t                            *cba_RNTI_buf;
-  cba_RNTI = CALLOC(1, sizeof(LTE_C_RNTI_t));
-  cba_RNTI_buf = CALLOC(1, 2 * sizeof(uint8_t));
-  cba_RNTI->buf = cba_RNTI_buf;
-  cba_RNTI->size = 2;
-  cba_RNTI->bits_unused = 0;
-
-  // associate UEs to the CBa groups as a function of their UE id
-  if (rrc_inst->num_active_cba_groups) {
-    cba_RNTI->buf[0] = rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups] & 0xff;
-    cba_RNTI->buf[1] = 0xff;
-    LOG_D(RRC,
-          "[eNB %d] Frame %d: cba_RNTI = %x in group %d is attribued to UE %d\n",
-          enb_mod_idP, frameP,
-          rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups],
-          ue_mod_idP % rrc_inst->num_active_cba_groups, ue_mod_idP);
-  } else {
-    cba_RNTI->buf[0] = 0x0;
-    cba_RNTI->buf[1] = 0x0;
-    LOG_D(RRC, "[eNB %d] Frame %d: no cba_RNTI is configured for UE %d\n", enb_mod_idP, frameP, ue_mod_idP);
-  }
-
-#endif
   /* Initialize NAS list */
   dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
 
@@ -2083,7 +1915,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
 
   measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
                          RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
-
   // send LTE_RRCConnectionReconfiguration
   memset(buffer, 0, RRC_BUF_SIZE);
   size = do_RRCConnectionReconfiguration(ctxt_pP,
@@ -2094,14 +1925,14 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
                                          (LTE_DRB_ToReleaseList_t *)NULL, // DRB2_list,
                                          (struct LTE_SPS_Config *)NULL,   // maybe ue_context_pP->ue_context.sps_Config,
                                          (struct LTE_PhysicalConfigDedicated *)ue_context_pP->ue_context.physicalConfigDedicated,
-//#ifdef EXMIMO_IOT
-//                                         NULL, NULL, NULL,NULL,
-//#else
+                                         //#ifdef EXMIMO_IOT
+                                         //                                         NULL, NULL, NULL,NULL,
+                                         //#else
                                          measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
                                          measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
                                          measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
                                          (LTE_MeasIdToAddModList_t *)NULL,
-//#endif
+                                         //#endif
                                          (LTE_MAC_MainConfig_t *)ue_context_pP->ue_context.mac_MainConfig,
                                          (LTE_MeasGapConfig_t *)NULL,
                                          (LTE_MobilityControlInfo_t *)NULL,
@@ -2111,10 +1942,8 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
                                          (LTE_C_RNTI_t *)cba_RNTI, // cba_RNTI
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)dedicatedInfoNASList, //dedicatedInfoNASList
                                          (LTE_SL_CommConfig_r12_t *)NULL,
-                                         (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *)NULL,
+                                         (LTE_SCellToAddMod_r10_t *)NULL
                                         );
   LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
               "[MSG] RRC Connection Reconfiguration\n");
@@ -2212,27 +2041,25 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
 )
 //-----------------------------------------------------------------------------
 {
- if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
-  int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
+  if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
+    int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
 
-  if(UE_id != -1) {
-    RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
-    RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
-  } else {
-    LOG_E(RRC,
-          PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n",
-          PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
+    if(UE_id != -1) {
+      RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
+      RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
+    } else {
+      LOG_E(RRC,
+            PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n",
+            PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
+    }
   }
- }
+
   T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
-
-  eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; 
-
+  eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
   ue_p->Srb0.Tx_buffer.payload_size =
     do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
-                          (uint8_t*) ue_p->Srb0.Tx_buffer.Payload);
-
+                                          (uint8_t *) ue_p->Srb0.Tx_buffer.Payload);
   LOG_DUMPMSG(RRC,DEBUG_RRC,
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
@@ -2246,7 +2073,6 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
     MSC_AS_TIME_ARGS(ctxt_pP),
     ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti,
     ue_p->Srb0.Tx_buffer.payload_size);
-
   LOG_I(RRC,
         PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishmentReject (bytes %d)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -2294,9 +2120,11 @@ rrc_eNB_generate_RRCConnectionRelease(
     ue_context_pP->ue_context.rnti,
     rrc_eNB_mui,
     size);
+
   while (pthread_mutex_trylock(&rrc_release_freelist)) {
     /* spin... */
   }
+
   for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
     if (rrc_release_info.RRC_release_ctrl[release_num].flag == 0) {
       if (ue_context_pP->ue_context.ue_release_timer_s1 > 0) {
@@ -2318,6 +2146,7 @@ rrc_eNB_generate_RRCConnectionRelease(
   }
 
   pthread_mutex_unlock(&rrc_release_freelist);
+
   if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
     MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
     F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
@@ -2552,10 +2381,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *co
                                          NULL, NULL,  NULL, NULL, NULL, NULL, NULL,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)dedicatedInfoNASList,
                                          (LTE_SL_CommConfig_r12_t *)NULL,
-                                         (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *)NULL,
+                                         (LTE_SCellToAddMod_r10_t *)NULL
                                         );
   LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Connection Reconfiguration\n");
 
@@ -2801,10 +2628,8 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *cons
                                          NULL, NULL,  NULL, NULL, NULL, NULL, NULL,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)dedicatedInfoNASList,
                                          (LTE_SL_CommConfig_r12_t *)NULL,
-                                         (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *)NULL,
+                                         (LTE_SCellToAddMod_r10_t *)NULL
                                         );
   LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
               "[MSG] RRC Connection Reconfiguration\n");
@@ -2914,10 +2739,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(  const protocol_
                                          NULL,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)dedicatedInfoNASList,
                                          (LTE_SL_CommConfig_r12_t *)NULL,
-                                         (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *)NULL,
+                                         (LTE_SCellToAddMod_r10_t *)NULL
                                         );
   ue_context_pP->ue_context.e_rab_release_command_flag = 1;
   LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
@@ -2960,14 +2783,13 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(  const protocol_
  * Generate the basic (first) RRC Connection Reconfiguration (non BR UE)
  */
 void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
-                                                          rrc_eNB_ue_context_t  *const ue_context_pP,
-                                                          const uint8_t                ho_state)
+    rrc_eNB_ue_context_t  *const ue_context_pP,
+    const uint8_t                ho_state)
 //-----------------------------------------------------------------------------
 {
   uint8_t   buffer[RRC_BUF_SIZE];
   uint16_t  size;
   int       i;
-  
   /* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
   eNB_RRC_INST                           *rrc_inst = RC.rrc[ctxt_pP->module_id];
   struct LTE_PhysicalConfigDedicated    **physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
@@ -2996,14 +2818,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
                                          *ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
   LTE_MeasIdToAddModList_t               *MeasId_list                      = NULL;
   LTE_MeasIdToAddMod_t                   *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   long                                   *sr_ProhibitTimer_r9              = NULL;
-#endif
-
   long                                   *logicalchannelgroup              = NULL;
   long                                   *logicalchannelgroup_drb          = NULL;
-  long                                   *maxHARQ_Tx                       = NULL; 
+  long                                   *maxHARQ_Tx                       = NULL;
   long                                   *periodicBSR_Timer                = NULL;
   LTE_RSRP_Range_t                       *rsrp                             = NULL;
   struct LTE_MeasConfig__speedStatePars  *Sparams                          = NULL;
@@ -3012,7 +2830,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   LTE_CellsToAddModList_t                *CellsToAddModList                = NULL;
   struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL;
   LTE_DedicatedInfoNAS_t                 *dedicatedInfoNas                 = NULL;
-  
   /* For no gcc warnings */
   (void) dedicatedInfoNas;
   LTE_C_RNTI_t                           *cba_RNTI                         = NULL;
@@ -3020,40 +2837,11 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);   //Transaction_id,
   uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
   LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
-
-#ifdef CBA // Contention Based Access
-  uint8_t                            *cba_RNTI_buf;
-  cba_RNTI = CALLOC(1, sizeof(LTE_C_RNTI_t));
-  cba_RNTI_buf = CALLOC(1, 2 * sizeof(uint8_t));
-  cba_RNTI->buf = cba_RNTI_buf;
-  cba_RNTI->size = 2;
-  cba_RNTI->bits_unused = 0;
-
-  /* Associate UEs to the CBA groups as a function of their UE id */
-  if (rrc_inst->num_active_cba_groups) {
-    cba_RNTI->buf[0] = rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups] & 0xff;
-    cba_RNTI->buf[1] = 0xff;
-    LOG_D(RRC, "[eNB %d] Frame %d: cba_RNTI = %x in group %d is attribued to UE %d\n",
-          enb_mod_idP, 
-          frameP,
-          rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups],
-          ue_mod_idP % rrc_inst->num_active_cba_groups, ue_mod_idP);
-  } else {
-    cba_RNTI->buf[0] = 0x0;
-    cba_RNTI->buf[1] = 0x0;
-    LOG_D(RRC, "[eNB %d] Frame %d: no cba_RNTI is configured for UE %d\n", 
-          enb_mod_idP, 
-          frameP, 
-          ue_mod_idP);
-  }
-#endif
-
-  T(T_ENB_RRC_CONNECTION_RECONFIGURATION, 
-    T_INT(ctxt_pP->module_id), 
+  T(T_ENB_RRC_CONNECTION_RECONFIGURATION,
+    T_INT(ctxt_pP->module_id),
     T_INT(ctxt_pP->frame),
-    T_INT(ctxt_pP->subframe), 
+    T_INT(ctxt_pP->subframe),
     T_INT(ctxt_pP->rnti));
-
   /* Configure SRB2 */
   SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[xid]);
 
@@ -3082,13 +2870,11 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   SRB2_ul_SpecificParameters->priority = 3; // let some priority for SRB1 and dedicated DRBs
   SRB2_ul_SpecificParameters->prioritisedBitRate = LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
   SRB2_ul_SpecificParameters->bucketSizeDuration = LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
-  
   /* LCG for CCCH and DCCH is 0 as defined in 36331 */
   logicalchannelgroup = CALLOC(1, sizeof(long));
   *logicalchannelgroup = 0;
   SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
   SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
-  
   ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config); // this list has the configuration for SRB1 and SRB2
   ASN_SEQUENCE_ADD(&(*SRB_configList2)->list, SRB2_config); // this list has only the configuration for SRB2
 
@@ -3100,7 +2886,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 
   *DRB_configList = CALLOC(1, sizeof(**DRB_configList));
   memset(*DRB_configList, 0, sizeof(**DRB_configList));
-  
   DRB_configList2=&ue_context_pP->ue_context.DRB_configList2[xid]; // list for the configured DRB for a this xid
 
   if (*DRB_configList2) {
@@ -3109,7 +2894,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 
   *DRB_configList2 = CALLOC(1, sizeof(**DRB_configList2));
   memset(*DRB_configList2, 0, sizeof(**DRB_configList2));
-  
   DRB_config = CALLOC(1, sizeof(*DRB_config));
   DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
   *(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15, value : x+4
@@ -3119,7 +2903,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   *(DRB_config->logicalChannelIdentity) = (long)3; // value : x+2
   DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
   DRB_config->rlc_Config = DRB_rlc_config;
-
 #ifdef RRC_DEFAULT_RAB_IS_AM
   DRB_rlc_config->present = LTE_RLC_Config_PR_am;
   DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms50;
@@ -3132,15 +2915,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
   DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
-
-#ifdef CBA
-  DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering   = LTE_T_Reordering_ms5; //T_Reordering_ms25;
-#else
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
 #endif
-
-#endif
-
   DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
   DRB_config->pdcp_Config = DRB_pdcp_config;
   DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
@@ -3150,7 +2926,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   /* Avoid gcc warnings */
   (void)PDCP_rlc_AM;
   (void)PDCP_rlc_UM;
-
 #ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
   PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
   DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
@@ -3160,7 +2935,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
   PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
 #endif
-
   DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
   DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
   DRB_config->logicalChannelConfig = DRB_lchan_config;
@@ -3173,10 +2947,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   logicalchannelgroup_drb = CALLOC(1, sizeof(long));
   *logicalchannelgroup_drb = 1;
   DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
-  
   ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
   ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
-  
   /* MAC Main Config */
   // The different parts of MAC main config are set below
   mac_MainConfig = CALLOC(1, sizeof(*mac_MainConfig));
@@ -3185,7 +2957,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   maxHARQ_Tx = CALLOC(1, sizeof(long));
   *maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
   mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
-
   /* BSR reconfiguration */
   periodicBSR_Timer = CALLOC(1, sizeof(long));
   *periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64; //LTE_PeriodicBSR_Timer_r12_infinity; // LTE_PeriodicBSR_Timer_r12_sf64; // LTE_PeriodicBSR_Timer_r12_sf20
@@ -3193,12 +2964,13 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120
   mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
   mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
-
   /* PHR reconfiguration */
   mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
   mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
-  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf500; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
-  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
+  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf500; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
+  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3;  // Value dB1 =1 dB, dB3 = 3 dB
 
   if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
@@ -3211,24 +2983,21 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
     UE_list_t *UE_list = &(mac->UE_list);
 
     if (UE_id != -1) {
-      if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) && 
-        (UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
-      // CDRX can be only configured in case of FDD and non BR UE (09/04/19)
-      
-      LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
-
-      /* Process the IE drx_Config */
-      if (cc_id < MAX_NUM_CCs) {
-        mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
-      } else {
-        LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
-      }
-
-      /* Set timers and thresholds values in local MAC context of UE */
-      eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
+      if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
+          (UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
+        // CDRX can be only configured in case of FDD and non BR UE (09/04/19)
+        LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
 
-      LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
+        /* Process the IE drx_Config */
+        if (cc_id < MAX_NUM_CCs) {
+          mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
+        } else {
+          LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
+        }
 
+        /* Set timers and thresholds values in local MAC context of UE */
+        eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
+        LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
       } else { // CDRX not implemented for TDD and LTE-M (09/04/19)
         mac_MainConfig->drx_Config = NULL;
       }
@@ -3241,12 +3010,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
     mac_MainConfig->drx_Config = NULL;
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
   *sr_ProhibitTimer_r9 = 0;   // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2 = 2*SR
   mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
   mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
-#endif
 
   // change the transmission mode for the primary component carrier
   // TODO: add codebook subset restriction here
@@ -3257,41 +3024,41 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
       LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode);
 
       if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm3) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm4) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm5) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm6) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=     
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
       }
     } else {
       LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n");
@@ -3302,16 +3069,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
       if ((rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm4) ||
           (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm5) ||
           (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm6)) {
-
         // feedback mode needs to be set as well
-	      // TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
+        // TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
         LOG_I(RRC, "Setting cqi reporting mode to rm31 (hardcoded)\n");
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
         *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic) = LTE_CQI_ReportModeAperiodic_rm31; // HLC CQI, single PMI
-#else
-        *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic) = LTE_CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, single PMI
-#endif
       }
     } else {
       LOG_E(RRC,"cqi_ReportConfig not present in physical_config_dedicated. Not reconfiguring!\n");
@@ -3363,9 +3124,9 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   MeasObj->measObjectId = 1;
   MeasObj->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
   MeasObj->measObject.choice.measObjectEUTRA.carrierFreq =
-      to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
+    to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
   MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = LTE_AllowedMeasBandwidth_mbw25;
   MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
@@ -3398,6 +3159,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
     ue_context_pP->ue_context.measurement_info->cellIndividualOffset[i+1] = CellToAdd->cellIndividualOffset;
     ASN_SEQUENCE_ADD(&CellsToAddModList->list, CellToAdd);
   }
+
   ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj);
   //  LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
 
@@ -3522,7 +3284,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 
   /* A3 event update */
   if (!ue_context_pP->ue_context.measurement_info->events->a3_event) {
-      ue_context_pP->ue_context.measurement_info->events->a3_event = CALLOC(1,sizeof(*(ue_context_pP->ue_context.measurement_info->events->a3_event)));
+    ue_context_pP->ue_context.measurement_info->events->a3_event = CALLOC(1,sizeof(*(ue_context_pP->ue_context.measurement_info->events->a3_event)));
   }
 
   ue_context_pP->ue_context.measurement_info->events->a3_event->a3_offset = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset;
@@ -3530,13 +3292,12 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   ue_context_pP->ue_context.measurement_info->events->a3_event->hysteresis = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis;
   ue_context_pP->ue_context.measurement_info->events->a3_event->timeToTrigger = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger;
   ue_context_pP->ue_context.measurement_info->events->a3_event->maxReportCells = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells;
-
 #if 0
-    /* TODO: set a proper value.
-     * 20 means: UE does not report if RSRP of serving cell is higher
-     * than -120 dB (see 36.331 5.5.3.1).
-     * This is too low for the X2 handover experiment.
-     */
+  /* TODO: set a proper value.
+   * 20 means: UE does not report if RSRP of serving cell is higher
+   * than -120 dB (see 36.331 5.5.3.1).
+   * This is too low for the X2 handover experiment.
+   */
   rsrp = CALLOC(1, sizeof(LTE_RSRP_Range_t));
   *rsrp = 20;
 #endif
@@ -3561,10 +3322,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
     CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = LTE_FilterCoefficient_fc4;
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = LTE_FilterCoefficient_fc4;
-
   ue_context_pP->ue_context.measurement_info->filterCoefficientRSRP = *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP;
   ue_context_pP->ue_context.measurement_info->filterCoefficientRSRQ = *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ;
-
   /* Initialize NAS list */
   dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
 
@@ -3585,7 +3344,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
       //      ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
       //      ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
     }
-
     /* TODO should test if e RAB are OK before! */
     ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
     LOG_D(RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
@@ -3600,9 +3358,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 
   measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
                          RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
-
   memset(buffer, 0, RRC_BUF_SIZE);
-
   size = do_RRCConnectionReconfiguration(ctxt_pP,
                                          buffer,
                                          xid, // Transaction_id,
@@ -3624,12 +3380,9 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
                                          (LTE_C_RNTI_t *) cba_RNTI,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *) dedicatedInfoNASList,
                                          (LTE_SL_CommConfig_r12_t *) NULL,
-                                         (LTE_SL_DiscConfig_r12_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *) NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *) NULL,
+                                         (LTE_SCellToAddMod_r10_t *) NULL
                                         );
-
   LOG_DUMPMSG(RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Connection Reconfiguration\n");
 
   /* Free all NAS PDUs */
@@ -3642,20 +3395,18 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
   }
 
   LOG_I(RRC, "[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
-        ctxt_pP->module_id, 
-        ctxt_pP->frame, 
-        size, 
+        ctxt_pP->module_id,
+        ctxt_pP->frame,
+        size,
         ue_context_pP->ue_context.rnti);
-
   LOG_D(RRC, "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
-        ctxt_pP->frame, 
-        ctxt_pP->module_id, 
-        size, 
-        ue_context_pP->ue_context.rnti, 
-        rrc_eNB_mui, 
-        ctxt_pP->module_id, 
+        ctxt_pP->frame,
+        ctxt_pP->module_id,
+        size,
+        ue_context_pP->ue_context.rnti,
+        rrc_eNB_mui,
+        ctxt_pP->module_id,
         DCCH);
-
   MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
                      MSC_RRC_UE,
                      buffer,
@@ -3665,7 +3416,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
                      ue_context_pP->ue_context.rnti,
                      rrc_eNB_mui,
                      size);
-
   rrc_data_req(ctxt_pP,
                DCCH,
                rrc_eNB_mui++,
@@ -3673,19 +3423,14 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
                size,
                buffer,
                PDCP_TRANSMISSION_MODE_CONTROL);
-
   free(Sparams);
   Sparams = NULL;
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
-
   free(quantityConfig->quantityConfigEUTRA);
   quantityConfig->quantityConfigEUTRA = NULL;
-
   free(quantityConfig);
   quantityConfig = NULL;
 }
@@ -3700,7 +3445,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   uint8_t   buffer[RRC_BUF_SIZE];
   uint16_t  size;
   int       i;
-
   /* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
   eNB_RRC_INST                           *rrc_inst = RC.rrc[ctxt_pP->module_id];
   struct LTE_PhysicalConfigDedicated    **physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
@@ -3729,11 +3473,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
                                          *ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
   LTE_MeasIdToAddModList_t               *MeasId_list                      = NULL;
   LTE_MeasIdToAddMod_t                   *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   long                                   *sr_ProhibitTimer_r9              = NULL;
-#endif
-
   long                                   *logicalchannelgroup              = NULL;
   long                                   *logicalchannelgroup_drb          = NULL;
   long                                   *maxHARQ_Tx                       = NULL;
@@ -3745,7 +3485,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   LTE_CellsToAddModList_t                *CellsToAddModList                = NULL;
   struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL;
   LTE_DedicatedInfoNAS_t                 *dedicatedInfoNas                 = NULL;
-
   /* For no gcc warnings */
   (void) dedicatedInfoNas;
   LTE_C_RNTI_t                           *cba_RNTI                         = NULL;
@@ -3753,40 +3492,11 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);   //Transaction_id,
   uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
   LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
-
-#ifdef CBA // Contention Based Access
-  uint8_t                            *cba_RNTI_buf;
-  cba_RNTI = CALLOC(1, sizeof(LTE_C_RNTI_t));
-  cba_RNTI_buf = CALLOC(1, 2 * sizeof(uint8_t));
-  cba_RNTI->buf = cba_RNTI_buf;
-  cba_RNTI->size = 2;
-  cba_RNTI->bits_unused = 0;
-
-  /* Associate UEs to the CBA groups as a function of their UE id */
-  if (rrc_inst->num_active_cba_groups) {
-    cba_RNTI->buf[0] = rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups] & 0xff;
-    cba_RNTI->buf[1] = 0xff;
-    LOG_D(RRC, "[eNB %d] Frame %d: cba_RNTI = %x in group %d is attribued to UE %d\n",
-          enb_mod_idP,
-          frameP,
-          rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups],
-          ue_mod_idP % rrc_inst->num_active_cba_groups, ue_mod_idP);
-  } else {
-    cba_RNTI->buf[0] = 0x0;
-    cba_RNTI->buf[1] = 0x0;
-    LOG_D(RRC, "[eNB %d] Frame %d: no cba_RNTI is configured for UE %d\n",
-          enb_mod_idP,
-          frameP,
-          ue_mod_idP);
-  }
-#endif
-
   T(T_ENB_RRC_CONNECTION_RECONFIGURATION,
     T_INT(ctxt_pP->module_id),
     T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe),
     T_INT(ctxt_pP->rnti));
-
   /* Configure SRB2 */
   SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[xid]);
 
@@ -3815,13 +3525,11 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   SRB2_ul_SpecificParameters->priority = 3; // let some priority for SRB1 and dedicated DRBs
   SRB2_ul_SpecificParameters->prioritisedBitRate = LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
   SRB2_ul_SpecificParameters->bucketSizeDuration = LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
-
   /* LCG for CCCH and DCCH is 0 as defined in 36331 */
   logicalchannelgroup = CALLOC(1, sizeof(long));
   *logicalchannelgroup = 0;
   SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
   SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
-
   ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config); // this list has the configuration for SRB1 and SRB2
   ASN_SEQUENCE_ADD(&(*SRB_configList2)->list, SRB2_config); // this list has only the configuration for SRB2
 
@@ -3833,7 +3541,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
 
   *DRB_configList = CALLOC(1, sizeof(**DRB_configList));
   memset(*DRB_configList, 0, sizeof(**DRB_configList));
-
   DRB_configList2=&ue_context_pP->ue_context.DRB_configList2[xid]; // list for the configured DRB for a this xid
 
   if (*DRB_configList2) {
@@ -3842,7 +3549,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
 
   *DRB_configList2 = CALLOC(1, sizeof(**DRB_configList2));
   memset(*DRB_configList2, 0, sizeof(**DRB_configList2));
-
   DRB_config = CALLOC(1, sizeof(*DRB_config));
   DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
   *(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15, value : x+4
@@ -3852,7 +3558,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   *(DRB_config->logicalChannelIdentity) = (long)3; // value : x+2
   DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
   DRB_config->rlc_Config = DRB_rlc_config;
-
 #ifdef RRC_DEFAULT_RAB_IS_AM
   DRB_rlc_config->present = LTE_RLC_Config_PR_am;
   DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms50;
@@ -3865,15 +3570,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
   DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
-
-#ifdef CBA
-  DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering   = LTE_T_Reordering_ms5; //T_Reordering_ms25;
-#else
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
 #endif
-
-#endif
-
   DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
   DRB_config->pdcp_Config = DRB_pdcp_config;
   DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
@@ -3883,7 +3581,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   /* Avoid gcc warnings */
   (void)PDCP_rlc_AM;
   (void)PDCP_rlc_UM;
-
 #ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
   PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
   DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
@@ -3893,7 +3590,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
   PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
 #endif
-
   DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
   DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
   DRB_config->logicalChannelConfig = DRB_lchan_config;
@@ -3906,10 +3602,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   logicalchannelgroup_drb = CALLOC(1, sizeof(long));
   *logicalchannelgroup_drb = 1;
   DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
-
   ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
   ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
-
   /* MAC Main Config */
   // The different parts of MAC main config are set below
   mac_MainConfig = CALLOC(1, sizeof(*mac_MainConfig));
@@ -3917,7 +3611,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   maxHARQ_Tx = CALLOC(1, sizeof(long));
   *maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
   mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
-
   /* BSR reconfiguration */
   periodicBSR_Timer = CALLOC(1, sizeof(long));
   *periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64; //LTE_PeriodicBSR_Timer_r12_infinity; // LTE_PeriodicBSR_Timer_r12_sf64; // LTE_PeriodicBSR_Timer_r12_sf20
@@ -3925,12 +3618,13 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120
   mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
   mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
-
   /* PHR reconfiguration */
   mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
   mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
-  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf500; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
-  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
+  mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf500; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
+  mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer =
+    LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3;  // Value dB1 =1 dB, dB3 = 3 dB
 
   if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
@@ -3944,23 +3638,20 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
 
     if (UE_id != -1) {
       if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
-        (UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
-      // CDRX can be only configured in case of FDD and non BR UE (09/04/19)
-
-      LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
+          (UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
+        // CDRX can be only configured in case of FDD and non BR UE (09/04/19)
+        LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
 
-      /* Process the IE drx_Config */
-      if (cc_id < MAX_NUM_CCs) {
-        mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
-      } else {
-        LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
-      }
-
-      /* Set timers and thresholds values in local MAC context of UE */
-      eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
-
-      LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
+        /* Process the IE drx_Config */
+        if (cc_id < MAX_NUM_CCs) {
+          mac_MainConfig->drx_Config = do_DrxConfig(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
+        } else {
+          LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
+        }
 
+        /* Set timers and thresholds values in local MAC context of UE */
+        eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
+        LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
       } else { // CDRX not implemented for TDD and LTE-M (09/04/19)
         mac_MainConfig->drx_Config = NULL;
       }
@@ -3973,13 +3664,10 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
     mac_MainConfig->drx_Config = NULL;
   }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
   *sr_ProhibitTimer_r9 = 0;   // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2 = 2*SR
   mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
   mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
-#endif
-
   // free the old LTE_MAC_MainConfig_t: get a pointer to "old" memory, assign
   // the new values in the ue_context, then free it
   // Note: can not completely avoid race condition with FlexRAN
@@ -3989,10 +3677,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   free(old_mac_MainConfig->ul_SCH_Config->maxHARQ_Tx);
   free(old_mac_MainConfig->ul_SCH_Config);
   free(old_mac_MainConfig->phr_Config);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   free(old_mac_MainConfig->ext1->sr_ProhibitTimer_r9);
   free(old_mac_MainConfig->ext1);
-#endif
   free(old_mac_MainConfig);
 
   // change the transmission mode for the primary component carrier
@@ -4004,41 +3690,41 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
       LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode);
 
       if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm3) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm4) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm5) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
       } else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm6) {
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
-	  CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
-	  LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
-	(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
+          CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
+          LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
+        (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
       }
     } else {
       LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n");
@@ -4049,16 +3735,10 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
       if ((rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm4) ||
           (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm5) ||
           (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm6)) {
-
         // feedback mode needs to be set as well
-	      // TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
+        // TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
         LOG_I(RRC, "Setting cqi reporting mode to rm31 (hardcoded)\n");
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
         *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic) = LTE_CQI_ReportModeAperiodic_rm31; // HLC CQI, single PMI
-#else
-        *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic) = LTE_CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, single PMI
-#endif
       }
     } else {
       LOG_E(RRC,"cqi_ReportConfig not present in physical_config_dedicated. Not reconfiguring!\n");
@@ -4110,49 +3790,53 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   MeasObj->measObjectId = 1;
   MeasObj->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
   MeasObj->measObject.choice.measObjectEUTRA.carrierFreq =
-      to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
+    to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
   MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = LTE_AllowedMeasBandwidth_mbw25;
   MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf[0] = 0;
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.size = 1;
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.bits_unused = 6;
-//<<<<<<< HEAD
+  //<<<<<<< HEAD
   MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = NULL;   // Default is 15 or 0dB
+
   if (rrc_inst->carrier[0].sib1->tdd_Config!=NULL) {
     MeasObj->measObject.choice.measObjectEUTRA.ext1 = CALLOC(1, sizeof(struct LTE_MeasObjectEUTRA__ext1));
     MeasObj->measObject.choice.measObjectEUTRA.ext1->measCycleSCell_r10 = NULL;
     MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10 = CALLOC(1, sizeof(struct LTE_MeasSubframePatternConfigNeigh_r10));
     MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->present=LTE_MeasSubframePatternConfigNeigh_r10_PR_setup;
     MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.present=LTE_MeasSubframePattern_r10_PR_subframePatternTDD_r10;
-    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.present=LTE_MeasSubframePattern_r10__subframePatternTDD_r10_PR_subframeConfig1_5_r10;
-    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf=CALLOC(3, sizeof(uint8_t));
+    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.present=
+      LTE_MeasSubframePattern_r10__subframePatternTDD_r10_PR_subframeConfig1_5_r10;
+    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf=CALLOC(3,
+        sizeof(uint8_t));
     MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.size=3;
-    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.bits_unused=4; 
+    MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.bits_unused=4;
+
     switch (rrc_inst->carrier[0].sib1->tdd_Config->subframeAssignment) {
-    case 1: //subframe 0,4,5,9
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x8C;
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x63;
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x10;
-      break;
+      case 1: //subframe 0,4,5,9
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x8C;
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x63;
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x10;
+        break;
 
-    default: //subframe 0 , 5
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x84;
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x21;
-      MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x00;
-      break;
+      default: //subframe 0 , 5
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x84;
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x21;
+        MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x00;
+        break;
     }
   }
 
   MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
     (LTE_CellsToAddModList_t *) CALLOC(1, sizeof(*CellsToAddModList));
   CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
-//=======
-//  MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = (LTE_Q_OffsetRange_t *) CALLOC(1,sizeof(LTE_Q_OffsetRange_t));
-//  *(MeasObj->measObject.choice.measObjectEUTRA.offsetFreq) = ue_context_pP->ue_context.measurement_info->offsetFreq;   // Default is 15 or 0dB
-//>>>>>>> origin/OAI_develop
+  //=======
+  //  MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = (LTE_Q_OffsetRange_t *) CALLOC(1,sizeof(LTE_Q_OffsetRange_t));
+  //  *(MeasObj->measObject.choice.measObjectEUTRA.offsetFreq) = ue_context_pP->ue_context.measurement_info->offsetFreq;   // Default is 15 or 0dB
+  //>>>>>>> origin/OAI_develop
 
   if (RC.rrc[ctxt_pP->module_id]->num_neigh_cells > 0) {
     MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
@@ -4169,9 +3853,9 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
     CellToAdd->cellIndividualOffset = ue_context_pP->ue_context.measurement_info->cellIndividualOffset[i+1];
     ASN_SEQUENCE_ADD(&CellsToAddModList->list, CellToAdd);
   }
+
   ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj);
   //  LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
-
   // Report Configurations for periodical, A1-A5 events
   ReportConfig_list = CALLOC(1, sizeof(*ReportConfig_list));
   ReportConfig_per = CALLOC(1, sizeof(*ReportConfig_per));
@@ -4286,13 +3970,12 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
   ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
   ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A5);
   //  LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
-
 #if 0
-    /* TODO: set a proper value.
-     * 20 means: UE does not report if RSRP of serving cell is higher
-     * than -120 dB (see 36.331 5.5.3.1).
-     * This is too low for the X2 handover experiment.
-     */
+  /* TODO: set a proper value.
+   * 20 means: UE does not report if RSRP of serving cell is higher
+   * than -120 dB (see 36.331 5.5.3.1).
+   * This is too low for the X2 handover experiment.
+   */
   rsrp = CALLOC(1, sizeof(LTE_RSRP_Range_t));
   *rsrp = 20;
 #endif
@@ -4317,7 +4000,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
     CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = ue_context_pP->ue_context.measurement_info->filterCoefficientRSRP;
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = ue_context_pP->ue_context.measurement_info->filterCoefficientRSRQ;
-
   /* Initialize NAS list */
   dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
 
@@ -4338,7 +4020,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
       //      ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
       //      ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
     }
-
     /* TODO should test if e RAB are OK before! */
     ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
     LOG_D(RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
@@ -4353,9 +4034,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
 
   measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
                          RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
-
   memset(buffer, 0, RRC_BUF_SIZE);
-
   size = do_RRCConnectionReconfiguration(ctxt_pP,
                                          buffer,
                                          xid, // Transaction_id,
@@ -4377,12 +4056,9 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
                                          (LTE_C_RNTI_t *) cba_RNTI,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *) dedicatedInfoNASList,
                                          (LTE_SL_CommConfig_r12_t *) NULL,
-                                         (LTE_SL_DiscConfig_r12_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , (LTE_SCellToAddMod_r10_t *) NULL
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *) NULL,
+                                         (LTE_SCellToAddMod_r10_t *) NULL
                                         );
-
   LOG_DUMPMSG(RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Connection Reconfiguration\n");
 
   /* Free all NAS PDUs */
@@ -4399,7 +4075,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
         ctxt_pP->frame,
         size,
         ue_context_pP->ue_context.rnti);
-
   LOG_D(RRC, "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame,
         ctxt_pP->module_id,
@@ -4408,7 +4083,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
         rrc_eNB_mui,
         ctxt_pP->module_id,
         DCCH);
-
   MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
                      MSC_RRC_UE,
                      buffer,
@@ -4418,7 +4092,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
                      ue_context_pP->ue_context.rnti,
                      rrc_eNB_mui,
                      size);
-
   rrc_data_req(ctxt_pP,
                DCCH,
                rrc_eNB_mui++,
@@ -4426,16 +4099,12 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
                size,
                buffer,
                PDCP_TRANSMISSION_MODE_CONTROL);
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
-
   free(quantityConfig->quantityConfigEUTRA);
   quantityConfig->quantityConfigEUTRA = NULL;
-
   free(quantityConfig);
   quantityConfig = NULL;
 }
@@ -4451,7 +4120,6 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
 {
   uint8_t size;
   uint8_t buffer[100];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   uint8_t sCellIndexToAdd = 0; //one SCell so far
 
   //   uint8_t sCellIndexToAdd;
@@ -4464,7 +4132,6 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
     return(-1);
   }
 
-#endif
   size = do_RRCConnectionReconfiguration(ctxt_pP,
                                          buffer,
                                          rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),//Transaction_id,
@@ -4486,10 +4153,8 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
                                          (LTE_C_RNTI_t *)NULL,
                                          (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL,
                                          (LTE_SL_CommConfig_r12_t *)NULL,
-                                         (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                         , ue_context_pP->ue_context.sCell_config
-#endif
+                                         (LTE_SL_DiscConfig_r12_t *)NULL,
+                                         ue_context_pP->ue_context.sCell_config
                                         );
   LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
         ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
@@ -4530,7 +4195,6 @@ rrc_eNB_process_MeasurementReport(
   long ncell_max = -150;
   uint32_t earfcn_dl;
   uint8_t KeNB_star[32] = { 0 };
-
   T(T_ENB_RRC_MEASUREMENT_REPORT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
 
@@ -4648,9 +4312,7 @@ rrc_eNB_process_MeasurementReport(
     /* HO info struct may not be needed anymore */
     ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
     ue_context_pP->ue_context.Status = RRC_HO_EXECUTION;
-
     ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
-
     /* HO Preparation message */
     msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_HANDOVER_REQ);
     rrc_eNB_generate_HandoverPreparationInformation(
@@ -4670,7 +4332,7 @@ rrc_eNB_process_MeasurementReport(
     X2AP_HANDOVER_REQ(msg).security_capabilities = ue_context_pP->ue_context.security_capabilities;
     // compute keNB*
     earfcn_dl = (uint32_t)to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->carrier[0].eutra_band, RC.rrc[ctxt_pP->module_id]->carrier[0].dl_CarrierFreq,
-    RC.rrc[ctxt_pP->module_id]->carrier[0].N_RB_DL);
+                                       RC.rrc[ctxt_pP->module_id]->carrier[0].N_RB_DL);
     derive_keNB_star(ue_context_pP->ue_context.kenb, X2AP_HANDOVER_REQ(msg).target_physCellId, earfcn_dl, true, KeNB_star);
     memcpy(X2AP_HANDOVER_REQ(msg).kenb, KeNB_star, 32);
     X2AP_HANDOVER_REQ(msg).kenb_ncc = ue_context_pP->ue_context.kenb_ncc;
@@ -4716,17 +4378,18 @@ rrc_eNB_generate_HandoverPreparationInformation(
 
 void rrc_eNB_process_x2_setup_request(int mod_id, x2ap_setup_req_t *m) {
   if (RC.rrc[mod_id]->num_neigh_cells > MAX_NUM_NEIGH_CELLs) {
-     LOG_E(RRC, "Error: number of neighbouring cells is exceeded \n");
-     return;
+    LOG_E(RRC, "Error: number of neighbouring cells is exceeded \n");
+    return;
   }
 
   if (m->num_cc > MAX_NUM_CCs) {
-     LOG_E(RRC, "Error: number of neighbouring cells carriers is exceeded \n");
-     return;
+    LOG_E(RRC, "Error: number of neighbouring cells carriers is exceeded \n");
+    return;
   }
 
   RC.rrc[mod_id]->num_neigh_cells++;
   RC.rrc[mod_id]->num_neigh_cells_cc[RC.rrc[mod_id]->num_neigh_cells-1] = m->num_cc;
+
   for (int i=0; i<m->num_cc; i++) {
     RC.rrc[mod_id]->neigh_cells_id[RC.rrc[mod_id]->num_neigh_cells-1][i] = m->Nid_cell[i];
   }
@@ -4734,17 +4397,18 @@ void rrc_eNB_process_x2_setup_request(int mod_id, x2ap_setup_req_t *m) {
 
 void rrc_eNB_process_x2_setup_response(int mod_id, x2ap_setup_resp_t *m) {
   if (RC.rrc[mod_id]->num_neigh_cells > MAX_NUM_NEIGH_CELLs) {
-     LOG_E(RRC, "Error: number of neighbouring cells is exceeded \n");
-     return;
+    LOG_E(RRC, "Error: number of neighbouring cells is exceeded \n");
+    return;
   }
 
   if (m->num_cc > MAX_NUM_CCs) {
-     LOG_E(RRC, "Error: number of neighbouring cells carriers is exceeded \n");
-     return;
+    LOG_E(RRC, "Error: number of neighbouring cells carriers is exceeded \n");
+    return;
   }
 
   RC.rrc[mod_id]->num_neigh_cells++;
   RC.rrc[mod_id]->num_neigh_cells_cc[RC.rrc[mod_id]->num_neigh_cells-1] = m->num_cc;
+
   for (int i=0; i<m->num_cc; i++) {
     RC.rrc[mod_id]->neigh_cells_id[RC.rrc[mod_id]->num_neigh_cells-1][i] = m->Nid_cell[i];
   }
@@ -4788,16 +4452,15 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
   ue_context_target_p->ue_context.kenb_ncc = m->kenb_ncc;
   ue_context_target_p->ue_context.security_capabilities.encryption_algorithms = m->security_capabilities.encryption_algorithms;
   ue_context_target_p->ue_context.security_capabilities.integrity_algorithms = m->security_capabilities.integrity_algorithms;
-
   dec_rval = uper_decode(NULL,
                          &asn_DEF_LTE_HandoverPreparationInformation,
                          (void **)&ho,
                          m->rrc_buffer,
                          m->rrc_buffer_size, 0, 0);
 
- if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-     xer_fprint(stdout, &asn_DEF_LTE_HandoverPreparationInformation, ho);
- }
+  if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
+    xer_fprint(stdout, &asn_DEF_LTE_HandoverPreparationInformation, ho);
+  }
 
   if (dec_rval.code != RC_OK ||
       ho->criticalExtensions.present != LTE_HandoverPreparationInformation__criticalExtensions_PR_c1 ||
@@ -4820,18 +4483,17 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
                          (void **)&ue_context_target_p->ue_context.UE_Capability,
                          ho_info->ue_RadioAccessCapabilityInfo.list.array[0]->ueCapabilityRAT_Container.buf,
                          ho_info->ue_RadioAccessCapabilityInfo.list.array[0]->ueCapabilityRAT_Container.size, 0, 0);
-
   ue_context_target_p->ue_context.UE_Capability_size = ho_info->ue_RadioAccessCapabilityInfo.list.array[0]->ueCapabilityRAT_Container.size;
 
   if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
-     xer_fprint(stdout, &asn_DEF_LTE_UE_EUTRA_Capability, ue_context_target_p->ue_context.UE_Capability);
+    xer_fprint(stdout, &asn_DEF_LTE_UE_EUTRA_Capability, ue_context_target_p->ue_context.UE_Capability);
   }
 
   if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) {
-      LOG_E(RRC, "Failed to decode UE capabilities (%zu bytes)\n", dec_rval.consumed);
-      ASN_STRUCT_FREE(asn_DEF_LTE_UE_EUTRA_Capability,
-                      ue_context_target_p->ue_context.UE_Capability);
-      ue_context_target_p->ue_context.UE_Capability = 0;
+    LOG_E(RRC, "Failed to decode UE capabilities (%zu bytes)\n", dec_rval.consumed);
+    ASN_STRUCT_FREE(asn_DEF_LTE_UE_EUTRA_Capability,
+                    ue_context_target_p->ue_context.UE_Capability);
+    ue_context_target_p->ue_context.UE_Capability = 0;
   }
 
   ue_context_target_p->ue_context.nb_of_e_rabs = m->nb_e_rabs_tobesetup;
@@ -4853,8 +4515,8 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re
           ue_context_target_p->ue_context.e_rab[i].param.e_rab_id,
           ue_context_target_p->ue_context.e_rab[i].param.gtp_teid);
   }
-  rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(mod_id, ue_context_target_p);
 
+  rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(mod_id, ue_context_target_p);
   ue_context_target_p->ue_context.Status = RRC_HO_EXECUTION;
   ue_context_target_p->ue_context.handover_info->state = HO_ACK;
 }
@@ -4894,21 +4556,18 @@ void rrc_eNB_process_handoverCommand(
 }
 
 void rrc_eNB_handover_ue_context_release(
-        protocol_ctxt_t *const ctxt_pP,
-        struct rrc_eNB_ue_context_s *ue_context_p) {
+  protocol_ctxt_t *const ctxt_pP,
+  struct rrc_eNB_ue_context_s *ue_context_p) {
   int e_rab = 0;
   //MessageDef *msg_release_p = NULL;
   MessageDef *msg_delete_tunnels_p = NULL;
   uint32_t eNB_ue_s1ap_id = ue_context_p->ue_context.eNB_ue_s1ap_id;
-
   //msg_release_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE);
   //itti_send_msg_to_task(TASK_S1AP, ctxt_pP->module_id, msg_release_p);
   s1ap_ue_context_release(ctxt_pP->instance, ue_context_p->ue_context.eNB_ue_s1ap_id);
-
   //MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL,0, "0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ", eNB_ue_s1ap_id);
   msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
   memset(&GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
-
   GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
 
   for (e_rab = 0; e_rab < ue_context_p->ue_context.nb_of_e_rabs; e_rab++) {
@@ -4931,10 +4590,9 @@ void rrc_eNB_handover_ue_context_release(
 
 /* This function may be incorrect. */
 void rrc_eNB_handover_cancel(
-        protocol_ctxt_t              *const ctxt_pP,
-        struct rrc_eNB_ue_context_s  *ue_context_p) {
+  protocol_ctxt_t              *const ctxt_pP,
+  struct rrc_eNB_ue_context_s  *ue_context_p) {
   int s1_cause = 1;                        /* 1 = tx2relocoverall-expiry */
-
   rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(ctxt_pP->module_id, ue_context_p,
       S1AP_CAUSE_RADIO_NETWORK, s1_cause);
 }
@@ -4942,10 +4600,9 @@ void rrc_eNB_handover_cancel(
 
 int
 flexran_rrc_eNB_trigger_handover (int mod_id,
-  const protocol_ctxt_t *const ctxt_pP,
-  rrc_eNB_ue_context_t  *ue_context_pP,
-  int target_cell_id) {
-
+                                  const protocol_ctxt_t *const ctxt_pP,
+                                  rrc_eNB_ue_context_t  *ue_context_pP,
+                                  int target_cell_id) {
   uint32_t earfcn_dl;
   uint8_t KeNB_star[32] = { 0 };
   int cell_found = 0;
@@ -4979,7 +4636,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
     LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe);
     /* Check memory leakage for handover info */
     //if (ue_context_pP->ue_context.handover_info) {
-      //free(ue_context_pP->ue_context.handover_info);
+    //free(ue_context_pP->ue_context.handover_info);
     //}
     ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
     ue_context_pP->ue_context.Status = RRC_HO_EXECUTION;
@@ -5002,7 +4659,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id,
     X2AP_HANDOVER_REQ(msg).security_capabilities = ue_context_pP->ue_context.security_capabilities;
     // compute keNB*
     earfcn_dl = (uint32_t)to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->carrier[0].eutra_band, RC.rrc[ctxt_pP->module_id]->carrier[0].dl_CarrierFreq,
-    RC.rrc[ctxt_pP->module_id]->carrier[0].N_RB_DL);
+                                       RC.rrc[ctxt_pP->module_id]->carrier[0].N_RB_DL);
     derive_keNB_star(ue_context_pP->ue_context.kenb, X2AP_HANDOVER_REQ(msg).target_physCellId, earfcn_dl, true, KeNB_star);
     memcpy(X2AP_HANDOVER_REQ(msg).kenb, KeNB_star, 32);
     X2AP_HANDOVER_REQ(msg).kenb_ncc = ue_context_pP->ue_context.kenb_ncc;
@@ -5057,13 +4714,12 @@ check_handovers(
               ctxt_pP->module_id, ctxt_pP->frame, ue_context_p->ue_context.rnti);
         rrc_data_req(
           ctxt_pP,
-                               DCCH,
-                               rrc_eNB_mui++,
-                               SDU_CONFIRM_NO,
-                               ue_context_p->ue_context.handover_info->size,
-                               ue_context_p->ue_context.handover_info->buf,
+          DCCH,
+          rrc_eNB_mui++,
+          SDU_CONFIRM_NO,
+          ue_context_p->ue_context.handover_info->size,
+          ue_context_p->ue_context.handover_info->buf,
           PDCP_TRANSMISSION_MODE_CONTROL);
-
         ue_context_p->ue_context.handover_info->state = HO_COMPLETE;
         LOG_I(RRC, "RRC Sends RRCConnectionReconfiguration to UE %d  at frame %d and subframe %d \n", ue_context_p->ue_context.rnti, ctxt_pP->frame,ctxt_pP->subframe);
       }
@@ -5073,12 +4729,10 @@ check_handovers(
         MessageDef *msg;
         // Configure target
         ue_context_p->ue_context.handover_info->state = HO_FORWARDING;
-
         msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_HANDOVER_REQ_ACK);
         rrc_eNB_generate_HO_RRCConnectionReconfiguration(ctxt_pP, ue_context_p, X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer,
             &X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer_size);
         rrc_eNB_configure_rbs_handover(ue_context_p,ctxt_pP);
-
         X2AP_HANDOVER_REQ_ACK(msg).rnti = ue_context_p->ue_context.rnti;
         X2AP_HANDOVER_REQ_ACK(msg).x2_id_target = ue_context_p->ue_context.handover_info->x2_id;
         X2AP_HANDOVER_REQ_ACK(msg).source_assoc_id = ue_context_p->ue_context.handover_info->assoc_id;
@@ -5088,7 +4742,7 @@ check_handovers(
         for (int i=0; i<ue_context_p->ue_context.setup_e_rabs; i++) {
           /* set gtpv teid info */
           X2AP_HANDOVER_REQ_ACK(msg).e_rabs_tobesetup[i].e_rab_id = ue_context_p->ue_context.e_rab[i].param.e_rab_id;
-	  X2AP_HANDOVER_REQ_ACK(msg).e_rabs_tobesetup[i].gtp_teid = ue_context_p->ue_context.enb_gtp_x2u_teid[i];
+          X2AP_HANDOVER_REQ_ACK(msg).e_rabs_tobesetup[i].gtp_teid = ue_context_p->ue_context.enb_gtp_x2u_teid[i];
           X2AP_HANDOVER_REQ_ACK(msg).e_rabs_tobesetup[i].eNB_addr = ue_context_p->ue_context.enb_gtp_x2u_addrs[i];
         }
 
@@ -5097,84 +4751,80 @@ check_handovers(
       }
     }
 
-    if (ue_context_p->ue_context.Status == RRC_RECONFIGURED 
-	&& ue_context_p->ue_context.handover_info != NULL && 
-	ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
-
+    if (ue_context_p->ue_context.Status == RRC_RECONFIGURED
+        && ue_context_p->ue_context.handover_info != NULL &&
+        ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
 #if defined(ENABLE_ITTI)
-      MessageDef	 *msg_p;
-      int		 result;
+      MessageDef   *msg_p;
+      int    result;
       protocol_ctxt_t  ctxt;
 
       do {
         // Checks if a message has been sent to PDCP sub-task
-	itti_poll_msg (TASK_DATA_FORWARDING, &msg_p);
-  
-	if (msg_p != NULL) {
-  
-	  switch (ITTI_MSG_ID(msg_p)) {
-	    case GTPV1U_ENB_DATA_FORWARDING_IND:
-	    PROTOCOL_CTXT_SET_BY_MODULE_ID(
-			&ctxt,
-			GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).module_id,
-			GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).enb_flag,
-			GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rnti,
-			GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).frame, 
-		        0,
-		        GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).eNB_index);
-	    LOG_D(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
-		  PROTOCOL_CTXT_ARGS(&ctxt),
-		  ITTI_MSG_NAME (msg_p),
-		  ITTI_MSG_ORIGIN_NAME(msg_p),
-		  ITTI_MSG_INSTANCE (msg_p),
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode);
-  
-	    LOG_I(RRC, "Before calling pdcp_data_req from check_handovers! GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id: %d \n", GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id);
-            result = pdcp_data_req (&ctxt,
-				    SRB_FLAG_NO,
-			            GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
-				    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
-				    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
-			            GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_size,
-				    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_p,
-				    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-				    , NULL, NULL
-#endif
-				    );
-	    if (result != TRUE){
-              LOG_E(RRC, "target enb send data forwarding buffer to PDCP request failed!\n");   
-            }else{
-              LOG_D(RRC, "target enb send data forwarding buffer to PDCP!\n");
-            }
+        itti_poll_msg (TASK_DATA_FORWARDING, &msg_p);
 
-            // Message buffer has been processed, free it now.
-	    result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_p);
-	    AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
-            break;
-  
-	default:
-	  LOG_E(RRC, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
-	  break;
-	}
-  
-	result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
-	AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
-      }
-    } while(msg_p != NULL);
-    ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_EMPTY;
+        if (msg_p != NULL) {
+          switch (ITTI_MSG_ID(msg_p)) {
+            case GTPV1U_ENB_DATA_FORWARDING_IND:
+              PROTOCOL_CTXT_SET_BY_MODULE_ID(
+                &ctxt,
+                GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).module_id,
+                GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).enb_flag,
+                GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rnti,
+                GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).frame,
+                0,
+                GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).eNB_index);
+              LOG_D(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
+                    PROTOCOL_CTXT_ARGS(&ctxt),
+                    ITTI_MSG_NAME (msg_p),
+                    ITTI_MSG_ORIGIN_NAME(msg_p),
+                    ITTI_MSG_INSTANCE (msg_p),
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode);
+              LOG_I(RRC, "Before calling pdcp_data_req from check_handovers! GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id: %d \n", GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id);
+              result = pdcp_data_req (&ctxt,
+                                      SRB_FLAG_NO,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_size,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_p,
+                                      GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode, NULL, NULL
+                                     );
+
+              if (result != TRUE) {
+                LOG_E(RRC, "target enb send data forwarding buffer to PDCP request failed!\n");
+              } else {
+                LOG_D(RRC, "target enb send data forwarding buffer to PDCP!\n");
+              }
+
+              // Message buffer has been processed, free it now.
+              result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).sdu_p);
+              AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
+              break;
+
+            default:
+              LOG_E(RRC, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
+              break;
+          }
+
+          result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
+          AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
+        }
+      } while(msg_p != NULL);
+
+      ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_EMPTY;
     }
-    if( ue_context_p->ue_context.Status == RRC_RECONFIGURED &&
-	ue_context_p->ue_context.handover_info != NULL &&
-	ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_EMPTY &&
-	ue_context_p->ue_context.handover_info->endmark_state == ENDMARK_NO_EMPTY &&
-	ue_context_p->ue_context.handover_info->state == HO_END_MARKER	  ){
 
-      MessageDef	 *msg_p;
-      int		 result;
+    if( ue_context_p->ue_context.Status == RRC_RECONFIGURED &&
+        ue_context_p->ue_context.handover_info != NULL &&
+        ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_EMPTY &&
+        ue_context_p->ue_context.handover_info->endmark_state == ENDMARK_NO_EMPTY &&
+        ue_context_p->ue_context.handover_info->state == HO_END_MARKER    ) {
+      MessageDef   *msg_p;
+      int    result;
       protocol_ctxt_t  ctxt;
 
       do {
@@ -5182,54 +4832,50 @@ check_handovers(
         itti_poll_msg (TASK_END_MARKER, &msg_p);
 
         if (msg_p != NULL) {
+          switch (ITTI_MSG_ID(msg_p)) {
+            case GTPV1U_ENB_END_MARKER_IND:
+              PROTOCOL_CTXT_SET_BY_MODULE_ID(
+                &ctxt,
+                GTPV1U_ENB_END_MARKER_IND (msg_p).module_id,
+                GTPV1U_ENB_END_MARKER_IND (msg_p).enb_flag,
+                GTPV1U_ENB_END_MARKER_IND (msg_p).rnti,
+                GTPV1U_ENB_END_MARKER_IND (msg_p).frame,
+                0,
+                GTPV1U_ENB_END_MARKER_IND (msg_p).eNB_index);
+              LOG_I(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
+                    PROTOCOL_CTXT_ARGS(&ctxt),
+                    ITTI_MSG_NAME (msg_p),
+                    ITTI_MSG_ORIGIN_NAME(msg_p),
+                    ITTI_MSG_INSTANCE (msg_p),
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
+                    GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode);
+              LOG_D(RRC, "Before calling pdcp_data_req from check_handovers! GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id: %d \n", GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id);
+              result = pdcp_data_req (&ctxt,
+                                      SRB_FLAG_NO,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).rb_id,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).muip,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).confirmp,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_size,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_p,
+                                      GTPV1U_ENB_END_MARKER_IND (msg_p).mode, NULL, NULL
+                                     );
 
-	switch (ITTI_MSG_ID(msg_p)) {
-	  case GTPV1U_ENB_END_MARKER_IND:
-	    PROTOCOL_CTXT_SET_BY_MODULE_ID(
-	        &ctxt,
-		GTPV1U_ENB_END_MARKER_IND (msg_p).module_id,
-	        GTPV1U_ENB_END_MARKER_IND (msg_p).enb_flag,
-		GTPV1U_ENB_END_MARKER_IND (msg_p).rnti,
-		GTPV1U_ENB_END_MARKER_IND (msg_p).frame,
-		0,
-		GTPV1U_ENB_END_MARKER_IND (msg_p).eNB_index);
-	    LOG_I(RRC, PROTOCOL_CTXT_FMT"[check_handovers]Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
-		  PROTOCOL_CTXT_ARGS(&ctxt),
-		  ITTI_MSG_NAME (msg_p),
-		  ITTI_MSG_ORIGIN_NAME(msg_p),
-		  ITTI_MSG_INSTANCE (msg_p),
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).muip,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).confirmp,
-		  GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode);
-
-	    LOG_D(RRC, "Before calling pdcp_data_req from check_handovers! GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id: %d \n", GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).rb_id);
-	    result = pdcp_data_req (&ctxt,
-		  		    SRB_FLAG_NO,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).rb_id,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).muip,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).confirmp,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_size,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_p,
-		  		    GTPV1U_ENB_END_MARKER_IND (msg_p).mode
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-		  		    , NULL, NULL
-#endif
-		  		   );
-	    if (result != TRUE){
-              LOG_E(RRC, "target enb send spgw buffer to PDCP request failed!\n");
-	    }else{
-	      LOG_D(RRC, "target enb send spgw buffer to PDCP!\n");
-	    }
-
-	    // Message buffer has been processed, free it now.
-	    result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_p);
-	    AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
-	    break;
-
-	    default:
-	      LOG_E(RRC, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
-	      break;
+              if (result != TRUE) {
+                LOG_E(RRC, "target enb send spgw buffer to PDCP request failed!\n");
+              } else {
+                LOG_D(RRC, "target enb send spgw buffer to PDCP!\n");
+              }
+
+              // Message buffer has been processed, free it now.
+              result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), GTPV1U_ENB_END_MARKER_IND (msg_p).sdu_p);
+              AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
+              break;
+
+            default:
+              LOG_E(RRC, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
+              break;
           }
 
           result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
@@ -5239,7 +4885,6 @@ check_handovers(
 
       ue_context_p->ue_context.handover_info->endmark_state = ENDMARK_EMPTY;
       ue_context_p->ue_context.handover_info->state = HO_FORWARDING_COMPLETE;
-
 #endif
     }
   }
@@ -5293,11 +4938,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
                                      *ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
   LTE_MeasIdToAddModList_t           *MeasId_list                      = NULL;
   LTE_MeasIdToAddMod_t               *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   long                               *sr_ProhibitTimer_r9              = NULL;
-  //     uint8_t sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1);
-  //uint8_t                            sCellIndexToAdd = 0;
-#endif
   long                               *logicalchannelgroup, *logicalchannelgroup_drb;
   long                               *maxHARQ_Tx, *periodicBSR_Timer;
   LTE_RSRP_Range_t                   *rsrp                             = NULL;
@@ -5314,31 +4955,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   LTE_C_RNTI_t                       *cba_RNTI                         = NULL;
   int                                measurements_enabled;
   uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);   //Transaction_id,
-#ifdef CBA
-  //struct PUSCH_CBAConfigDedicated_vlola  *pusch_CBAConfigDedicated_vlola;
-  uint8_t                            *cba_RNTI_buf;
-  cba_RNTI = CALLOC(1, sizeof(C_RNTI_t));
-  cba_RNTI_buf = CALLOC(1, 2 * sizeof(uint8_t));
-  cba_RNTI->buf = cba_RNTI_buf;
-  cba_RNTI->size = 2;
-  cba_RNTI->bits_unused = 0;
-
-  // associate UEs to the CBa groups as a function of their UE id
-  if (rrc_inst->num_active_cba_groups) {
-    cba_RNTI->buf[0] = rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups] & 0xff;
-    cba_RNTI->buf[1] = 0xff;
-    LOG_D(RRC,
-          "[eNB %d] Frame %d: cba_RNTI = %x in group %d is attribued to UE %d\n",
-          enb_mod_idP, frameP,
-          rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups],
-          ue_mod_idP % rrc_inst->num_active_cba_groups, ue_mod_idP);
-  } else {
-    cba_RNTI->buf[0] = 0x0;
-    cba_RNTI->buf[1] = 0x0;
-    LOG_D(RRC, "[eNB %d] Frame %d: no cba_RNTI is configured for UE %d\n", enb_mod_idP, frameP, ue_mod_idP);
-  }
-
-#endif
   T(T_ENB_RRC_CONNECTION_RECONFIGURATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
   rv[0] = (ue_context_pP->ue_context.rnti >> 8) & 255;
@@ -5464,11 +5080,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
   DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
-#ifdef CBA
-  DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering   = LTE_T_Reordering_ms5;//T_Reordering_ms25;
-#else
   DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
-#endif
 #endif
   DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
   DRB_config->pdcp_Config = DRB_pdcp_config;
@@ -5523,13 +5135,11 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;  // Value dB1 =1 dB, dB3 = 3 dB
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
   *sr_ProhibitTimer_r9 = 0;   // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
   mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
   mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
   //sps_RA_ConfigList_rlola = NULL;
-#endif
 
   //change the transmission mode for the primary component carrier
   //TODO: add codebook subset restriction here
@@ -5669,17 +5279,9 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
     //feedback mode needs to be set as well
     //TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
     printf("setting cqi reporting mode to rm31\n");
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=LTE_CQI_ReportModeAperiodic_rm31;
-#else
-    *((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, no PMI
-#endif
   } else {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic= LTE_CQI_ReportModeAperiodic_rm30;
-#else
-    *physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI
-#endif
   }
 
   //}
@@ -5727,21 +5329,13 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   rrc_mac_config_req_eNB(
     ctxt_pP->module_id,
     ue_context_pP->ue_context.primaryCC_id,
-    0,0,0,0,0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    0,
-#endif
+    0,0,0,0,0,0,
     ue_context_pP->ue_context.rnti,
     (LTE_BCCH_BCH_Message_t *) NULL,
     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
     ue_context_pP->ue_context.physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     (LTE_SCellToAddMod_r10_t *)NULL,
-    //(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
     (LTE_MeasObjectToAddMod_t **) NULL,
     ue_context_pP->ue_context.mac_MainConfig,
     1,
@@ -5753,23 +5347,15 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
     0,
     NULL,
     NULL,
-    (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-    , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-    ,
-    (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
+    (LTE_MBSFN_SubframeConfigList_t *) NULL,
+    0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
+    (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+    0,
+    (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+    (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+    (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+    (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+    (LTE_MBSFN_AreaInfoList_r9_t *) NULL
   );
   // Configure target eNB SRB2
   /// SRB2
@@ -5857,13 +5443,10 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
   mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;  // Value dB1 =1 dB, dB3 = 3 dB
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
   sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
   *sr_ProhibitTimer_r9 = 0;   // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
   mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
   mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
-  //sps_RA_ConfigList_rlola = NULL;
-#endif
   // Measurement ID list
   MeasId_list = CALLOC(1, sizeof(*MeasId_list));
   memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
@@ -5907,9 +5490,9 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   MeasObj->measObjectId = 1;
   MeasObj->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
   MeasObj->measObject.choice.measObjectEUTRA.carrierFreq =
-      to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
+    to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
   MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = LTE_AllowedMeasBandwidth_mbw25;
   MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
   MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
@@ -5942,6 +5525,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
     ue_context_pP->ue_context.measurement_info->cellIndividualOffset[i+1] = CellToAdd->cellIndividualOffset;
     ASN_SEQUENCE_ADD(&CellsToAddModList->list, CellToAdd);
   }
+
   ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj);
   //  LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
 
@@ -6066,7 +5650,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
 
   /* A3 event update */
   if (!ue_context_pP->ue_context.measurement_info->events->a3_event) {
-      ue_context_pP->ue_context.measurement_info->events->a3_event = CALLOC(1,sizeof(*(ue_context_pP->ue_context.measurement_info->events->a3_event)));
+    ue_context_pP->ue_context.measurement_info->events->a3_event = CALLOC(1,sizeof(*(ue_context_pP->ue_context.measurement_info->events->a3_event)));
   }
 
   ue_context_pP->ue_context.measurement_info->events->a3_event->a3_offset = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset;
@@ -6074,13 +5658,12 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   ue_context_pP->ue_context.measurement_info->events->a3_event->hysteresis = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis;
   ue_context_pP->ue_context.measurement_info->events->a3_event->timeToTrigger = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger;
   ue_context_pP->ue_context.measurement_info->events->a3_event->maxReportCells = ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells;
-
 #if 0
-    /* TODO: set a proper value.
-     * 20 means: UE does not report if RSRP of serving cell is higher
-     * than -120 dB (see 36.331 5.5.3.1).
-     * This is too low for the X2 handover experiment.
-     */
+  /* TODO: set a proper value.
+   * 20 means: UE does not report if RSRP of serving cell is higher
+   * than -120 dB (see 36.331 5.5.3.1).
+   * This is too low for the X2 handover experiment.
+   */
   rsrp = CALLOC(1, sizeof(RSRP_Range_t));
   *rsrp = 20;
 #endif
@@ -6105,10 +5688,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
     CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = LTE_FilterCoefficient_fc4;
   *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = LTE_FilterCoefficient_fc4;
-
   ue_context_pP->ue_context.measurement_info->filterCoefficientRSRP = *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP;
   ue_context_pP->ue_context.measurement_info->filterCoefficientRSRQ = *quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ;
-
   /* mobilityinfo  */
   mobilityInfo = ue_context_pP->ue_context.mobilityInfo;
 
@@ -6180,9 +5761,9 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   //End of configuration of radioResourceConfigCommon
   mobilityInfo->carrierFreq = CALLOC(1, sizeof(*mobilityInfo->carrierFreq));  //CALLOC(1,sizeof(CarrierFreqEUTRA_t)); 36090
   mobilityInfo->carrierFreq->dl_CarrierFreq =
-      to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
-                   RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
+    to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
+                 RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
   mobilityInfo->carrierFreq->ul_CarrierFreq = NULL;
   mobilityInfo->carrierBandwidth = CALLOC(1, sizeof(
       *mobilityInfo->carrierBandwidth));    //CALLOC(1,sizeof(struct CarrierBandwidthEUTRA));  AllowedMeasBandwidth_mbw25
@@ -6254,10 +5835,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   }
 
 #endif
-
   measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
                          RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
-
   memset(buffer, 0, RRC_BUF_SIZE);
   char rrc_buf[1000 /* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */];
   int rrc_size;
@@ -6286,10 +5865,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
              (LTE_C_RNTI_t *)cba_RNTI,
              (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)dedicatedInfoNASList,
              (LTE_SL_CommConfig_r12_t *)NULL,
-             (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-             , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+             (LTE_SL_DiscConfig_r12_t *)NULL,
+             (LTE_SCellToAddMod_r10_t *)NULL
                                             );
 
   if (rrc_size <= 0) {
@@ -6334,22 +5911,16 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
     ue_context_pP->ue_context.rnti,
     rrc_eNB_mui,
     size);
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
-
   free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
   quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
-
   free(quantityConfig->quantityConfigEUTRA);
   quantityConfig->quantityConfigEUTRA = NULL;
-
   free(quantityConfig);
   quantityConfig = NULL;
-
   free(securityConfigHO);
   securityConfigHO = NULL;
-
   free(Sparams);
   Sparams = NULL;
 }
@@ -6381,34 +5952,28 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
                            0xff,
                            NULL,
                            NULL,
-                           NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                           , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-                           , NULL);
+                           NULL,
+                           (LTE_PMCH_InfoList_r9_t *) NULL, NULL);
   rrc_rlc_config_asn1_req(ctxt_pP,
                           ue_context_p->ue_context.SRB_configList,
                           (LTE_DRB_ToAddModList_t *) NULL,
-                          (LTE_DRB_ToReleaseList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                          , (LTE_PMCH_InfoList_r9_t *) NULL
-                          , 0, 0
-#endif
+                          (LTE_DRB_ToReleaseList_t *) NULL,
+                          (LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
                          );
 
   if (EPC_MODE_ENABLED) {
-  rrc_eNB_process_security (
-    ctxt_pP,
-    ue_context_p,
-    &ue_context_p->ue_context.security_capabilities);
-  process_eNB_security_key (
-    ctxt_pP,
-    ue_context_p,
-    ue_context_p->ue_context.kenb);
-  rrc_pdcp_config_security(
-    ctxt_pP,
-    ue_context_p,
-    FALSE);
+    rrc_eNB_process_security (
+      ctxt_pP,
+      ue_context_p,
+      &ue_context_p->ue_context.security_capabilities);
+    process_eNB_security_key (
+      ctxt_pP,
+      ue_context_p,
+      ue_context_p->ue_context.kenb);
+    rrc_pdcp_config_security(
+      ctxt_pP,
+      ue_context_p,
+      FALSE);
   }
 
   // Add a new user (called during the HO procedure)
@@ -6417,21 +5982,13 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
   rrc_mac_config_req_eNB(
     ctxt_pP->module_id,
     ue_context_p->ue_context.primaryCC_id,
-    0,0,0,0,0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-    0,
-#endif
+    0,0,0,0,0, 0,
     ue_context_p->ue_context.rnti,
     (LTE_BCCH_BCH_Message_t *) NULL,
     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
     ue_context_p->ue_context.physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     (LTE_SCellToAddMod_r10_t *)NULL,
-    //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
     (LTE_MeasObjectToAddMod_t **) NULL,
     ue_context_p->ue_context.mac_MainConfig,
     1,
@@ -6443,27 +6000,16 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
     0,
     NULL,
     NULL,
-    (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-    , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-    ,
-    (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
+    (LTE_MBSFN_SubframeConfigList_t *) NULL, 0,
+    (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
+    (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+    0,
+    (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+    (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+    (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+    (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+    (LTE_MBSFN_AreaInfoList_r9_t *) NULL
   );
-//#if 0
-//}
-//#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -6488,19 +6034,20 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
   LTE_SRB_ToAddModList_t             *SRB_configList = ue_context_pP->ue_context.SRB_configList2[xid];
   LTE_DRB_ToReleaseList_t            *DRB_Release_configList2 = ue_context_pP->ue_context.DRB_Release_configList2[xid];
   LTE_DRB_Identity_t                 *drb_id_p      = NULL;
-
   ue_context_pP->ue_context.ue_reestablishment_timer = 0;
   ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // reset rrc inactivity timer
 
   if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
     /* CDRX: activated if ack was expected */
     int UE_id_mac = find_UE_id(ctxt_pP->module_id, ue_context_pP->ue_context.rnti);
-    if (UE_id_mac == -1){
+
+    if (UE_id_mac == -1) {
       LOG_E(RRC,PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_RRCConnectionReconfigurationComplete without UE_id(MAC) rnti %x, let's return\n",PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ue_context_pP->ue_context.rnti);
       return;
     }
+
     UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id_mac]);
-    
+
     if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
       UE_scheduling_control->cdrx_waiting_ack = FALSE;
       UE_scheduling_control->cdrx_configured = TRUE;
@@ -6524,40 +6071,32 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
   derive_key_rrc_enc(ue_context_pP->ue_context.ciphering_algorithm,
                      ue_context_pP->ue_context.kenb,
                      &kRRCenc);
-
   derive_key_rrc_int(ue_context_pP->ue_context.integrity_algorithm,
                      ue_context_pP->ue_context.kenb,
                      &kRRCint);
-
   /* Refresh SRBs/DRBs */
   MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_PDCP_ENB, NULL, 0, MSC_AS_TIME_FMT" CONFIG_REQ UE %x DRB (security unchanged)",
                      MSC_AS_TIME_ARGS(ctxt_pP),
                      ue_context_pP->ue_context.rnti);
-
   rrc_pdcp_config_asn1_req(ctxt_pP,
-                          SRB_configList, // NULL,
-                          DRB_configList,
-                          DRB_Release_configList2,
-                          0xff, // already configured during the securitymodecommand
-                          kRRCenc,
-                          kRRCint,
-                          kUPenc
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                          , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-                          , NULL);
-
+                           SRB_configList, // NULL,
+                           DRB_configList,
+                           DRB_Release_configList2,
+                           0xff, // already configured during the securitymodecommand
+                           kRRCenc,
+                           kRRCint,
+                           kUPenc,
+                           (LTE_PMCH_InfoList_r9_t *) NULL,
+                           NULL);
   /* Refresh SRBs/DRBs */
   rrc_rlc_config_asn1_req(ctxt_pP,
                           SRB_configList, // NULL,
                           DRB_configList,
-                          DRB_Release_configList2
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                          , (LTE_PMCH_InfoList_r9_t *) NULL,
+                          DRB_Release_configList2,
+                          (LTE_PMCH_InfoList_r9_t *) NULL,
                           0,
                           0
-#endif
-                          );
+                         );
 
   /* Set the SRB active in UE context */
   if (SRB_configList != NULL) {
@@ -6589,14 +6128,12 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
     for (int i = 0; i < DRB_configList->list.count; i++) {  // num max DRB (11-3-8)
       if (DRB_configList->list.array[i]) {
         drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
-
         LOG_I(RRC, "[eNB %d] Frame  %d : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti %x, reconfiguring DRB %d/LCID %d\n",
               ctxt_pP->module_id,
               ctxt_pP->frame,
               ctxt_pP->rnti,
               (int)DRB_configList->list.array[i]->drb_Identity,
               (int)*DRB_configList->list.array[i]->logicalChannelIdentity);
-
         /* For pre-ci tests */
         LOG_I(RRC, "[eNB %d] Frame  %d : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE %u, reconfiguring DRB %d/LCID %d\n",
               ctxt_pP->module_id,
@@ -6614,7 +6151,6 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
             LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n",
                   ctxt_pP->module_id,
                   ctxt_pP->module_id);
-
             oip_ifup = nas_config(ctxt_pP->module_id,   // interface index
                                   ctxt_pP->module_id + 1,   // third octet
                                   ctxt_pP->module_id + 1,   // fourth octet
@@ -6626,15 +6162,15 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
               LOG_I(OIP,
                     "[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n",
                     ctxt_pP->module_id, ctxt_pP->module_id,
-                      (long int)((ue_context_pP->local_uid * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity));
+                    (long int)((ue_context_pP->local_uid * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity));
               ue_module_id = oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[ctxt_pP->module_id][ue_context_pP->local_uid];
               rb_conf_ipv4(0, //add
-                          ue_module_id,  //cx
-                          ctxt_pP->module_id,    //inst
-                          (ue_module_id * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity, // RB
-                          0,    //dscp
-                          ipv4_address(ctxt_pP->module_id + 1, ctxt_pP->module_id + 1),  //saddr
-                          ipv4_address(ctxt_pP->module_id + 1, dest_ip_offset + ue_module_id + 1));  //daddr
+                           ue_module_id,  //cx
+                           ctxt_pP->module_id,    //inst
+                           (ue_module_id * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity, // RB
+                           0,    //dscp
+                           ipv4_address(ctxt_pP->module_id + 1, ctxt_pP->module_id + 1),  //saddr
+                           ipv4_address(ctxt_pP->module_id + 1, dest_ip_offset + ue_module_id + 1));  //daddr
               LOG_D(RRC, "[eNB %d] State = Attached (UE rnti %x module id %u)\n",
                     ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ue_module_id);
             } /* oip_ifup */
@@ -6648,7 +6184,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
             DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
           }
 
-	        if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
+          if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
             rrc_mac_config_req_eNB(ctxt_pP->module_id,
                                    ue_context_pP->ue_context.primaryCC_id,
                                    0,
@@ -6656,19 +6192,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
                                    0,
                                    0,
                                    0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                    0,
-#endif
                                    ue_context_pP->ue_context.rnti,
                                    (LTE_BCCH_BCH_Message_t *) NULL,
                                    (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                    (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
                                    ue_context_pP->ue_context.physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                    (LTE_SCellToAddMod_r10_t *)NULL,
-#endif
                                    (LTE_MeasObjectToAddMod_t **) NULL,
                                    ue_context_pP->ue_context.mac_MainConfig,
                                    DRB2LCHAN[i],
@@ -6680,27 +6210,18 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
                                    0,
                                    NULL,
                                    NULL,
-                                   (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                   , 0,
+                                   (LTE_MBSFN_SubframeConfigList_t *) NULL, 0,
                                    (LTE_MBSFN_AreaInfoList_r9_t *) NULL,
-                                   (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                                   ,
-                                   (LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-          );
-	 }
+                                   (LTE_PMCH_InfoList_r9_t *) NULL,
+                                   (LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL,
+                                   0,
+                                   (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                                   (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                                   (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                                   (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                                   (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                                  );
+          }
         } else {        // remove LCHAN from MAC/PHY
           if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) {
             // DRB has just been removed so remove RLC + PDCP for DRB
@@ -6709,18 +6230,18 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
              */
             if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
               rrc_rlc_config_req(ctxt_pP,
-                                SRB_FLAG_NO,
-                                MBMS_FLAG_NO,
-                                CONFIG_ACTION_REMOVE,
-                                DRB2LCHAN[i],
-                                Rlc_info_um);
+                                 SRB_FLAG_NO,
+                                 MBMS_FLAG_NO,
+                                 CONFIG_ACTION_REMOVE,
+                                 DRB2LCHAN[i],
+                                 Rlc_info_um);
             }
           }
 
           ue_context_pP->ue_context.DRB_active[drb_id] = 0;
-
           LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ  (DRB) ---> MAC_eNB\n",
                 PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
+
           if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
             rrc_mac_config_req_eNB(ctxt_pP->module_id,
                                    ue_context_pP->ue_context.primaryCC_id,
@@ -6729,19 +6250,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
                                    0,
                                    0,
                                    0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                    0,
-#endif
                                    ue_context_pP->ue_context.rnti,
                                    (LTE_BCCH_BCH_Message_t *) NULL,
                                    (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
                                    (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
                                    ue_context_pP->ue_context.physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
                                    (LTE_SCellToAddMod_r10_t *) NULL,
-#endif
                                    (LTE_MeasObjectToAddMod_t **) NULL,
                                    ue_context_pP->ue_context.mac_MainConfig,
                                    DRB2LCHAN[i],
@@ -6753,27 +6268,18 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
                                    0,
                                    NULL,
                                    NULL,
-                                   NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                   ,
+                                   NULL,
                                    0,
                                    (LTE_MBSFN_AreaInfoList_r9_t *) NULL,
-                                   (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                                   ,
-                                   (LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-                                   );
+                                   (LTE_PMCH_InfoList_r9_t *) NULL,
+                                   (LTE_SystemInformationBlockType1_v1310_IEs_t *) NULL,
+                                   0,
+                                   (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                                   (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                                   (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                                   (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                                   (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                                  );
           }
         } // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0)
       } // end if (DRB_configList->list.array[i])
@@ -6809,186 +6315,158 @@ rrc_eNB_generate_RRCConnectionSetup(
 )
 //-----------------------------------------------------------------------------
 {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   boolean_t is_mtc = ctxt_pP->brOption;
-#endif
   LTE_LogicalChannelConfig_t             *SRB1_logicalChannelConfig;  //,*SRB2_logicalChannelConfig;
   LTE_SRB_ToAddModList_t                **SRB_configList;
   LTE_SRB_ToAddMod_t                     *SRB1_config;
-
   MessageDef                             *message_p;
-     
   T(T_ENB_RRC_CONNECTION_SETUP,
     T_INT(ctxt_pP->module_id),
     T_INT(ctxt_pP->frame),
     T_INT(ctxt_pP->subframe),
     T_INT(ctxt_pP->rnti));
-
-  eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; 
+  eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
   SRB_configList = &ue_p->SRB_configList;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-
   if (is_mtc) {
     ue_p->Srb0.Tx_buffer.payload_size =
       do_RRCConnectionSetup_BR(ctxt_pP,
-                                ue_context_pP,
-                                CC_id,
-                                (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
-                                (const uint8_t) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
-                                rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
-                                SRB_configList,
-                                &ue_context_pP->ue_context.physicalConfigDedicated);
-  } else
-#endif
-  {
+                               ue_context_pP,
+                               CC_id,
+                               (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
+                               (const uint8_t) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
+                               rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
+                               SRB_configList,
+                               &ue_context_pP->ue_context.physicalConfigDedicated);
+  } else {
     ue_p->Srb0.Tx_buffer.payload_size =
       do_RRCConnectionSetup(ctxt_pP,
                             ue_context_pP,
                             CC_id,
-                            (uint8_t*) ue_p->Srb0.Tx_buffer.Payload,
+                            (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
                             (uint8_t) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
                             rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
                             SRB_configList,
                             &ue_context_pP->ue_context.physicalConfigDedicated);
   }
+
   LOG_DUMPMSG(RRC,DEBUG_RRC,
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
               "[MSG] RRC Connection Setup\n");
 
   // configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
-   switch (RC.rrc[ctxt_pP->module_id]->node_type){
+  switch (RC.rrc[ctxt_pP->module_id]->node_type) {
     case ngran_eNB_CU    :
     case ngran_ng_eNB_CU :
     case ngran_gNB_CU    :
       // create an ITTI message
       /* TODO: F1 IDs ar missing in RRC */
       message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_DL_RRC_MESSAGE);
-      F1AP_DL_RRC_MESSAGE (message_p).rrc_container =  (uint8_t*)ue_p->Srb0.Tx_buffer.Payload;
-
+      F1AP_DL_RRC_MESSAGE (message_p).rrc_container =  (uint8_t *)ue_p->Srb0.Tx_buffer.Payload;
       F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
-      F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id     = 0;  
+      F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id     = 0;
       F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
-      F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id  = 0xFFFFFFFF; // unknown 
-      F1AP_DL_RRC_MESSAGE (message_p).rnti = ue_p->rnti; 
-      F1AP_DL_RRC_MESSAGE (message_p).srb_id = CCCH;  
+      F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id  = 0xFFFFFFFF; // unknown
+      F1AP_DL_RRC_MESSAGE (message_p).rnti = ue_p->rnti;
+      F1AP_DL_RRC_MESSAGE (message_p).srb_id = CCCH;
       F1AP_DL_RRC_MESSAGE (message_p).execute_duplication      = 1;
-      F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc      = 0; 
+      F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc      = 0;
       itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
       LOG_D(RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
       break;
+
     case ngran_eNB_DU    :
     case ngran_gNB_DU  :
-      // nothing to do for DU 
+      // nothing to do for DU
       AssertFatal(1==0,"nothing to do for DU\n");
       break;
-    case ngran_eNB:   
+
+    case ngran_eNB:
     case ngran_ng_eNB :
-    case ngran_gNB  :  
-  
+    case ngran_gNB  :
       if (*SRB_configList != NULL) {
         for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) {
           if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) {
-           SRB1_config = (*SRB_configList)->list.array[cnt];
+            SRB1_config = (*SRB_configList)->list.array[cnt];
 
             if (SRB1_config->logicalChannelConfig) {
-             if (SRB1_config->logicalChannelConfig->present ==
+              if (SRB1_config->logicalChannelConfig->present ==
                   LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
                 SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
               } else {
                 SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
-             }
+              }
             } else {
               SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
-           }
+            }
+
+            LOG_D(RRC,
+                  PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ  (SRB1) ---> MAC_eNB\n",
+                  PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
 
-           LOG_D(RRC,
-                PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ  (SRB1) ---> MAC_eNB\n",
-                PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
             if (RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB) {
-             rrc_mac_config_req_eNB(ctxt_pP->module_id,
-                                  ue_context_pP->ue_context.primaryCC_id,
-                                  0,0,0,0,0,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                   0,
-#endif
-                                  ue_context_pP->ue_context.rnti,
-                                  (LTE_BCCH_BCH_Message_t *) NULL,
-                                  (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                                  (LTE_RadioResourceConfigCommonSIB_t *) NULL,
-#endif
-                                  ue_context_pP->ue_context.physicalConfigDedicated,
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                   (LTE_SCellToAddMod_r10_t *)NULL,
-                                  //(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
-#endif
-                                  (LTE_MeasObjectToAddMod_t **) NULL,
-                                  ue_context_pP->ue_context.mac_MainConfig,
-                                  1,
-                                  SRB1_logicalChannelConfig,
-                                  ue_context_pP->ue_context.measGapConfig,
-                                  (LTE_TDD_Config_t *) NULL,
-                                  NULL,
-                                  (LTE_SchedulingInfoList_t *) NULL,
-                                  0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                  , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
-                                   ,
-                                  (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                        ,
-                        0,
-                        (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
-                        (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
-                        (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
-                        (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
-                        (LTE_MBSFN_AreaInfoList_r9_t *) NULL
-#endif
-				 );
-	  break;
-	}
-      }
-    }
+              rrc_mac_config_req_eNB(ctxt_pP->module_id,
+                                     ue_context_pP->ue_context.primaryCC_id,
+                                     0,0,0,0,0, 0,
+                                     ue_context_pP->ue_context.rnti,
+                                     (LTE_BCCH_BCH_Message_t *) NULL,
+                                     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
+                                     (LTE_RadioResourceConfigCommonSIB_t *) NULL,
+                                     ue_context_pP->ue_context.physicalConfigDedicated,
+                                     (LTE_SCellToAddMod_r10_t *)NULL,
+                                     (LTE_MeasObjectToAddMod_t **) NULL,
+                                     ue_context_pP->ue_context.mac_MainConfig,
+                                     1,
+                                     SRB1_logicalChannelConfig,
+                                     ue_context_pP->ue_context.measGapConfig,
+                                     (LTE_TDD_Config_t *) NULL,
+                                     NULL,
+                                     (LTE_SchedulingInfoList_t *) NULL,
+                                     0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL,
+                                     0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
+                                     (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
+                                     0,
+                                     (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
+                                     (LTE_SchedulingInfo_MBMS_r14_t *) NULL,
+                                     (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
+                                     (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
+                                     (LTE_MBSFN_AreaInfoList_r9_t *) NULL
+                                    );
+              break;
+            }
+          }
+        }
 
-    break;
-  default :
-    LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);		
-  }
-  
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    ue_p->Srb0.Tx_buffer.Header, // LG WARNING
-    ue_p->Srb0.Tx_buffer.payload_size,
-    MSC_AS_TIME_FMT" RRCConnectionSetup UE %x size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    ue_p->Srb0.Tx_buffer.payload_size);
+        break;
 
+      default :
+        LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
+      }
 
-  LOG_I(RRC,
-        PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n",
-        PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
+      MSC_LOG_TX_MESSAGE(
+        MSC_RRC_ENB,
+        MSC_RRC_UE,
+        ue_p->Srb0.Tx_buffer.Header, // LG WARNING
+        ue_p->Srb0.Tx_buffer.payload_size,
+        MSC_AS_TIME_FMT" RRCConnectionSetup UE %x size %u",
+        MSC_AS_TIME_ARGS(ctxt_pP),
+        ue_context_pP->ue_context.rnti,
         ue_p->Srb0.Tx_buffer.payload_size);
-
-     // activate release timer, if RRCSetupComplete not received after 100 frames, remove UE
-    ue_context_pP->ue_context.ue_release_timer = 1;
-    // remove UE after 10 frames after RRCConnectionRelease is triggered
-    ue_context_pP->ue_context.ue_release_timer_thres = 1000;
-
-  /* init timers */
-  ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
+      LOG_I(RRC,
+            PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n",
+            PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
+            ue_p->Srb0.Tx_buffer.payload_size);
+      // activate release timer, if RRCSetupComplete not received after 100 frames, remove UE
+      ue_context_pP->ue_context.ue_release_timer = 1;
+      // remove UE after 10 frames after RRCConnectionRelease is triggered
+      ue_context_pP->ue_context.ue_release_timer_thres = 1000;
+      /* init timers */
+      ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
   }
 }
 
 void setup_ngran_CU(eNB_RRC_INST *rrc) {
-
-  
 }
 
 //-----------------------------------------------------------------------------
@@ -7016,10 +6494,8 @@ char openair_rrc_eNB_configuration(
   AssertFatal(MAX_MOBILES_PER_ENB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
   AssertFatal(configuration!=NULL,"configuration input is null\n");
   RC.rrc[ctxt.module_id]->Nb_ue = 0;
-
   pthread_mutex_init(&RC.rrc[ctxt.module_id]->cell_info_mutex,NULL);
   RC.rrc[ctxt.module_id]->cell_info_configured = 0;
-
   uid_linear_allocator_init(&RC.rrc[ctxt.module_id]->uid_allocator);
   RB_INIT(&RC.rrc[ctxt.module_id]->rrc_ue_head);
   //    for (j = 0; j < (MAX_MOBILES_PER_ENB + 1); j++) {
@@ -7027,46 +6503,16 @@ char openair_rrc_eNB_configuration(
   //    }
   RC.rrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
   RC.rrc[ctxt.module_id]->s1ap_id2_s1ap_ids    = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
-
   /// System Information INIT
   LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n",
         PROTOCOL_RRC_CTXT_ARGS(&ctxt));
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   // can clear it at runtime
   RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag = 0;
   // This has to come from some top-level configuration
   // only CC_id 0 is logged
-#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
-  LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel10 RRC detected, MBMS flag %d\n",
-#else
   LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel14 RRC detected, MBMS flag %d\n",
-#endif
         PROTOCOL_RRC_CTXT_ARGS(&ctxt),
         RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag);
-#else
-  LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel8 RRC\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
-#endif
-#ifdef CBA
-
-  for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-    for (j = 0; j < NUM_MAX_CBA_GROUP; j++) {
-      RC.rrc[ctxt.module_id]->carrier[CC_id].cba_rnti[j] = CBA_OFFSET + j;
-    }
-
-    if (RC.rrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) {
-      RC.rrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
-    }
-
-    LOG_D(RRC,
-          PROTOCOL_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
-          PROTOCOL_RRC_CTXT_ARGS(&ctxt),
-          enb_mod_idP, RC.rrc[ctxt.module_id]->carrier[CC_id].cba_rnti[0],
-          RC.rrc[ctxt.module_id]->carrier[CC_id].cba_rnti[1],
-          RC.rrc[ctxt.module_id]->carrier[CC_id].cba_rnti[2],
-          RC.rrc[ctxt.module_id]->carrier[CC_id].cba_rnti[3],
-          RC.rrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups);
-  }
-#endif
 
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     init_SI(&ctxt, CC_id, configuration);
@@ -7076,11 +6522,10 @@ char openair_rrc_eNB_configuration(
       RC.rrc[ctxt.module_id]->carrier[CC_id].paging[ue_id] = (uint8_t *) malloc16(256);
     }
   }
+
   rrc_init_global_param();
 
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-
     switch (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag) {
       case 1:
       case 2:
@@ -7098,7 +6543,7 @@ char openair_rrc_eNB_configuration(
         RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 0;
         break;
     }
-    
+
     // if we are here the RC.rrc[enb_mod_idP]->MBMS_flag > 0,
     /// MCCH INIT
     if (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag > 0) {
@@ -7107,32 +6552,31 @@ char openair_rrc_eNB_configuration(
       init_MBMS(ctxt.module_id, CC_id, 0);
     }
 
-#endif
     openair_rrc_top_init_eNB(RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag,0);
   }
-	
+
   openair_rrc_on(&ctxt);
 
-/*
-  RC.rrc[ctxt.module_id]->mcc= rrc_configuration_req->mcc;
-  RC.rrc[ctxt.module_id]->mnc= rrc_configuration_req->mnc;
-  RC.rrc[ctxt.module_id]->mnc_digit_length= rrc_configuration_req->mnc_digit_length;
-  RC.rrc[ctxt.module_id]->tac= rrc_configuration_req->tac;
+  /*
+    RC.rrc[ctxt.module_id]->mcc= rrc_configuration_req->mcc;
+    RC.rrc[ctxt.module_id]->mnc= rrc_configuration_req->mnc;
+    RC.rrc[ctxt.module_id]->mnc_digit_length= rrc_configuration_req->mnc_digit_length;
+    RC.rrc[ctxt.module_id]->tac= rrc_configuration_req->tac;
 
-  LOG_W(RRC, "[inst %d] RRC->MCC/MSG->MCC %d/%d \n", ctxt.module_id, RC.rrc[ctxt.module_id]->mcc, rrc_configuration_req->mcc);
-  */
+    LOG_W(RRC, "[inst %d] RRC->MCC/MSG->MCC %d/%d \n", ctxt.module_id, RC.rrc[ctxt.module_id]->mcc, rrc_configuration_req->mcc);
+    */
   if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type))
-  	// msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SCTP_REQ);
+    // msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SCTP_REQ);
     // RCconfig_CU_F1(msg_p, enb_id);
     setup_ngran_CU(RC.rrc[ctxt.module_id]);
-	
+
   return 0;
 }
 
 /*------------------------------------------------------------------------------*/
 int
 rrc_eNB_decode_ccch(
-  protocol_ctxt_t* const ctxt_pP,
+  protocol_ctxt_t *const ctxt_pP,
   const uint8_t          *buffer,
   int                    buffer_length,
   const int              CC_id
@@ -7153,7 +6597,7 @@ rrc_eNB_decode_ccch(
   //memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
   LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Decoding UL CCCH %x.%x.%x.%x.%x.%x (%p)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
-        ((uint8_t*) buffer)[0],
+        ((uint8_t *) buffer)[0],
         ((uint8_t *) buffer)[1],
         ((uint8_t *) buffer)[2],
         ((uint8_t *) buffer)[3],
@@ -7253,51 +6697,57 @@ rrc_eNB_decode_ccch(
             rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
             break;
           }
-      if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
-         (RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)){
-         LOG_E(RRC,
-               PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the c-rnti UE\n",
-               PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
-         RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
-         rrc_eNB_previous_SRB2(ue_context_p);
-         ue_context_p->ue_context.ue_reestablishment_timer = 0;
-      }
-      //previous rnti
-      rnti_t previous_rnti = 0;
-      for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
-        if (reestablish_rnti_map[i][1] == c_rnti) {
-          previous_rnti = reestablish_rnti_map[i][0];
-          break;
-        }
-      }
-      if(previous_rnti != 0){
-        UE_id = find_UE_id(ctxt_pP->module_id, previous_rnti);
-        if(UE_id == -1){
-            LOG_E(RRC,
-                  PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReestablishmentRequest without UE_id(MAC) previous rnti %x, let's reject the UE\n",
-                  PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),previous_rnti);
-            rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
-            break;
-        }
+
           if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
               (RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) {
             LOG_E(RRC,
-                  PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the Previous UE\n",
+                  PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the c-rnti UE\n",
                   PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
             RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
-          rrc_eNB_previous_SRB2(ue_context_p);
-          ue_context_p->ue_context.ue_reestablishment_timer = 0;
-        }
-      }
+            rrc_eNB_previous_SRB2(ue_context_p);
+            ue_context_p->ue_context.ue_reestablishment_timer = 0;
+          }
 
-      //c-plane not end
-      if((ue_context_p->ue_context.Status != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) {
-        LOG_E(RRC,
-             PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE\n",
-             PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti);
-        rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
-        break;
-      }
+          //previous rnti
+          rnti_t previous_rnti = 0;
+
+          for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
+            if (reestablish_rnti_map[i][1] == c_rnti) {
+              previous_rnti = reestablish_rnti_map[i][0];
+              break;
+            }
+          }
+
+          if(previous_rnti != 0) {
+            UE_id = find_UE_id(ctxt_pP->module_id, previous_rnti);
+
+            if(UE_id == -1) {
+              LOG_E(RRC,
+                    PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReestablishmentRequest without UE_id(MAC) previous rnti %x, let's reject the UE\n",
+                    PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),previous_rnti);
+              rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
+              break;
+            }
+
+            if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
+                (RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) {
+              LOG_E(RRC,
+                    PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the Previous UE\n",
+                    PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
+              RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
+              rrc_eNB_previous_SRB2(ue_context_p);
+              ue_context_p->ue_context.ue_reestablishment_timer = 0;
+            }
+          }
+
+          //c-plane not end
+          if((ue_context_p->ue_context.Status != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) {
+            LOG_E(RRC,
+                  PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE\n",
+                  PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti);
+            rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP, ue_context_p, CC_id);
+            break;
+          }
 
           if(ue_context_p->ue_context.ue_reestablishment_timer > 0) {
             LOG_E(RRC,
@@ -7397,6 +6847,7 @@ rrc_eNB_decode_ccch(
                                    NULL
                                    , (LTE_PMCH_InfoList_r9_t *) NULL
                                    ,NULL);
+
           if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
             rrc_rlc_config_asn1_req(ctxt_pP,
                                     ue_context_p->ue_context.SRB_configList,
@@ -7405,7 +6856,8 @@ rrc_eNB_decode_ccch(
                                     , (LTE_PMCH_InfoList_r9_t *) NULL,
                                     0,0
                                    );
-        }
+          }
+
 #endif //NO_RRM
         }
         break;
@@ -7413,9 +6865,8 @@ rrc_eNB_decode_ccch(
       case LTE_UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
         T(T_ENB_RRC_CONNECTION_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
-
-      LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,
-                  buffer_length,
+        LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,
+                    buffer_length,
                     "[MSG] RRC Connection Request\n");
         LOG_D(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB --- MAC_DATA_IND  (rrcConnectionRequest on SRB0) --> RRC_eNB\n",
@@ -7460,14 +6911,12 @@ rrc_eNB_decode_ccch(
               }
 
               ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, random_value);
-
               ue_context_p->ue_context.Srb0.Srb_id = 0;
               ue_context_p->ue_context.Srb0.Active = 1;
               memcpy(ue_context_p->ue_context.Srb0.Rx_buffer.Payload,
                      buffer,
                      buffer_length);
               ue_context_p->ue_context.Srb0.Rx_buffer.payload_size = buffer_length;
-
             } else if (LTE_InitialUE_Identity_PR_s_TMSI == rrcConnectionRequest->ue_Identity.present) {
               /* Save s-TMSI */
               LTE_S_TMSI_t   s_TMSI = rrcConnectionRequest->ue_Identity.choice.s_TMSI;
@@ -7480,8 +6929,7 @@ rrc_eNB_decode_ccch(
 
                 if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
                   rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
-                }
-                else {
+                } else {
                   MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, F1AP_UE_CONTEXT_RELEASE_CMD);
                   F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
                   F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
@@ -7582,6 +7030,7 @@ rrc_eNB_decode_ccch(
             LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Can't create new context for UE random UE identity (0x%" PRIx64 ")\n",
                   PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
                   random_value);
+
             if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type))
               rrc_mac_remove_ue(ctxt_pP->module_id,ctxt_pP->rnti);
             else if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
@@ -7593,6 +7042,7 @@ rrc_eNB_decode_ccch(
               F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = 0;
               itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, m);
             }
+
             return -1;
           }
         }
@@ -7640,23 +7090,18 @@ rrc_eNB_decode_ccch(
                                  0xff,
                                  NULL,
                                  NULL,
-                                 NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                 , (LTE_PMCH_InfoList_r9_t *) NULL
-#endif
-                                 ,NULL);
+                                 NULL,
+                                 (LTE_PMCH_InfoList_r9_t *) NULL,NULL);
 
         if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
           rrc_rlc_config_asn1_req(ctxt_pP,
                                   ue_context_p->ue_context.SRB_configList,
                                   (LTE_DRB_ToAddModList_t *) NULL,
-                                  (LTE_DRB_ToReleaseList_t *) NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                  , (LTE_PMCH_InfoList_r9_t *) NULL
-                                  , 0, 0
-#endif
+                                  (LTE_DRB_ToReleaseList_t *) NULL,
+                                  (LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
                                  );
         }
+
 #endif //NO_RRM
         break;
 
@@ -7799,6 +7244,7 @@ rrc_eNB_decode_dcch(
           /*NN: revise the condition */
           /*FK: left the condition as is for the case MME is used (S1 mode) but setting  dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
           int flexran_agent_handover = 0;
+
           if (EPC_MODE_ENABLED) {
             if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
               dedicated_DRB = 1;
@@ -7840,9 +7286,11 @@ rrc_eNB_decode_dcch(
               dedicated_DRB = 3;
               RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
               ue_context_p->ue_context.Status = RRC_RECONFIGURED;
-	      if(ue_context_p->ue_context.handover_info){
-	        ue_context_p->ue_context.handover_info->state = HO_CONFIGURED;
-	      }
+
+              if(ue_context_p->ue_context.handover_info) {
+                ue_context_p->ue_context.handover_info->state = HO_CONFIGURED;
+              }
+
               LOG_I(RRC,
                     PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_HO_EXECUTION (xid %ld)\n",
                     PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
@@ -7921,7 +7369,6 @@ rrc_eNB_decode_dcch(
             }
           } else if(dedicated_DRB == 0) {
             if(ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1) {
-              
               rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(ctxt_pP,
                   ue_context_p);
             } else {
@@ -8238,9 +7685,9 @@ rrc_eNB_decode_dcch(
         }
 
         if (EPC_MODE_ENABLED) {
-            rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
-                                                  ue_context_p,
-                                                  ul_dcch_msg);
+          rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
+                                                ue_context_p,
+                                                ul_dcch_msg);
         } else {
           ue_context_p->ue_context.nb_of_e_rabs = 1;
 
@@ -8298,7 +7745,6 @@ rrc_eNB_decode_dcch(
         T(T_ENB_RRC_COUNTER_CHECK_RESPONSE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
         break;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 
       case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
         T(T_ENB_RRC_UE_INFORMATION_RESPONSE_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
@@ -8309,8 +7755,6 @@ rrc_eNB_decode_dcch(
         T(T_ENB_RRC_PROXIMITY_INDICATION_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
         break;
-#endif
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
 
       case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
         T(T_ENB_RRC_RECONFIGURATION_COMPLETE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
@@ -8326,7 +7770,6 @@ rrc_eNB_decode_dcch(
         T(T_ENB_RRC_INTER_FREQ_RSTD_MEASUREMENT_INDICATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
         break;
-#endif
 
       default:
         T(T_ENB_RRC_UNKNOW_MESSAGE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
@@ -8418,81 +7861,77 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t *const ctxt_pP,
   rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(ctxt_pP, ue_context_pP, 0);
 }
 
-void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { 
-
-  
+void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
   LOG_I(RRC,"Received F1 Setup Request from gNB_DU %llu (%s)\n",(unsigned long long int)f1_setup_req->gNB_DU_id,f1_setup_req->gNB_DU_name);
-  
   //uint16_t num_cells_to_activate = 0;
-  
   int cu_cell_ind=0;
-
   MessageDef                         *msg_p = NULL;
 
   //LOG_W(RRC,"num_cells_available %d \n", f1_setup_req->num_cells_available);
-  for (int i=0;i<f1_setup_req->num_cells_available;i++) {
+  for (int i=0; i<f1_setup_req->num_cells_available; i++) {
     // check that mcc/mnc match and grab MIB/SIB1
     int found_cell=0;
-    for (int j=0;j<RC.nb_inst;j++) {
+
+    for (int j=0; j<RC.nb_inst; j++) {
       eNB_RRC_INST *rrc = RC.rrc[j];
+
       if (rrc->configuration.mcc[0] == f1_setup_req->mcc[i] &&
-	  rrc->configuration.mnc[0] == f1_setup_req->mnc[i] &&
-	  rrc->nr_cellid == f1_setup_req->nr_cellid[i]) {
+          rrc->configuration.mnc[0] == f1_setup_req->mnc[i] &&
+          rrc->nr_cellid == f1_setup_req->nr_cellid[i]) {
         // check that CU rrc instance corresponds to mcc/mnc/cgi (normally cgi should be enough, but just in case)
-
         rrc->carrier[0].MIB = malloc(f1_setup_req->mib_length[i]);
         rrc->carrier[0].sizeof_MIB = f1_setup_req->mib_length[i];
         LOG_W(RRC, "instance %d mib length %d\n", i, f1_setup_req->mib_length[i]);
         LOG_W(RRC, "instance %d sib1 length %d\n", i, f1_setup_req->sib1_length[i]);
-       
-        memcpy((void*)rrc->carrier[0].MIB,f1_setup_req->mib[i],f1_setup_req->mib_length[i]);
+        memcpy((void *)rrc->carrier[0].MIB,f1_setup_req->mib[i],f1_setup_req->mib_length[i]);
         asn_dec_rval_t dec_rval = uper_decode_complete(NULL,
-                         &asn_DEF_LTE_BCCH_BCH_Message,
-        					       (void **)&rrc->carrier[0].mib_DU,
-        					       f1_setup_req->mib[i],
-        					       f1_setup_req->mib_length[i]);
+                                  &asn_DEF_LTE_BCCH_BCH_Message,
+                                  (void **)&rrc->carrier[0].mib_DU,
+                                  f1_setup_req->mib[i],
+                                  f1_setup_req->mib_length[i]);
         AssertFatal(dec_rval.code == RC_OK,
-              "[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_BCH_MESSAGE (%zu bits)\n",
-        	    j,
-        	    dec_rval.consumed );	
+                    "[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_BCH_MESSAGE (%zu bits)\n",
+                    j,
+                    dec_rval.consumed );
         LTE_BCCH_BCH_Message_t *mib = &rrc->carrier[0].mib;
         LTE_BCCH_BCH_Message_t *mib_DU = rrc->carrier[0].mib_DU;
         mib->message.dl_Bandwidth = mib_DU->message.dl_Bandwidth;
         mib->message.phich_Config.phich_Resource = mib_DU->message.phich_Config.phich_Resource;
         mib->message.phich_Config.phich_Duration = mib_DU->message.phich_Config.phich_Duration;
-
         rrc->carrier[0].SIB1 = malloc(f1_setup_req->sib1_length[i]);
         rrc->carrier[0].sizeof_SIB1 = f1_setup_req->sib1_length[i];
-        memcpy((void*)rrc->carrier[0].SIB1,f1_setup_req->sib1[i],f1_setup_req->sib1_length[i]); 
+        memcpy((void *)rrc->carrier[0].SIB1,f1_setup_req->sib1[i],f1_setup_req->sib1_length[i]);
         dec_rval = uper_decode_complete(NULL,
-                &asn_DEF_LTE_BCCH_DL_SCH_Message,
-        				(void **)&rrc->carrier[0].siblock1_DU,
-        				f1_setup_req->sib1[i],
-        				f1_setup_req->sib1_length[i]);
+                                        &asn_DEF_LTE_BCCH_DL_SCH_Message,
+                                        (void **)&rrc->carrier[0].siblock1_DU,
+                                        f1_setup_req->sib1[i],
+                                        f1_setup_req->sib1_length[i]);
         AssertFatal(dec_rval.code == RC_OK,
-              "[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_DLSCH_MESSAGE (%zu bits)\n",
-        	    j,
-        	    dec_rval.consumed );	
+                    "[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_DLSCH_MESSAGE (%zu bits)\n",
+                    j,
+                    dec_rval.consumed );
         // Parse message and extract SystemInformationBlockType1 field
         LTE_BCCH_DL_SCH_Message_t *bcch_message = rrc->carrier[0].siblock1_DU;
         AssertFatal(bcch_message->message.present == LTE_BCCH_DL_SCH_MessageType_PR_c1,
-              "bcch_message->message.present != LTE_BCCH_DL_SCH_MessageType_PR_c1\n");
+                    "bcch_message->message.present != LTE_BCCH_DL_SCH_MessageType_PR_c1\n");
         AssertFatal(bcch_message->message.choice.c1.present == LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1,
-              "bcch_message->message.choice.c1.present != LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1\n");
+                    "bcch_message->message.choice.c1.present != LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1\n");
         rrc->carrier[0].sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1;
         rrc->carrier[0].physCellId = f1_setup_req->nr_pci[i];
         // prepare F1_SETUP_RESPONSE
 
         if (msg_p == NULL) {
-          msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_RESP); 						 
+          msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_RESP);
         }
+
         F1AP_SETUP_RESP (msg_p).gNB_CU_name                                = rrc->node_name;
         F1AP_SETUP_RESP (msg_p).mcc[cu_cell_ind]                           = rrc->configuration.mcc[0];
         F1AP_SETUP_RESP (msg_p).mnc[cu_cell_ind]                           = rrc->configuration.mnc[0];
         F1AP_SETUP_RESP (msg_p).mnc_digit_length[cu_cell_ind]              = rrc->configuration.mnc_digit_length[0];
-	F1AP_SETUP_RESP (msg_p).nr_cellid[cu_cell_ind]                     = rrc->nr_cellid;
+        F1AP_SETUP_RESP (msg_p).nr_cellid[cu_cell_ind]                     = rrc->nr_cellid;
         F1AP_SETUP_RESP (msg_p).nrpci[cu_cell_ind]                         = f1_setup_req->nr_pci[i];
         int num_SI= 0;
+
         if (rrc->carrier[0].SIB23) {
           F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI]        = rrc->carrier[0].SIB23;
           F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI] = rrc->carrier[0].sizeof_SIB23;
@@ -8502,35 +7941,34 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
           //printf("\n");
           num_SI++;
         }
-        F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = num_SI;
 
+        F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = num_SI;
         cu_cell_ind++;
         found_cell=1;
-
         F1AP_SETUP_RESP (msg_p).num_cells_to_activate = cu_cell_ind;
         // send ITTI message to F1AP-CU task
         itti_send_msg_to_task (TASK_CU_F1, ENB_MODULE_ID_TO_INSTANCE(j), msg_p);
         break;
       } else {// setup_req mcc/mnc match rrc internal list element
-        
-        LOG_W(RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d \n", 
-            j, rrc->configuration.mcc[0], f1_setup_req->mcc[i],rrc->configuration.mnc[0], f1_setup_req->mnc[i]);
-
+        LOG_W(RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d \n",
+              j, rrc->configuration.mcc[0], f1_setup_req->mcc[i],rrc->configuration.mnc[0], f1_setup_req->mnc[i]);
       }
     }// for (int j=0;j<RC.nb_inst;j++)
+
     if (found_cell==0) {
       AssertFatal(1==0,"No cell found\n");
-      /*msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_FAILURE); 						 
+      /*msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_FAILURE);
       F1AP_SETUP_RESP (msg_p).cause                             = rrc->node_name;
       F1AP_SETUP_RESP (msg_p).time_to_wait                      = rrc->node_id;
       F1AP_SETUP_RESP (msg_p).criticality_diagnostics           = rrc->node_name;*/
     }
+
     // handle other failure cases
   }//for (int i=0;i<f1_setup_req->num_cells_available;i++)
 }
- 
 
-  // ignore 5GNR fields for now, just take MIB and SIB1
+
+// ignore 5GNR fields for now, just take MIB and SIB1
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void rrc_enb_init(void) {
@@ -8542,8 +7980,7 @@ void rrc_enb_init(void) {
 //-----------------------------------------------------------------------------
 int add_ue_to_remove(struct rrc_eNB_ue_context_s **ue_to_be_removed,
                      int removed_ue_count,
-                     struct rrc_eNB_ue_context_s *ue_context_p)
-{
+                     struct rrc_eNB_ue_context_s *ue_context_p) {
   int i;
 
   /* is it already here? */
@@ -8558,13 +7995,11 @@ int add_ue_to_remove(struct rrc_eNB_ue_context_s **ue_to_be_removed,
 
   ue_to_be_removed[removed_ue_count] = ue_context_p;
   removed_ue_count++;
-
   return removed_ue_count;
 }
 
 //-----------------------------------------------------------------------------
-void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
-{
+void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
   int32_t current_timestamp_ms = 0;
   int32_t ref_timestamp_ms = 0;
   struct timeval ts;
@@ -8577,15 +8012,13 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
   protocol_ctxt_t                     ctxt;
 #endif
   MessageDef *msg;
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX, VCD_FUNCTION_IN);
 
   if (RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2) {
     /* send a tick to x2ap */
     msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_SUBFRAME_PROCESS);
     itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, msg);
-
-  check_handovers(ctxt_pP); // counter, get the value and aggregate
+    check_handovers(ctxt_pP); // counter, get the value and aggregate
   }
 
   // check for UL failure or for UE to be released
@@ -8653,6 +8086,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
         rrc_eNB_handover_ue_context_release(ctxt_pP, ue_context_p);
         break; //break RB_FOREACH (why to break ?)
       }
+
       if (ue_context_p->ue_context.handover_info->state == HO_CANCEL) {
         rrc_eNB_handover_cancel(ctxt_pP, ue_context_p);
         /* freeing handover_info and setting it to NULL to let
@@ -8685,18 +8119,20 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
             }
 
             rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(ctxt_pP->module_id,
-                  ue_context_p);
+                ue_context_p);
+
             // erase data of GTP tunnels in UE context
             for (int e_rab = 0; e_rab < ue_context_p->ue_context.nb_of_e_rabs; e_rab++) {
               ue_context_p->ue_context.enb_gtp_teid[e_rab] = 0;
               memset(&ue_context_p->ue_context.enb_gtp_addrs[e_rab],
-                  0, sizeof(ue_context_p->ue_context.enb_gtp_addrs[e_rab]));
+                     0, sizeof(ue_context_p->ue_context.enb_gtp_addrs[e_rab]));
               ue_context_p->ue_context.enb_gtp_ebi[e_rab]  = 0;
             }
 
             struct rrc_ue_s1ap_ids_s *rrc_ue_s1ap_ids = NULL;
+
             rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(RC.rrc[ctxt_pP->module_id], 0,
-                                                      ue_context_p->ue_context.eNB_ue_s1ap_id);
+                              ue_context_p->ue_context.eNB_ue_s1ap_id);
 
             if (rrc_ue_s1ap_ids != NULL) {
               rrc_eNB_S1AP_remove_ue_ids(RC.rrc[ctxt_pP->module_id], rrc_ue_s1ap_ids);
@@ -8818,13 +8254,12 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
   instance_t                          instance;
   int                                 result;
   protocol_ctxt_t                     ctxt;
-
   memset(&ctxt, 0, sizeof(ctxt));
-
   // Wait for a message
   itti_receive_msg(TASK_RRC_ENB, &msg_p);
   msg_name_p = ITTI_MSG_NAME(msg_p);
   instance = ITTI_MSG_INSTANCE(msg_p);
+
   /* RRC_SUBFRAME_PROCESS is sent every subframe, do not log it */
   if (ITTI_MSG_ID(msg_p) != RRC_SUBFRAME_PROCESS)
     LOG_D(RRC,"Received message %s\n",msg_name_p);
@@ -8847,7 +8282,6 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
                                     RRC_MAC_CCCH_DATA_IND(msg_p).rnti,
                                     msg_p->ittiMsgHeader.lte_time.frame,
                                     msg_p->ittiMsgHeader.lte_time.slot);
-
       LOG_I(RRC,"Decoding CCCH : inst %d, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d\n",
             instance,
             RRC_MAC_CCCH_DATA_IND(msg_p).CC_id,
@@ -8861,12 +8295,11 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
       }
 
       rrc_eNB_decode_ccch(&ctxt,
-                          (uint8_t*)RRC_MAC_CCCH_DATA_IND(msg_p).sdu,
+                          (uint8_t *)RRC_MAC_CCCH_DATA_IND(msg_p).sdu,
                           RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,
                           RRC_MAC_CCCH_DATA_IND(msg_p).CC_id);
       break;
 
-
     /* Messages from PDCP */
     case RRC_DCCH_DATA_IND:
       PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
@@ -8966,64 +8399,67 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
 
     case X2AP_HANDOVER_REQ_ACK: {
       struct rrc_eNB_ue_context_s        *ue_context_p = NULL;
-      x2ap_handover_req_ack_t 			  *x2ap_handover_req_ack = NULL;
-      hashtable_rc_t                	  hash_rc      = HASH_TABLE_KEY_NOT_EXISTS;
-      gtpv1u_ue_data_t             		  *gtpv1u_ue_data_p = NULL;
+      x2ap_handover_req_ack_t         *x2ap_handover_req_ack = NULL;
+      hashtable_rc_t                    hash_rc      = HASH_TABLE_KEY_NOT_EXISTS;
+      gtpv1u_ue_data_t                  *gtpv1u_ue_data_p = NULL;
       ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_REQ_ACK(msg_p).rnti);
+
       if (ue_context_p == NULL) {
         /* is it possible? */
         LOG_E(RRC, "could not find UE (rnti %x) while processing X2AP_HANDOVER_REQ_ACK\n",
               X2AP_HANDOVER_REQ_ACK(msg_p).rnti);
         exit(1);
       }
+
       LOG_I(RRC, "[eNB %d] source eNB receives the X2 HO ACK %s\n", instance, msg_name_p);
       DevAssert(ue_context_p != NULL);
 
       if (ue_context_p->ue_context.handover_info->state != HO_REQUEST) abort();
-	  
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, ue_context_p->ue_context.rnti, (void**)&gtpv1u_ue_data_p);
+
+      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, ue_context_p->ue_context.rnti, (void **)&gtpv1u_ue_data_p);
+
       /* set target enb gtp teid */
       if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
         LOG_E(RRC, "X2AP_HANDOVER_REQ_ACK func(), hashtable_get failed: while getting ue rnti %x in hashtable ue_mapping\n", ue_context_p->ue_context.rnti);
       } else {
         uint8_t nb_e_rabs_tobesetup = 0;
-	ebi_t   eps_bearer_id       = 0;
-	int     ip_offset           = 0;
-	in_addr_t  in_addr;
-	x2ap_handover_req_ack = &X2AP_HANDOVER_REQ_ACK(msg_p);
-	nb_e_rabs_tobesetup = x2ap_handover_req_ack->nb_e_rabs_tobesetup;
+        ebi_t   eps_bearer_id       = 0;
+        int     ip_offset           = 0;
+        in_addr_t  in_addr;
+        x2ap_handover_req_ack = &X2AP_HANDOVER_REQ_ACK(msg_p);
+        nb_e_rabs_tobesetup = x2ap_handover_req_ack->nb_e_rabs_tobesetup;
         ue_context_p->ue_context.nb_x2u_e_rabs = nb_e_rabs_tobesetup;
-	for(int i=0; i< nb_e_rabs_tobesetup; i++){
-	  ip_offset               = 0;
-	  eps_bearer_id = x2ap_handover_req_ack->e_rabs_tobesetup[i].e_rab_id;
+
+        for(int i=0; i< nb_e_rabs_tobesetup; i++) {
+          ip_offset               = 0;
+          eps_bearer_id = x2ap_handover_req_ack->e_rabs_tobesetup[i].e_rab_id;
           ue_context_p->ue_context.enb_gtp_x2u_ebi[i] = eps_bearer_id;
           ue_context_p->ue_context.enb_gtp_x2u_teid[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid;
-	  gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid; 
-			
-	  if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 4) ||
-	      (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
-	      in_addr = *((in_addr_t*)x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer);
-	      ip_offset = 4;
-	      gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = in_addr;
-              ue_context_p->ue_context.enb_gtp_x2u_addrs[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr;
-	  }
-
-	  if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 16) ||
-	      (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
-	      memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr.s6_addr,
-		     &x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer[ip_offset],
-		     16);
+          gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid;
+
+          if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 4) ||
+              (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
+            in_addr = *((in_addr_t *)x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer);
+            ip_offset = 4;
+            gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = in_addr;
+            ue_context_p->ue_context.enb_gtp_x2u_addrs[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr;
           }
 
+          if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 16) ||
+              (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
+            memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr.s6_addr,
+                   &x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer[ip_offset],
+                   16);
+          }
         }
       }
-	  
+
       rrc_eNB_process_handoverCommand(instance, ue_context_p, &X2AP_HANDOVER_REQ_ACK(msg_p));
       ue_context_p->ue_context.handover_info->state = HO_PREPARE;
       break;
     }
 
-   case X2AP_UE_CONTEXT_RELEASE: {
+    case X2AP_UE_CONTEXT_RELEASE: {
       struct rrc_eNB_ue_context_s        *ue_context_p = NULL;
       ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_UE_CONTEXT_RELEASE(msg_p).rnti);
       LOG_I(RRC, "[eNB %d] source eNB receives the X2 UE CONTEXT RELEASE %s\n", instance, msg_name_p);
@@ -9035,21 +8471,26 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
       break;
     }
 
-   case X2AP_HANDOVER_CANCEL: {
+    case X2AP_HANDOVER_CANCEL: {
       struct rrc_eNB_ue_context_s        *ue_context_p = NULL;
       char *cause;
+
       switch (X2AP_HANDOVER_CANCEL(msg_p).cause) {
-      case X2AP_T_RELOC_PREP_TIMEOUT:
-        cause = "T_RelocPrep timeout";
-        break;
-      case X2AP_TX2_RELOC_OVERALL_TIMEOUT:
-        cause = "Tx2_RelocOverall timeout";
-        break;
-      default:
-        /* cannot come here */
-        exit(1);
+        case X2AP_T_RELOC_PREP_TIMEOUT:
+          cause = "T_RelocPrep timeout";
+          break;
+
+        case X2AP_TX2_RELOC_OVERALL_TIMEOUT:
+          cause = "Tx2_RelocOverall timeout";
+          break;
+
+        default:
+          /* cannot come here */
+          exit(1);
       }
+
       ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_CANCEL(msg_p).rnti);
+
       if (ue_context_p != NULL &&
           ue_context_p->ue_context.handover_info != NULL) {
         LOG_I(RRC, "[eNB %d] eNB receives X2 HANDOVER CANCEL for rnti %x, cause %s [%s]\n",
@@ -9057,6 +8498,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
               X2AP_HANDOVER_CANCEL(msg_p).rnti,
               cause,
               msg_name_p);
+
         if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) {
           /* for prep timeout, simply return to normal state */
           /* TODO: be sure that it's correct to set Status to RRC_RECONFIGURED */
@@ -9070,13 +8512,16 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
         }
       } else {
         char *failure_cause;
+
         if (ue_context_p == NULL)
           failure_cause = "no UE found";
         else
           failure_cause = "UE not in handover";
+
         LOG_W(RRC, "[eNB %d] cannot process (%s) X2 HANDOVER CANCEL for rnti %x, cause %s, ignoring\n",
               instance, failure_cause, X2AP_HANDOVER_CANCEL(msg_p).rnti, cause);
       }
+
       break;
     }
 
@@ -9089,7 +8534,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
     /* Messages from F1AP task */
     case F1AP_SETUP_REQ:
       AssertFatal(NODE_IS_CU(RC.rrc[instance]->node_type),
-		  "should not receive F1AP_SETUP_REQUEST, need call by CU!\n");
+                  "should not receive F1AP_SETUP_REQUEST, need call by CU!\n");
       LOG_I(RRC,"[eNB %d] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
       handle_f1_setup_req(&F1AP_SETUP_REQ(msg_p));
       break;
@@ -9147,7 +8592,6 @@ openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active)
       RC.rrc[module_id]->HO_flag   = (uint8_t)HO_active;
     }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
     LOG_I(RRC,"[eNB] eMBMS active state is %d \n", eMBMS_active);
 
     for (module_id=0; module_id<NB_eNB_INST; module_id++) {
@@ -9155,17 +8599,6 @@ openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active)
         RC.rrc[module_id]->carrier[CC_id].MBMS_flag = (uint8_t)eMBMS_active;
       }
     }
-
-#endif
-#ifdef CBA
-
-    for (module_id=0; module_id<RC.nb_inst; module_id++) {
-      for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-        RC.rrc[module_id]->carrier[CC_id].num_active_cba_groups = cba_group_active;
-      }
-    }
-
-#endif
   }
 }
 
@@ -9219,7 +8652,6 @@ rrc_eNB_process_SidelinkUEInformation(
 
         //generate RRC Reconfiguration
         rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
-
         free(destinationInfoList);
         destinationInfoList = NULL;
         return 0;
@@ -9240,7 +8672,6 @@ rrc_eNB_process_SidelinkUEInformation(
 
           //generate RRC Reconfiguration
           rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
-
           free(destinationInfoList);
           destinationInfoList = NULL;
           return 0;
@@ -9264,7 +8695,6 @@ rrc_eNB_process_SidelinkUEInformation(
 
           //generate RRC Reconfiguration
           rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
-
           free(destinationInfoList);
           destinationInfoList = NULL;
           return 0;
@@ -9288,7 +8718,6 @@ rrc_eNB_process_SidelinkUEInformation(
 
           //generate RRC Reconfiguration
           rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(ctxt_pP, ue_context_pP, destinationInfoList, 0);
-
           free(destinationInfoList);
           destinationInfoList = NULL;
           return 0;
@@ -9355,10 +8784,8 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
                                            NULL, NULL,  NULL, NULL, NULL, NULL, NULL,
                                            (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL,
                                            (LTE_SL_CommConfig_r12_t *)&sl_CommConfig,
-                                           (LTE_SL_DiscConfig_r12_t *)NULL
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                           , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                           (LTE_SL_DiscConfig_r12_t *)NULL,
+                                           (LTE_SCellToAddMod_r10_t *)NULL
                                           );
     //
   }
@@ -9379,10 +8806,8 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
                                            NULL, NULL,  NULL, NULL, NULL, NULL, NULL,
                                            (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL,
                                            (LTE_SL_CommConfig_r12_t *)NULL,
-                                           (LTE_SL_DiscConfig_r12_t *)&sl_DiscConfig
-#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
-                                           , (LTE_SCellToAddMod_r10_t *)NULL
-#endif
+                                           (LTE_SL_DiscConfig_r12_t *)&sl_DiscConfig,
+                                           (LTE_SCellToAddMod_r10_t *)NULL
                                           );
   }
 
diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c
index 115dc0126d3a373c1ebaec603cdba4ed945ba266..2512cf68204eea804fbc079c664087a6ea693619 100644
--- a/openair2/RRC/LTE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c
@@ -77,15 +77,8 @@ static const uint16_t S1AP_ENCRYPTION_EEA2_MASK = 0x4000;
 static const uint16_t S1AP_INTEGRITY_EIA1_MASK = 0x8000;
 static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000;
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
-  #define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
-#else
-  #ifdef EXMIMO_IOT
-    #define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
-  #else
-    #define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
-  #endif
-#endif
+#define INTEGRITY_ALGORITHM_NONE LTE_SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
+
 
 void extract_imsi(uint8_t *pdu_buf, uint32_t pdu_len, rrc_eNB_ue_context_t *ue_context_pP) {
   /* Process NAS message locally to get the IMSI */
@@ -251,20 +244,23 @@ rrc_eNB_S1AP_get_ue_ids(
           ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance_p, eNB_ue_s1ap_id); // get s1ap_eNB_ue_context
         } else {
           LOG_E(S1AP, "[eNB instance %d] Couldn't find the eNB S1AP context\n",
-              instance);
+                instance);
           return NULL;
         }
 
         if (ue_desc_p != NULL) {
           struct s1ap_eNB_ue_context_s *s1ap_ue_context_p = NULL;
+
           if ((s1ap_ue_context_p = RB_REMOVE(s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head, ue_desc_p)) != NULL) {
             LOG_E(RRC, "Removed UE context eNB_ue_s1ap_id %u\n", s1ap_ue_context_p->eNB_ue_s1ap_id);
             s1ap_eNB_free_ue_context(s1ap_ue_context_p);
           } else {
             LOG_E(RRC, "Removing UE context eNB_ue_s1ap_id %u: did not find context\n",ue_desc_p->eNB_ue_s1ap_id);
           }
+
           return NULL; //skip the operation below to avoid loop
           result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
+
           if (ue_desc_p->ue_initial_id != UE_INITIAL_ID_INVALID) {
             result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
 
@@ -647,7 +643,7 @@ rrc_eNB_send_S1AP_UPLINK_NAS(
             == LTE_ULInformationTransfer_r8_IEs__dedicatedInfoType_PR_dedicatedInfoNAS)) {
       /* This message hold a dedicated info NAS payload, forward it to NAS */
       struct LTE_ULInformationTransfer_r8_IEs__dedicatedInfoType *dedicatedInfoType =
-        &ulInformationTransfer->criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType;
+          &ulInformationTransfer->criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType;
       uint32_t pdu_length;
       uint8_t *pdu_buffer;
       MessageDef *msg_p;
@@ -944,7 +940,6 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
   gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp;
   uint8_t                         inde_list[NB_RB_MAX - 3]= {0};
   int                             ret;
-
   struct rrc_eNB_ue_context_s *ue_context_p = NULL;
   protocol_ctxt_t              ctxt;
   ue_initial_id  = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).ue_initial_id;
@@ -986,11 +981,11 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
 
       create_tunnel_req.rnti       = ue_context_p->ue_context.rnti; // warning put zero above
       //      create_tunnel_req.num_tunnels    = i;
-
       ret = gtpv1u_create_s1u_tunnel(
-        instance,
-        &create_tunnel_req,
-        &create_tunnel_resp);
+              instance,
+              &create_tunnel_req,
+              &create_tunnel_resp);
+
       if ( ret != 0 ) {
         LOG_E(RRC,"rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_s1u_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti);
         ue_context_p->ue_context.ue_release_timer_s1 = 1;
@@ -1053,32 +1048,32 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
 
     // in case, send the S1SP initial context response if it is not sent with the attach complete message
     if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
-       LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
+      LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
       //if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){}
-       rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
-    } 
-/*
-    if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
-        (RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
-        (RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
-
-      message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_UE_CONTEXT_SETUP_REQ);
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container =  ue_p->Srb0.Tx_buffer.Payload;
-
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id     = 0;  
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id  = 0xFFFFFFFF; // unknown 
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti; 
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;  
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication      = 1;
-      F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc      = 0; 
-      itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
-      LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
-
+      rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
     }
-*/
 
+    /*
+        if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
+            (RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
+            (RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
+
+          message_p = itti_alloc_new_message (TASK_RRC_ENB, F1AP_UE_CONTEXT_SETUP_REQ);
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container =  ue_p->Srb0.Tx_buffer.Payload;
+
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id     = 0;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id  = 0xFFFFFFFF; // unknown
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication      = 1;
+          F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc      = 0;
+          itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
+          LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
+
+        }
+    */
     return (0);
   }
 }
@@ -1204,12 +1199,10 @@ rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(
 void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(
   module_id_t enb_mod_idP,
   uint32_t eNB_ue_s1ap_id
-)
-{
+) {
   MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_S1AP_ENB, NULL, 0,
                      "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
                      eNB_ue_s1ap_id);
-
   MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
   S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
   itti_send_msg_to_task(TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
@@ -1276,7 +1269,6 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
   protocol_ctxt_t              ctxt;
   uint8_t                      e_rab_done;
   int                          ret = 0;
-
   ue_initial_id  = S1AP_E_RAB_SETUP_REQ (msg_p).ue_initial_id;
   eNB_ue_s1ap_id = S1AP_E_RAB_SETUP_REQ (msg_p).eNB_ue_s1ap_id;
   ue_context_p   = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
@@ -1340,9 +1332,10 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
       create_tunnel_req.num_tunnels    = e_rab_done;
       // NN: not sure if we should create a new tunnel: need to check teid, etc.
       ret = gtpv1u_create_s1u_tunnel(
-        instance,
-        &create_tunnel_req,
-        &create_tunnel_resp);
+              instance,
+              &create_tunnel_req,
+              &create_tunnel_resp);
+
       if ( ret != 0 ) {
         LOG_E(RRC,"rrc_eNB_process_S1AP_E_RAB_SETUP_REQ : gtpv1u_create_s1u_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti);
         ue_context_p->ue_context.ue_release_timer_s1 = 1;
@@ -1847,7 +1840,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
           /* set T = min(Tc,Tue) */
           T = Tc < Tue ? Ttab[Tc] : Ttab[Tue];
           /* set pcch_nB = PCCH-Config->nB */
-	  pcch_nB = (uint32_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_nB;
+          pcch_nB = (uint32_t)RC.rrc[instance]->configuration.radioresourceconfig[CC_id].pcch_nB;
 
           switch (pcch_nB) {
             case LTE_PCCH_Config__nB_fourT:
@@ -1993,12 +1986,12 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
   rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
   rrc_ue_s1ap_ids_p->ue_rnti        = ctxt_pP->rnti;
   h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
-		               (hash_key_t)ue_context_pP->ue_context.ue_initial_id,
-                               rrc_ue_s1ap_ids_p);
+                          (hash_key_t)ue_context_pP->ue_context.ue_initial_id,
+                          rrc_ue_s1ap_ids_p);
 
   if (h_rc != HASH_TABLE_OK) {
     LOG_E(S1AP, "[eNB %d] Error while hashtable_insert in initial_id2_s1ap_ids ue_initial_id %u\n",
-	  ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
+          ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
   }
 
   S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
@@ -2011,8 +2004,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
   S1AP_PATH_SWITCH_REQ (msg_p).security_capabilities.encryption_algorithms=ue_context_pP->ue_context.security_capabilities.encryption_algorithms;
   S1AP_PATH_SWITCH_REQ (msg_p).security_capabilities.integrity_algorithms=ue_context_pP->ue_context.security_capabilities.integrity_algorithms;
   LOG_I (RRC,"Path switch request: nb nb_of_e_rabs %u status %u\n",
-          ue_context_pP->ue_context.nb_of_e_rabs,
-          ue_context_pP->ue_context.e_rab[e_rab].status);
+         ue_context_pP->ue_context.nb_of_e_rabs,
+         ue_context_pP->ue_context.e_rab[e_rab].status);
   memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
 
   // the context for UE to be handovered is obtained through ho_req message
@@ -2032,62 +2025,60 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
   create_tunnel_req.rnti           = ue_context_pP->ue_context.rnti;
   create_tunnel_req.num_tunnels    = e_rabs_done;
   gtpv1u_create_s1u_tunnel(
-      ctxt_pP->instance,
-      &create_tunnel_req,
-      &create_tunnel_resp);
+    ctxt_pP->instance,
+    &create_tunnel_req,
+    &create_tunnel_resp);
   rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
-        ctxt_pP,
-        &create_tunnel_resp,
-        &inde_list[0]);
+    ctxt_pP,
+    &create_tunnel_resp,
+    &inde_list[0]);
 
   for (e_rab = 0; e_rab < e_rabs_done; e_rab++) {
-      S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id = create_tunnel_resp.eps_bearer_id[e_rab];
-      S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid = create_tunnel_resp.enb_S1u_teid[e_rab];
-      S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr = create_tunnel_resp.enb_addr;
-      LOG_I (RRC,"enb_gtp_addr (msg index %d, e_rab index %d, status %d): nb_of_e_rabs %d,  e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
-	     e_rabs_done,  e_rab, ue_context_pP->ue_context.e_rab[inde_list[e_rab]].status,
+    S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id = create_tunnel_resp.eps_bearer_id[e_rab];
+    S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid = create_tunnel_resp.enb_S1u_teid[e_rab];
+    S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr = create_tunnel_resp.enb_addr;
+    LOG_I (RRC,"enb_gtp_addr (msg index %d, e_rab index %d, status %d): nb_of_e_rabs %d,  e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
+           e_rabs_done,  e_rab, ue_context_pP->ue_context.e_rab[inde_list[e_rab]].status,
            S1AP_PATH_SWITCH_REQ (msg_p).nb_of_e_rabs,
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id,
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid,
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[0],
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[1],
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[2],
-	     S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[3]);
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].e_rab_id,
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].gtp_teid,
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[0],
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[1],
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[2],
+           S1AP_PATH_SWITCH_REQ (msg_p).e_rabs_tobeswitched[e_rab].eNB_addr.buffer[3]);
   }
 
-    // NN: add conditions for e_rabs_failed
-    if (e_rabs_done > 0) {
-      LOG_I(RRC,"S1AP_PATH_SWITCH_REQ: sending the message: nb_of_erabstobeswitched %d, total e_rabs %d, index %d\n",
+  // NN: add conditions for e_rabs_failed
+  if (e_rabs_done > 0) {
+    LOG_I(RRC,"S1AP_PATH_SWITCH_REQ: sending the message: nb_of_erabstobeswitched %d, total e_rabs %d, index %d\n",
           S1AP_PATH_SWITCH_REQ (msg_p).nb_of_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
-      MSC_LOG_TX_MESSAGE(
-			 MSC_RRC_ENB,
-			 MSC_S1AP_ENB,
-			 (const char *)&S1AP_PATH_SWITCH_REQ (msg_p),
-			 sizeof(s1ap_path_switch_req_t),
-			 MSC_AS_TIME_FMT" PATH_SWITCH_REQ UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
-			 MSC_AS_TIME_ARGS(ctxt_pP),
-			 ue_context_pP->ue_id_rnti,
-			 S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
-			 e_rabs_done);
-	itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
-     } else {
-        itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
-     }
+    MSC_LOG_TX_MESSAGE(
+      MSC_RRC_ENB,
+      MSC_S1AP_ENB,
+      (const char *)&S1AP_PATH_SWITCH_REQ (msg_p),
+      sizeof(s1ap_path_switch_req_t),
+      MSC_AS_TIME_FMT" PATH_SWITCH_REQ UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
+      MSC_AS_TIME_ARGS(ctxt_pP),
+      ue_context_pP->ue_id_rnti,
+      S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
+      e_rabs_done);
+    itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
+  } else {
+    itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
+  }
 
   return 0;
 }
 
-int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_context_t* const ue_context_target_p) {
+int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_context_t *const ue_context_target_p) {
   gtpv1u_enb_create_x2u_tunnel_req_t  create_tunnel_req;
   gtpv1u_enb_create_x2u_tunnel_resp_t create_tunnel_resp;
-  uint8_t                      		  e_rab_done;
-  uint8_t                         	  inde_list[NB_RB_MAX - 3]= {0};
-  
+  uint8_t                           e_rab_done;
+  uint8_t                             inde_list[NB_RB_MAX - 3]= {0};
+
   if (ue_context_target_p == NULL) {
-    
     return (-1);
   } else {
-    
     /* Save e RAB information for later */
     {
       LOG_I(RRC, "[eNB %d] rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ: rnti %u nb_of_e_rabs %d\n",
@@ -2097,8 +2088,7 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
       uint8_t nb_e_rabs_tosetup = ue_context_target_p->ue_context.nb_of_e_rabs;
       e_rab_done = 0;
 
-      for (i = 0;i < nb_e_rabs_tosetup; i++) {
-
+      for (i = 0; i < nb_e_rabs_tosetup; i++) {
         if(ue_context_target_p->ue_context.e_rab[i].status >= E_RAB_STATUS_DONE)
           continue;
 
@@ -2107,7 +2097,7 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
               i,
               ue_context_target_p->ue_context.rnti,
               create_tunnel_req.eps_bearer_id[i] );
-		inde_list[i] = e_rab_done;
+        inde_list[i] = e_rab_done;
         e_rab_done++;
       }
 
@@ -2118,31 +2108,28 @@ int rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(instance_t instance, rrc_eNB_ue_contex
         instance,
         &create_tunnel_req,
         &create_tunnel_resp);
-
-          ue_context_target_p->ue_context.nb_x2u_e_rabs = create_tunnel_resp.num_tunnels;
-	  for (i = 0; i < create_tunnel_resp.num_tunnels; i++) {
-		ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]]  = create_tunnel_resp.enb_X2u_teid[i];
-	    ue_context_target_p->ue_context.enb_gtp_x2u_addrs[inde_list[i]] = create_tunnel_resp.enb_addr;
-		ue_context_target_p->ue_context.enb_gtp_x2u_ebi[inde_list[i]]   = create_tunnel_resp.eps_bearer_id[i];
-
-		LOG_I(RRC, "rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ tunnel (%u, %u) bearer UE context index %u, msg index %u, eps bearer id %u, gtp addr len %d \n",
-            create_tunnel_resp.enb_X2u_teid[i],
-            ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]],            
-            inde_list[i],
-	    	i,
-            create_tunnel_resp.eps_bearer_id[i],
-	    	create_tunnel_resp.enb_addr.length);
-	  }
+      ue_context_target_p->ue_context.nb_x2u_e_rabs = create_tunnel_resp.num_tunnels;
+
+      for (i = 0; i < create_tunnel_resp.num_tunnels; i++) {
+        ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]]  = create_tunnel_resp.enb_X2u_teid[i];
+        ue_context_target_p->ue_context.enb_gtp_x2u_addrs[inde_list[i]] = create_tunnel_resp.enb_addr;
+        ue_context_target_p->ue_context.enb_gtp_x2u_ebi[inde_list[i]]   = create_tunnel_resp.eps_bearer_id[i];
+        LOG_I(RRC, "rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ tunnel (%u, %u) bearer UE context index %u, msg index %u, eps bearer id %u, gtp addr len %d \n",
+              create_tunnel_resp.enb_X2u_teid[i],
+              ue_context_target_p->ue_context.enb_gtp_x2u_teid[inde_list[i]],
+              inde_list[i],
+              i,
+              create_tunnel_resp.eps_bearer_id[i],
+              create_tunnel_resp.enb_addr.length);
+      }
     }
-
     return (0);
   }
 }
 
 int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
-		                                      const char *msg_name,
-											  instance_t instance)
-{
+    const char *msg_name,
+    instance_t instance) {
   uint16_t                        ue_initial_id;
   uint32_t                        eNB_ue_s1ap_id;
   //gtpv1u_enb_create_tunnel_req_t  create_tunnel_req;
@@ -2175,10 +2162,11 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
       ue_context_p->ue_context.nb_release_of_e_rabs = S1AP_PATH_SWITCH_REQ_ACK (msg_p).nb_e_rabs_tobereleased;
 
       for (i = 0;
-	   i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
-	   i++) {
-	// assume that we are releasing all the DRBs
-	ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_REESTABLISHED;
+           i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
+           i++) {
+        // assume that we are releasing all the DRBs
+        ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_REESTABLISHED;
+
         if (ue_context_p->ue_context.nb_release_of_e_rabs==0) {
           LOG_I(RRC,"Bearer re-established with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
         }
@@ -2191,50 +2179,49 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
       // the index for the rec
       if (nb_e_rabs_tobeswitched>0) {
         int e_rab_switch_index=0;
-      for (i = 0;
-	     i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
-	   i++) {
-	/* Harmonize with enb_gtp_teid, enb_gtp_addrs, and enb_gtp_rbi vars in the top level structure */
+
+        for (i = 0;
+             i < ue_context_p->ue_context.setup_e_rabs; // go over total number of e_rabs received through x2_ho_req msg
+             i++) {
+          /* Harmonize with enb_gtp_teid, enb_gtp_addrs, and enb_gtp_rbi vars in the top level structure */
           if (ue_context_p->ue_context.e_rab[i].param.e_rab_id == S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id) {
-	    ue_context_p->ue_context.e_rab[i].param.e_rab_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id;
-	    ue_context_p->ue_context.e_rab[i].param.sgw_addr= S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].sgw_addr;
-	    ue_context_p->ue_context.e_rab[i].param.gtp_teid = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].gtp_teid;
+            ue_context_p->ue_context.e_rab[i].param.e_rab_id = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].e_rab_id;
+            ue_context_p->ue_context.e_rab[i].param.sgw_addr= S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].sgw_addr;
+            ue_context_p->ue_context.e_rab[i].param.gtp_teid = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobeswitched[e_rab_switch_index].gtp_teid;
             e_rab_switch_index++;
           }
         }
       }
     }
     ue_context_p->ue_context.ue_ambr=S1AP_PATH_SWITCH_REQ_ACK (msg_p).ue_ambr;
-
     ue_context_p->ue_context.setup_e_rabs = ue_context_p->ue_context.setup_e_rabs - ue_context_p->ue_context.nb_release_of_e_rabs;
     ue_context_p->ue_context.nb_of_e_rabs = ue_context_p->ue_context.nb_of_e_rabs - ue_context_p->ue_context.nb_release_of_e_rabs;
-
-    memset(&delete_tunnel_req, 0 , sizeof(delete_tunnel_req));
+    memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
 
     if (ue_context_p->ue_context.nb_release_of_e_rabs>0) {
       int e_rab_release_index=0;
-    for (i = 0;
-	   i < ue_context_p->ue_context.setup_e_rabs;
-	 i++) {
+
+      for (i = 0;
+           i < ue_context_p->ue_context.setup_e_rabs;
+           i++) {
         if (ue_context_p->ue_context.e_rab[i].param.e_rab_id == S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id) {
-      LOG_I(RRC,"Bearer released with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
+          LOG_I(RRC,"Bearer released with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
           ue_context_p->ue_context.e_rab[i].status =  E_RAB_STATUS_TORELEASE;
           ue_context_p->ue_context.e_rabs_tobereleased[e_rab_release_index]=S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id;
           delete_tunnel_req.eps_bearer_id[e_rab_release_index] = S1AP_PATH_SWITCH_REQ_ACK (msg_p).e_rabs_tobereleased[e_rab_release_index].e_rab_id;
           e_rab_release_index++;
-        }
-        else {
+        } else {
           LOG_I(RRC,"Bearer re-established with ID: %d\n", ue_context_p->ue_context.e_rab[i].param.e_rab_id);
         }
       }
     }
 
-    if (ue_context_p->ue_context.nb_release_of_e_rabs>0){
+    if (ue_context_p->ue_context.nb_release_of_e_rabs>0) {
       delete_tunnel_req.rnti= ue_context_p->ue_context.rnti;
       delete_tunnel_req.num_erab= ue_context_p->ue_context.nb_release_of_e_rabs;
       /* this could also be done through ITTI message */
       gtpv1u_delete_s1u_tunnel(instance,
-			       &delete_tunnel_req);
+                               &delete_tunnel_req);
       /* TBD: release the DRB not admitted */
       //rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(&ctxt, ue_context_p, 0);
     }
@@ -2242,33 +2229,26 @@ int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p,
     /* Security key */
     ue_context_p->ue_context.next_hop_chain_count=S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_hop_chain_count;
     memcpy ( ue_context_p->ue_context.next_security_key,
-	     S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_security_key,
-	     SECURITY_KEY_LENGTH);
-
+             S1AP_PATH_SWITCH_REQ_ACK (msg_p).next_security_key,
+             SECURITY_KEY_LENGTH);
     rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(&ctxt, ue_context_p);
-
     return (0);
   }
 }
 
-int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t* const ctxt_pP,
-		                                 rrc_eNB_ue_context_t* const ue_context_pP)
-{
+int rrc_eNB_send_X2AP_UE_CONTEXT_RELEASE(const protocol_ctxt_t *const ctxt_pP,
+    rrc_eNB_ue_context_t *const ue_context_pP) {
   MessageDef      *msg_p         = NULL;
-
   msg_p = itti_alloc_new_message (TASK_RRC_ENB, X2AP_UE_CONTEXT_RELEASE);
-
   X2AP_UE_CONTEXT_RELEASE (msg_p).rnti = ue_context_pP->ue_context.rnti;
   X2AP_UE_CONTEXT_RELEASE (msg_p).source_assoc_id = ue_context_pP->ue_context.handover_info->assoc_id;
   itti_send_msg_to_task (TASK_X2AP, ctxt_pP->instance, msg_p);
-
   return (0);
 }
 
-int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
+int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id) {
   s1ap_eNB_instance_t *s1ap_eNB_instance_p = NULL;
   struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
-
   s1ap_eNB_instance_p = s1ap_eNB_get_instance(instance);
   DevAssert(s1ap_eNB_instance_p != NULL);
 
@@ -2276,7 +2256,7 @@ int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
                       eNB_ue_s1ap_id)) == NULL) {
     /* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
     LOG_W(RRC,"Failed to find ue context associated with eNB ue s1ap id: %u\n",
-              eNB_ue_s1ap_id);
+          eNB_ue_s1ap_id);
     return -1;
   }
 
@@ -2286,17 +2266,17 @@ int s1ap_ue_context_release(instance_t instance, const uint32_t eNB_ue_s1ap_id){
   if ((ue_context2_p = RB_REMOVE(s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head, ue_context_p))
       != NULL) {
     LOG_W(RRC,"Removed UE context eNB_ue_s1ap_id %u\n",
-              ue_context2_p->eNB_ue_s1ap_id);
+          ue_context2_p->eNB_ue_s1ap_id);
     s1ap_eNB_free_ue_context(ue_context2_p);
   } else {
     LOG_W(RRC,"Removing UE context eNB_ue_s1ap_id %u: did not find context\n",
-              ue_context_p->eNB_ue_s1ap_id);
+          ue_context_p->eNB_ue_s1ap_id);
   }
+
   /*RB_FOREACH(ue_context_p, s1ap_ue_map, &s1ap_eNB_instance_p->s1ap_ue_head) {
     S1AP_WARN("in s1ap_ue_map: UE context eNB_ue_s1ap_id %u mme_ue_s1ap_id %u state %u\n",
         ue_context_p->eNB_ue_s1ap_id, ue_context_p->mme_ue_s1ap_id,
         ue_context_p->ue_state);
   }*/
-
   return 0;
 }
diff --git a/openair2/RRC/LTE/rrc_proto.h b/openair2/RRC/LTE/rrc_proto.h
index a8ee7ecabe043b127ab51a8d1bd45d5e340cbba9..d5009de270b7fc139570a995c72fae8b2f30323d 100644
--- a/openair2/RRC/LTE/rrc_proto.h
+++ b/openair2/RRC/LTE/rrc_proto.h
@@ -62,7 +62,7 @@ openair_rrc_on_ue(
 
 void rrc_top_cleanup(void);
 
-/** \brief Function to update eNB timers every subframe.  
+/** \brief Function to update eNB timers every subframe.
 @param ctxt_pP  running context
 @param enb_index
 @param CC_id
@@ -106,13 +106,11 @@ rrc_ue_decode_dcch(
   const uint8_t                eNB_indexP
 );
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int decode_SL_Discovery_Message(
   const protocol_ctxt_t *const ctxt_pP,
   const uint8_t                eNB_index,
   const uint8_t               *Sdu,
   const uint8_t                Sdu_len);
-#endif
 
 /** \brief Generate/Encodes RRCConnnectionRequest message at UE
     \param ctxt_pP Running context
@@ -223,7 +221,7 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP);
    \param buffer Pointer to SDU
    \param buffer_length length of SDU in bytes
    \param CC_id component carrier index*/
-int rrc_eNB_decode_ccch(protocol_ctxt_t* const ctxt_pP,
+int rrc_eNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
                         const uint8_t         *buffer,
                         int                    buffer_length,
                         const int              CC_id);
@@ -312,9 +310,9 @@ void
 rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
     rrc_eNB_ue_context_t  *const ue_context_pP,
     uint8_t               *buffer,
-                                                 int                    *_size
-                                                 //const uint8_t        ho_state
-                                                 );
+    int                    *_size
+    //const uint8_t        ho_state
+                                                );
 void
 rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protocol_ctxt_t *const ctxt_pP);
 
@@ -339,7 +337,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(
   uint8_t                 *nas_buffer
 );
 
-void 
+void
 rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t *const ctxt_pP,
                           rrc_eNB_ue_context_t  *ue_context_pP);
 
@@ -383,8 +381,8 @@ int
 rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
   const protocol_ctxt_t *const ctxt_pP,
   rrc_eNB_ue_context_t           *const ue_context_pP,
-      LTE_SL_DestinationInfoList_r12_t  *destinationInfoList,
-      int n_discoveryMessages
+  LTE_SL_DestinationInfoList_r12_t  *destinationInfoList,
+  int n_discoveryMessages
 );
 
 /** \brief process the received SidelinkUEInformation message at eNB
@@ -404,7 +402,7 @@ rrc_eNB_process_SidelinkUEInformation(
 LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool(
   const protocol_ctxt_t *const ctxt_pP,
   rrc_eNB_ue_context_t *const ue_context_pP,
-      LTE_SL_DestinationInfoList_r12_t  *destinationInfoList
+  LTE_SL_DestinationInfoList_r12_t  *destinationInfoList
 );
 
 /** \brief Get a Resource Pool for Discovery
@@ -414,7 +412,7 @@ LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool(
 LTE_SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool(
   const protocol_ctxt_t *const ctxt_pP,
   rrc_eNB_ue_context_t *const ue_context_pP,
-      int n_discoveryMessages
+  int n_discoveryMessages
 );
 
 /** \brief Process request from control socket
@@ -446,10 +444,8 @@ mac_rrc_data_ind(
   const rb_id_t         srb_idP,
   const uint8_t        *sduP,
   const sdu_size_t      sdu_lenP,
-  const uint8_t         mbsfn_sync_areaP
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  , const boolean_t		brOption
-#endif
+  const uint8_t         mbsfn_sync_areaP,
+  const boolean_t   brOption
 );
 
 int8_t
@@ -481,22 +477,22 @@ mac_rrc_data_ind_ue(
 void mac_sync_ind( module_id_t Mod_instP, uint8_t status);
 
 void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
-			    const int CC_id,
-			    const frame_t frameP,
-			    const sub_frame_t subframeP,
-			    const rnti_t rnti);
+                            const int CC_id,
+                            const frame_t frameP,
+                            const sub_frame_t subframeP,
+                            const rnti_t rnti);
 
 void mac_eNB_rrc_uplane_failure(const module_id_t Mod_instP,
-                const int CC_id,
-                const frame_t frameP,
-                const sub_frame_t subframeP,
-                const rnti_t rnti);
+                                const int CC_id,
+                                const frame_t frameP,
+                                const sub_frame_t subframeP,
+                                const rnti_t rnti);
 
-void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP, 
-			    const int CC_id, 
-			    const frame_t frameP,
-			    const sub_frame_t subframeP,
-			    const rnti_t rnti);
+void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP,
+                            const int CC_id,
+                            const frame_t frameP,
+                            const sub_frame_t subframeP,
+                            const rnti_t rnti);
 
 uint8_t
 rrc_data_req(
@@ -544,15 +540,13 @@ int decode_BCCH_DLSCH_Message(
   const uint8_t                rsrq,
   const uint8_t                rsrp );
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 int decode_BCCH_MBMS_DLSCH_Message(
-  const protocol_ctxt_t* const ctxt_pP,
+  const protocol_ctxt_t *const ctxt_pP,
   const uint8_t                eNB_index,
-  uint8_t*               const Sdu,
+  uint8_t               *const Sdu,
   const uint8_t                Sdu_len,
   const uint8_t                rsrq,
   const uint8_t                rsrp );
-#endif
 
 int decode_PCCH_DLSCH_Message(
   const protocol_ctxt_t *const ctxt_pP,
@@ -614,9 +608,9 @@ rrc_eNB_generate_HandoverPreparationInformation(
 
 int
 flexran_rrc_eNB_trigger_handover (int mod_id,
-  const protocol_ctxt_t *const ctxt_pP,
-  rrc_eNB_ue_context_t  *ue_context_pP,
-  int target_cell_id);
+                                  const protocol_ctxt_t *const ctxt_pP,
+                                  rrc_eNB_ue_context_t  *ue_context_pP,
+                                  int target_cell_id);
 
 void
 check_handovers(
@@ -651,7 +645,7 @@ rrc_eNB_free_mem_UE_context(
 
 void
 rrc_eNB_free_UE(
-		const module_id_t enb_mod_idP,
+  const module_id_t enb_mod_idP,
   const struct rrc_eNB_ue_context_s         *const ue_context_pP
 );
 
@@ -662,10 +656,10 @@ long binary_search_float(float elements[], long numElem, float value);
 void openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active);
 
 void openair_rrc_top_init_ue(
-                        int eMBMS_active,
+  int eMBMS_active,
   char *uecap_xer,
-                        uint8_t cba_group_active,
-                        uint8_t HO_active
+  uint8_t cba_group_active,
+  uint8_t HO_active
 );
 
 extern pthread_mutex_t      rrc_release_freelist;
diff --git a/openair2/RRC/LTE/rrc_vars.h b/openair2/RRC/LTE/rrc_vars.h
index 84739a8a35c6e70d6a05f0ed29b4cef2621970ec..b1a0121c0018185f4a379d091fe190a118f1dcb8 100644
--- a/openair2/RRC/LTE/rrc_vars.h
+++ b/openair2/RRC/LTE/rrc_vars.h
@@ -58,27 +58,23 @@ struct LTE_LogicalChannelConfig__ul_SpecificParameters LCSRB2 =  {3,
          &logicalChannelGroup0
 };
 
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
 struct LTE_LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
-         logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9
+logicalChannelSR_Mask_r9:
+  &logicalChannelSR_Mask_r9
 };
-#endif
 
 // These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6)
-LTE_LogicalChannelConfig_t  SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                                                  ,
-                                                                  ext1: &logicalChannelSR_Mask_r9_ext1
-#endif
-                                                                 };
-
-LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2
-#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
-                                                                 ,
-                                                                 ext1: &logicalChannelSR_Mask_r9_ext1
-#endif
-                                                                };
+LTE_LogicalChannelConfig_t  SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters:
+                                                                      &LCSRB1,
+                                                                      ext1:
+                                                                      &logicalChannelSR_Mask_r9_ext1
+                                                                     };
+
+LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters:
+                                                                     &LCSRB2,
+                                                                     ext1:
+                                                                     &logicalChannelSR_Mask_r9_ext1
+                                                                    };
 
 //CONSTANTS
 rlc_info_t Rlc_info_um,Rlc_info_am_config;
@@ -101,142 +97,142 @@ uint32_t timeToTrigger_ms[16] = {0,40,64,80,100,128,160,256,320,480,512,640,1024
 /* 36.133 Section 9.1.4 RSRP Measurement Report Mapping, Table: 9.1.4-1 */
 float RSRP_meas_mapping[98] = {
   -140,
-  -139,
-  -138,
-  -137,
-  -136,
-  -135,
-  -134,
-  -133,
-  -132,
-  -131,
-  -130,
-  -129,
-  -128,
-  -127,
-  -126,
-  -125,
-  -124,
-  -123,
-  -122,
-  -121,
-  -120,
-  -119,
-  -118,
-  -117,
-  -116,
-  -115,
-  -114,
-  -113,
-  -112,
-  -111,
-  -110,
-  -109,
-  -108,
-  -107,
-  -106,
-  -105,
-  -104,
-  -103,
-  -102,
-  -101,
-  -100,
-  -99,
-  -98,
-  -97,
-  -96,
-  -95,
-  -94,
-  -93,
-  -92,
-  -91,
-  -90,
-  -89,
-  -88,
-  -87,
-  -86,
-  -85,
-  -84,
-  -83,
-  -82,
-  -81,
-  -80,
-  -79,
-  -78,
-  -77,
-  -76,
-  -75,
-  -74,
-  -73,
-  -72,
-  -71,
-  -70,
-  -69,
-  -68,
-  -67,
-  -66,
-  -65,
-  -64,
-  -63,
-  -62,
-  -61,
-  -60,
-  -59,
-  -58,
-  -57,
-  -56,
-  -55,
-  -54,
-  -53,
-  -52,
-  -51,
-  -50,
-  -49,
-  -48,
-  -47,
-  -46,
-  -45,
-  -44,
-  -43
-};
+    -139,
+    -138,
+    -137,
+    -136,
+    -135,
+    -134,
+    -133,
+    -132,
+    -131,
+    -130,
+    -129,
+    -128,
+    -127,
+    -126,
+    -125,
+    -124,
+    -123,
+    -122,
+    -121,
+    -120,
+    -119,
+    -118,
+    -117,
+    -116,
+    -115,
+    -114,
+    -113,
+    -112,
+    -111,
+    -110,
+    -109,
+    -108,
+    -107,
+    -106,
+    -105,
+    -104,
+    -103,
+    -102,
+    -101,
+    -100,
+    -99,
+    -98,
+    -97,
+    -96,
+    -95,
+    -94,
+    -93,
+    -92,
+    -91,
+    -90,
+    -89,
+    -88,
+    -87,
+    -86,
+    -85,
+    -84,
+    -83,
+    -82,
+    -81,
+    -80,
+    -79,
+    -78,
+    -77,
+    -76,
+    -75,
+    -74,
+    -73,
+    -72,
+    -71,
+    -70,
+    -69,
+    -68,
+    -67,
+    -66,
+    -65,
+    -64,
+    -63,
+    -62,
+    -61,
+    -60,
+    -59,
+    -58,
+    -57,
+    -56,
+    -55,
+    -54,
+    -53,
+    -52,
+    -51,
+    -50,
+    -49,
+    -48,
+    -47,
+    -46,
+    -45,
+    -44,
+    -43
+  };
 
 float RSRQ_meas_mapping[35] = {
   -19,
-  -18.5,
-  -18,
-  -17.5,
-  -17,
-  -16.5,
-  -16,
-  -15.5,
-  -15,
-  -14.5,
-  -14,
-  -13.5,
-  -13,
-  -12.5,
-  -12,
-  -11.5,
-  -11,
-  -10.5,
-  -10,
-  -9.5,
-  -9,
-  -8.5,
-  -8,
-  -7.5,
-  -7,
-  -6.5,
-  -6,
-  -5.5,
-  -5,
-  -4.5,
-  -4,
-  -3.5,
-  -3,
-  -2.5,
-  -2
-};
+    -18.5,
+    -18,
+    -17.5,
+    -17,
+    -16.5,
+    -16,
+    -15.5,
+    -15,
+    -14.5,
+    -14,
+    -13.5,
+    -13,
+    -12.5,
+    -12,
+    -11.5,
+    -11,
+    -10.5,
+    -10,
+    -9.5,
+    -9,
+    -8.5,
+    -8,
+    -7.5,
+    -7,
+    -6.5,
+    -6,
+    -5.5,
+    -5,
+    -4.5,
+    -4,
+    -3.5,
+    -3,
+    -2.5,
+    -2
+  };
 
 // only used for RRC connection re-establishment procedure TS36.331 5.3.7
 // [0]: current C-RNTI, [1]: prior C-RNTI
diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c
index 3085300d8d35474c9ac3b3348f74528b827b896f..e63a75d84fe0d875f13cabc5f060230806627bb8 100644
--- a/openair2/RRC/NR/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c
@@ -240,12 +240,8 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
   mib->message.choice.mib->spare.bits_unused = 7;  // This makes a spare of 1 bits
 
   mib->message.choice.mib->ssb_SubcarrierOffset = ssb_SubcarrierOffset;
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = (pdcch_ConfigSIB1 / 16);
   mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = (pdcch_ConfigSIB1 % 16);
-#else
-  mib->message.choice.mib->pdcch_ConfigSIB1 = pdcch_ConfigSIB1;
-#endif
   switch (subCarrierSpacingCommon) {
     case 15:
       mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60;
@@ -341,11 +337,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
     //(*servingcellconfigcommon)->lte_CRS_ToMatchAround           = CALLOC(1,sizeof(struct NR_SetupRelease_RateMatchPatternLTE_CRS));
     (*servingcellconfigcommon)->rateMatchPatternToAddModList              = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToAddModList));
     (*servingcellconfigcommon)->rateMatchPatternToReleaseList             = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList));
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 5, 0))
     (*servingcellconfigcommon)->ssbSubcarrierSpacing                      = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
-#else 
-    (*servingcellconfigcommon)->subcarrierSpacing                         = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
-#endif
     (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon             = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon));
 
 
@@ -360,11 +352,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero    = CALLOC(1,sizeof(long));
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero           = CALLOC(1,sizeof(long));
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet  = CALLOC(1,sizeof(struct NR_ControlResourceSet));
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList     = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList));
-#else
-    (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace         = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpace));
-#endif
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1                    = CALLOC(1,sizeof(NR_SearchSpaceId_t));
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation  = CALLOC(1,sizeof(NR_SearchSpaceId_t));
     (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace                  = CALLOC(1,sizeof(NR_SearchSpaceId_t));
@@ -388,11 +376,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB            = CALLOC(1,sizeof(NR_RSRP_Range_t));
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL        = CALLOC(1,sizeof(NR_RSRP_Range_t));
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing       = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder       = CALLOC(1,sizeof(long));
-#else
-    (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding      = CALLOC(1,sizeof(long));
-#endif    
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon                 = CALLOC(1,sizeof(NR_SetupRelease_PUSCH_ConfigCommon_t)); 
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup   = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon));
     (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long));
@@ -588,32 +572,19 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
     bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8   = CALLOC(1,sizeof(long)); 
     bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16  = CALLOC(1,sizeof(long));
     bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3                         = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
     bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1                 = CALLOC(1,sizeof(long));
-#else
-    bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity  = CALLOC(1,sizeof(long));
-#endif
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1)  = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id];
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2)  = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id];
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4)  = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id];
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8)  = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id];
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id];
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
     *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1)                = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
     bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2                   = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
-#else
-    *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
-    bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->nrofPDCCH_Candidates     = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
-#endif
   }else if (bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific){
     bwp_dl_searchspace->searchSpaceType->choice.ue_Specific->dci_Formats = configuration->ue_Specific__dci_Formats[CC_id];
   }
 
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list,&bwp_dl_searchspace);
-#else
-  ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace->list,&bwp_dl_searchspace);
-#endif
 
   *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1)                    = configuration->searchSpaceSIB1[CC_id];
   *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation)  = configuration->searchSpaceOtherSystemInformation[CC_id];
@@ -701,11 +672,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
   (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig          = configuration->restrictedSetConfig[CC_id];
 
   if(configuration->msg3_transformPrecoding[CC_id]){
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
     *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder)   = NR_RACH_ConfigCommon__msg3_transformPrecoder_enabled;
-#else
-    *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding)   = NR_RACH_ConfigCommon__msg3_transformPrecoding_enabled;
-#endif
   }
 
   //Fill  initialUplinkBWP -> BWP-UplinkCommon -> rach_ConfigCommon -> rach_ConfigGeneric//  
@@ -740,12 +707,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
   *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal)           = configuration->p0_nominal[CC_id];
   *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon) = configuration->pucch_ResourceCommon[CC_id];
   *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId)            = configuration->hoppingId[CC_id];
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   (*servingcellconfigcommon)->uplinkConfigCommon->dummy                    = configuration->UL_timeAlignmentTimerCommon[CC_id];
-#else
-  (*servingcellconfigcommon)->uplinkConfigCommon->timeAlignmentTimerCommon = configuration->UL_timeAlignmentTimerCommon[CC_id];
-#endif
-
   (*servingcellconfigcommon)->n_TimingAdvanceOffset = CALLOC(1,sizeof(long));
   *((*servingcellconfigcommon)->n_TimingAdvanceOffset)=configuration->ServingCellConfigCommon_n_TimingAdvanceOffset[CC_id];
   //ssb_PositionsInBurst
@@ -860,11 +822,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
   }
 
   *(ratematchpattern->subcarrierSpacing) = configuration->RateMatchPattern_subcarrierSpacing[CC_id];
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   ratematchpattern->dummy = configuration->RateMatchPattern_mode[CC_id];
-#else
-  ratematchpattern->mode  = configuration->RateMatchPattern_mode[CC_id];
-#endif
 
   ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToAddModList->list,&ratematchpattern);
   
@@ -873,11 +831,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
   ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToReleaseList->list,&ratematchpatternid);
 
   //subcarrierSpacing
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 5, 0))
   *(*servingcellconfigcommon)->ssbSubcarrierSpacing         = configuration->NIA_SubcarrierSpacing[CC_id];
-#else
-  *(*servingcellconfigcommon)->subcarrierSpacing            = configuration->NIA_SubcarrierSpacing[CC_id];
-#endif
 
   //tdd_UL_DL_ConfigurationCommon
   (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing             = configuration->referenceSubcarrierSpacing[CC_id];
@@ -1097,11 +1051,7 @@ void  do_MAC_CELLGROUP(uint8_t Mod_id,
   mac_CellGroupConfig->phr_Config->choice.setup->phr_ProhibitTimer         = mac_cellgroup_config->phr_ProhibitTimer[CC_id];
   mac_CellGroupConfig->phr_Config->choice.setup->phr_Tx_PowerFactorChange  = mac_cellgroup_config->phr_Tx_PowerFactorChange[CC_id];
   mac_CellGroupConfig->phr_Config->choice.setup->multiplePHR               = mac_cellgroup_config->multiplePHR[CC_id];
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   mac_CellGroupConfig->phr_Config->choice.setup->dummy                     = mac_cellgroup_config->phr_Type2SpCell[CC_id];
-#else
-  mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2SpCell           = mac_cellgroup_config->phr_Type2SpCell[CC_id];
-#endif
   mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2OtherCell        = mac_cellgroup_config->phr_Type2OtherCell[CC_id];
   mac_CellGroupConfig->phr_Config->choice.setup->phr_ModeOtherCG           = mac_cellgroup_config->phr_ModeOtherCG[CC_id];
 
@@ -1116,11 +1066,7 @@ void  do_PHYSICALCELLGROUP(uint8_t Mod_id,
 
   physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH = CALLOC(1,sizeof(long));
   physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH = CALLOC(1,sizeof(long));
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   physicalCellGroupConfig->p_NR_FR1                      = CALLOC(1,sizeof(NR_P_Max_t));
-#else
-  physicalCellGroupConfig->p_NR                          = CALLOC(1,sizeof(NR_P_Max_t));
-#endif
   physicalCellGroupConfig->tpc_SRS_RNTI                  = CALLOC(1,sizeof(NR_RNTI_Value_t));
   physicalCellGroupConfig->tpc_PUCCH_RNTI                = CALLOC(1,sizeof(NR_RNTI_Value_t));
   physicalCellGroupConfig->tpc_PUSCH_RNTI                = CALLOC(1,sizeof(NR_RNTI_Value_t));
@@ -1128,11 +1074,7 @@ void  do_PHYSICALCELLGROUP(uint8_t Mod_id,
 
   *(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUCCH[CC_id];
   *(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUSCH[CC_id];
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
   *(physicalCellGroupConfig->p_NR_FR1)                      = physicalcellgroup_config->p_NR[CC_id];
-#else
-  *(physicalCellGroupConfig->p_NR)                          = physicalcellgroup_config->p_NR[CC_id];
-#endif
   physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook          = physicalcellgroup_config->pdsch_HARQ_ACK_Codebook[CC_id];
   *(physicalCellGroupConfig->tpc_SRS_RNTI)                  = physicalcellgroup_config->tpc_SRS_RNTI[CC_id];
   *(physicalCellGroupConfig->tpc_PUCCH_RNTI)                = physicalcellgroup_config->tpc_PUCCH_RNTI[CC_id];
diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h
index b165a963513e22175fa89bd5119c7f0e788201a0..5f552dbfbab0416741a3ce88fe03616bb5826118 100644
--- a/openair2/RRC/NR/nr_rrc_defs.h
+++ b/openair2/RRC/NR/nr_rrc_defs.h
@@ -71,7 +71,7 @@
 //-------------------
 
 #if defined(ENABLE_ITTI)
-# include "intertask_interface.h"
+  #include "intertask_interface.h"
 #endif
 
 /* TODO: be sure this include is correct.
@@ -79,11 +79,11 @@
  * issue #186.
  */
 #if !defined(ENABLE_ITTI)
-# include "as_message.h"
+  #include "as_message.h"
 #endif
 
 #if defined(ENABLE_USE_MME)
-# include "commonDef.h"
+  #include "commonDef.h"
 #endif
 
 
@@ -95,7 +95,7 @@ typedef unsigned int uid_nr_t;
 /*typedef struct nr_uid_linear_allocator_s {
   unsigned int   bitmap[NR_UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
 } nr_uid_allocator_t;*/
-    
+
 
 #define PROTOCOL_NR_RRC_CTXT_UE_FMT                PROTOCOL_CTXT_FMT
 #define PROTOCOL_NR_RRC_CTXT_UE_ARGS(CTXT_Pp)      PROTOCOL_CTXT_ARGS(CTXT_Pp)
@@ -158,13 +158,12 @@ typedef struct UE_RRC_INFO_NR_s {
   uint8_t                                             SIB1systemInfoValueTag;
   uint32_t                                            SIStatus;
   uint32_t                                            SIcnt;
-#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   uint8_t                                             MCCHStatus[8];             // MAX_MBSFN_AREA
-#endif
   uint8_t                                             SIwindowsize;              //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
   uint8_t                                             handoverTarget;
   //HO_STATE_t ho_state;
-  uint16_t                                            SIperiod;                  //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
+  uint16_t
+  SIperiod;                  //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
   unsigned short                                      UE_index;
   uint32_t                                            T300_active;
   uint32_t                                            T300_cnt;
@@ -229,7 +228,7 @@ typedef struct {
 
 typedef struct RB_INFO_NR_s {
   uint16_t                                            Rb_id;  //=Lchan_id
-  NR_LCHAN_DESC Lchan_desc[2]; 
+  NR_LCHAN_DESC Lchan_desc[2];
   //MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
 } NR_RB_INFO;
 
@@ -260,25 +259,23 @@ typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
 
 typedef struct gNB_RRC_UE_s {
   uint8_t                            primaryCC_id;
-#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
   LTE_SCellToAddMod_r10_t            sCell_config[2];
-#endif
-  NR_SRB_ToAddModList_t*             SRB_configList;
-  NR_SRB_ToAddModList_t*             SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
-  NR_DRB_ToAddModList_t*             DRB_configList;
-  NR_DRB_ToAddModList_t*             DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
-  NR_DRB_ToReleaseList_t*            DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
+  NR_SRB_ToAddModList_t             *SRB_configList;
+  NR_SRB_ToAddModList_t             *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
+  NR_DRB_ToAddModList_t             *DRB_configList;
+  NR_DRB_ToAddModList_t             *DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
+  NR_DRB_ToReleaseList_t            *DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
   uint8_t                            DRB_active[8];
 
   SRB_INFO                           SI;
   SRB_INFO                           Srb0;
   SRB_INFO_TABLE_ENTRY               Srb1;
   SRB_INFO_TABLE_ENTRY               Srb2;
-  NR_MeasConfig_t*                   measConfig;
-  HANDOVER_INFO*                     handover_info;
-  NR_MeasResults_t*                  measResults;
+  NR_MeasConfig_t                   *measConfig;
+  HANDOVER_INFO                     *handover_info;
+  NR_MeasResults_t                  *measResults;
 
-  NR_UE_NR_Capability_t*             UE_Capability;
+  NR_UE_NR_Capability_t             *UE_Capability;
   ImsiMobileIdentity_t               imsi;
 
 #if defined(ENABLE_SECURITY)
@@ -340,7 +337,7 @@ typedef struct gNB_RRC_UE_s {
   uint32_t                           ue_reestablishment_timer;
   uint32_t                           ue_reestablishment_timer_thres;
   uint8_t                            e_rab_release_command_flag;
-//------------------------------------------------------------------------------//
+  //------------------------------------------------------------------------------//
   NR_CellGroupId_t                                      cellGroupId;
   struct NR_SpCellConfig                                *spCellConfig;
   struct NR_CellGroupConfig__sCellToAddModList          *sCellconfig;
@@ -349,7 +346,7 @@ typedef struct gNB_RRC_UE_s {
   struct NR_CellGroupConfig__rlc_BearerToReleaseList    *rlc_BearerRelease;
   struct NR_MAC_CellGroupConfig                         *mac_CellGroupConfig;
   struct NR_PhysicalCellGroupConfig                     *physicalCellGroupConfig;
-  
+
 } gNB_RRC_UE_t;
 
 typedef uid_t ue_uid_t;
@@ -374,8 +371,8 @@ typedef struct rrc_gNB_ue_context_s {
 typedef struct {
 
   // buffer that contains the encoded messages
-  uint8_t							                      *MIB;
-  uint8_t							                      sizeof_MIB;
+  uint8_t                                   *MIB;
+  uint8_t                                   sizeof_MIB;
 
   uint8_t                                   *ServingCellConfigCommon;
   uint8_t                                   sizeof_servingcellconfigcommon;
@@ -383,15 +380,15 @@ typedef struct {
   //implicit parameters needed
   int                                       physCellId;
   int                                       Ncp; //cyclic prefix for DL
-  int								                        Ncp_UL; //cyclic prefix for UL
+  int                                       Ncp_UL; //cyclic prefix for UL
   int                                       p_gNB; //number of tx antenna port
-  int								                        p_rx_gNB; //number of receiving antenna ports
+  int                                       p_rx_gNB; //number of receiving antenna ports
   uint64_t                                  dl_CarrierFreq; //detected by the UE
   uint64_t                                  ul_CarrierFreq; //detected by the UE
-  
+
   //are the only static one (memory has been already allocated)
   NR_BCCH_BCH_Message_t                     mib;
-  
+
   NR_ServingCellConfigCommon_t              *servingcellconfigcommon;
 
 
@@ -410,7 +407,7 @@ typedef struct gNB_RRC_INST_s {
   rrc_gNB_carrier_data_t                              carrier[MAX_NUM_CCs];
   uid_allocator_t                                     uid_allocator; // for rrc_ue_head
   RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s)     rrc_ue_head; // ue_context tree key search by rnti
-  
+
   uint8_t                                             Nb_ue;
 
   hash_table_t                                        *initial_id2_s1ap_ids; // key is    content is rrc_ue_s1ap_ids_t
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 58e19b5014910bd27339b46c1221d9e0dfebfcca..3d42190887f6c8995a6f24f4297172441e219dcb 100644
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -64,27 +64,27 @@
 #include "OCG_extern.h"
 
 #if defined(ENABLE_SECURITY)
-#   include "UTIL/OSA/osa_defs.h"
+  #include "UTIL/OSA/osa_defs.h"
 #endif
 
 #if defined(ENABLE_USE_MME)
-#   include "rrc_eNB_S1AP.h"
-#   include "rrc_eNB_GTPV1U.h"
-#   if defined(ENABLE_ITTI)
-#   else
-#      include "../../S1AP/s1ap_eNB.h"
-#   endif
+  #include "rrc_eNB_S1AP.h"
+  #include "rrc_eNB_GTPV1U.h"
+  #if defined(ENABLE_ITTI)
+  #else
+    #include "../../S1AP/s1ap_eNB.h"
+  #endif
 #endif
 
 #include "pdcp.h"
 #include "gtpv1u_eNB_task.h"
 
 #if defined(ENABLE_ITTI)
-#   include "intertask_interface.h"
+  #include "intertask_interface.h"
 #endif
 
 #if ENABLE_RAL
-#   include "rrc_eNB_ral.h"
+  #include "rrc_eNB_ral.h"
 #endif
 
 #include "SIMULATION/TOOLS/sim.h" // for taus
@@ -95,12 +95,12 @@
 extern RAN_CONTEXT_t RC;
 
 #ifdef PHY_EMUL
-extern EMULATION_VARS              *Emul_vars;
+  extern EMULATION_VARS              *Emul_vars;
 #endif
 //extern eNB_MAC_INST                *eNB_mac_inst;
 //extern UE_MAC_INST                 *UE_mac_inst;
 #ifdef BIGPHYSAREA
-extern void*                        bigphys_malloc(int);
+  extern void                        *bigphys_malloc(int);
 #endif
 
 extern uint16_t                     two_tier_hexagonal_cellIds[7];
@@ -110,8 +110,7 @@ mui_t                               rrc_gNB_mui = 0;
 ///---------------------------------------------------------------------------------------------------------------///
 ///---------------------------------------------------------------------------------------------------------------///
 
-void openair_nr_rrc_on(const protocol_ctxt_t* const ctxt_pP){
-  
+void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
   LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" gNB:OPENAIR NR RRC IN....\n",PROTOCOL_NR_RRC_CTXT_ARGS(ctxt_pP));
 
   for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
@@ -120,24 +119,21 @@ void openair_nr_rrc_on(const protocol_ctxt_t* const ctxt_pP){
     rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0, CCCH, 1);
     RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Active = 1;
   }
-
 }
 
 ///---------------------------------------------------------------------------------------------------------------///
 ///---------------------------------------------------------------------------------------------------------------///
 
-void rrc_gNB_process_SgNBAdditionRequest( 
-     const protocol_ctxt_t  *const ctxt_pP,
-     rrc_gNB_ue_context_t   *ue_context_pP 
-     ){
-
+void rrc_gNB_process_SgNBAdditionRequest(
+  const protocol_ctxt_t  *const ctxt_pP,
+  rrc_gNB_ue_context_t   *ue_context_pP
+) {
   rrc_gNB_generate_SgNBAdditionRequestAcknowledge(ctxt_pP,ue_context_pP);
 }
 
-void rrc_gNB_generate_SgNBAdditionRequestAcknowledge( 
-     const protocol_ctxt_t  *const ctxt_pP,
-     rrc_gNB_ue_context_t   *const ue_context_pP)
-{
+void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
+  const protocol_ctxt_t  *const ctxt_pP,
+  rrc_gNB_ue_context_t   *const ue_context_pP) {
   //uint8_t size;
   //uint8_t buffer[100];
   //int     CC_id = ue_context_pP->ue_context.primaryCC_id;
@@ -148,20 +144,17 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
   struct NR_PhysicalCellGroupConfig                   *physicalCellGroupConfig;
   struct NR_SpCellConfig                              *spCellConfig;
   //struct NR_CellGroupConfig__sCellToAddModList        *sCellToAddModList;
-
   cellGroupconfig                           = CALLOC(1,sizeof(NR_CellGroupConfig_t));
   cellGroupconfig->rlc_BearerToAddModList   = CALLOC(1,sizeof(struct NR_CellGroupConfig__rlc_BearerToAddModList));
   cellGroupconfig->mac_CellGroupConfig      = CALLOC(1,sizeof(struct NR_MAC_CellGroupConfig));
   cellGroupconfig->physicalCellGroupConfig  = CALLOC(1,sizeof(struct NR_PhysicalCellGroupConfig));
   cellGroupconfig->spCellConfig             = CALLOC(1,sizeof(struct NR_SpCellConfig));
   //cellGroupconfig->sCellToAddModList        = CALLOC(1,sizeof(struct NR_CellGroupConfig__sCellToAddModList));
-
   rlc_BearerToAddModList   = cellGroupconfig->rlc_BearerToAddModList;
   mac_CellGroupConfig      = cellGroupconfig->mac_CellGroupConfig;
   physicalCellGroupConfig  = cellGroupconfig->physicalCellGroupConfig;
   spCellConfig             = cellGroupconfig->spCellConfig;
   //sCellToAddModList        = cellGroupconfig->sCellToAddModList;
-  
   rlc_bearer_config_t *rlc_config;
   rlc_config = CALLOC(1,sizeof(rlc_bearer_config_t));
   //Fill rlc_bearer config value
@@ -174,7 +167,6 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
                 ue_context_pP->ue_context.primaryCC_id,
                 rlc_BearerToAddModList,
                 rlc_config);
-
   mac_cellgroup_t *mac_cellgroup_config;
   mac_cellgroup_config = CALLOC(1,sizeof(mac_cellgroup_t));
   //Fill mac_cellgroup_config config value
@@ -187,7 +179,6 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
                    ue_context_pP->ue_context.primaryCC_id,
                    mac_CellGroupConfig,
                    mac_cellgroup_config);
-
   physicalcellgroup_t *physicalcellgroup_config;
   physicalcellgroup_config = CALLOC(1,sizeof(physicalcellgroup_t));
   //Fill physicalcellgroup_config config value
@@ -200,29 +191,23 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
                        ue_context_pP->ue_context.primaryCC_id,
                        physicalCellGroupConfig,
                        physicalcellgroup_config);
-
-
   do_SpCellConfig(ctxt_pP->module_id,
                   ue_context_pP->ue_context.primaryCC_id,
                   spCellConfig);
-
-
 }
 
 ///---------------------------------------------------------------------------------------------------------------///
 ///---------------------------------------------------------------------------------------------------------------///
 
-static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
+static void init_NR_SI(const protocol_ctxt_t *const ctxt_pP,
                        const int              CC_id
-                       #if defined(ENABLE_ITTI)
-                       ,
-                       gNB_RrcConfigurationReq * configuration
-                       #endif
-                      ){
+#if defined(ENABLE_ITTI)
+  ,
+  gNB_RrcConfigurationReq *configuration
+#endif
+                      ) {
   //int                                 i;
-
   LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
-
   // copy basic parameters
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId      = configuration->Nid_cell[CC_id];
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB           = configuration->nb_antenna_ports[CC_id];
@@ -230,67 +215,62 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp_UL          = configuration->UL_prefix_type[CC_id];
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq  = configuration->downlink_frequency[CC_id];
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq  = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
-
   ///MIB
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB      = 0;
-  RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB             = (uint8_t*) malloc16(4);
+  RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB             = (uint8_t *) malloc16(4);
   RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB      = do_MIB_NR(&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id],0,
-                                                                            #ifdef ENABLE_ITTI
-                                                                            configuration->MIB_ssb_SubcarrierOffset[CC_id],
-                                                                            configuration->pdcch_ConfigSIB1[CC_id],
-                                                                            configuration->MIB_subCarrierSpacingCommon[CC_id],
-                                                                            configuration->MIB_dmrs_TypeA_Position[CC_id]
-                                                                            #else
-                                                                            0,0,15,2
-                                                                            #endif
-                                                                            );
-
+#ifdef ENABLE_ITTI
+      configuration->MIB_ssb_SubcarrierOffset[CC_id],
+      configuration->pdcch_ConfigSIB1[CC_id],
+      configuration->MIB_subCarrierSpacingCommon[CC_id],
+      configuration->MIB_dmrs_TypeA_Position[CC_id]
+#else
+      0,0,15,2
+#endif
+                                                                          );
   do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id,
                              CC_id,
-                             #if defined(ENABLE_ITTI)
+#if defined(ENABLE_ITTI)
                              configuration,
-                             #endif
+#endif
                              1
-                             );
-  
+                            );
   LOG_I(NR_RRC,"Done init_NR_SI\n");
-
   rrc_mac_config_req_gNB(ctxt_pP->module_id,
                          CC_id,
-			 RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
+                         RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
                          RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB,
                          configuration->nr_band[CC_id],
-			 configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
-			 configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id],
+                         configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id],
+                         configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id],
                          RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq,
                          configuration->N_RB_DL[CC_id],
                          (NR_BCCH_BCH_Message_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].mib,
                          (NR_ServingCellConfigCommon_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].servingcellconfigcommon
-                         );
+                        );
 }
 
 
-char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq* configuration){
+char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq *configuration) {
   protocol_ctxt_t      ctxt;
   int                  CC_id;
-
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gnb_mod_idP, GNB_FLAG_YES, NOT_A_RNTI, 0, 0,gnb_mod_idP);
   LOG_I(NR_RRC,
         PROTOCOL_NR_RRC_CTXT_FMT" Init...\n",
         PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
+#if OCP_FRAMEWORK
 
-  #if OCP_FRAMEWORK
-    while ( RC.nrrrc[gnb_mod_idP] == NULL ) {
-      LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n");
-      sleep(1);
-    }
-  #endif 
-    AssertFatal(RC.nrrrc[gnb_mod_idP] != NULL, "RC.nrrrc not initialized!");
-    AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
-  #ifdef ENABLE_ITTI
-    AssertFatal(configuration!=NULL,"configuration input is null\n");
-  #endif
+  while ( RC.nrrrc[gnb_mod_idP] == NULL ) {
+    LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n");
+    sleep(1);
+  }
 
+#endif
+  AssertFatal(RC.nrrrc[gnb_mod_idP] != NULL, "RC.nrrrc not initialized!");
+  AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
+#ifdef ENABLE_ITTI
+  AssertFatal(configuration!=NULL,"configuration input is null\n");
+#endif
   RC.nrrrc[ctxt.module_id]->Nb_ue = 0;
 
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
@@ -299,55 +279,24 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
 
   uid_linear_allocator_init(&RC.nrrrc[ctxt.module_id]->uid_allocator);
   RB_INIT(&RC.nrrrc[ctxt.module_id]->rrc_ue_head);
-
   RC.nrrrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
   RC.nrrrc[ctxt.module_id]->s1ap_id2_s1ap_ids    = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
-
   memcpy(&RC.nrrrc[ctxt.module_id]->configuration,configuration,sizeof(gNB_RrcConfigurationReq));
-
   /// System Information INIT
-
   LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Checking release \n",PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
 
-  #ifdef CBA
-
-  for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-    for (j = 0; j < NUM_MAX_CBA_GROUP; j++) {
-      RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[j] = CBA_OFFSET + j;
-    }
-
-    if (RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) {
-      RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
-    }
-
-    LOG_D(NR_RRC,
-          PROTOCOL_NR_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
-          PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt),
-          gnb_mod_idP, RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[0],
-          RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[1],
-          RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[2],
-          RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[3],
-          RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups);
-  }
-
-  #endif
-
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     init_NR_SI(&ctxt,
-              CC_id
-              #if defined(ENABLE_ITTI)
-              ,configuration
-              #endif
+               CC_id
+#if defined(ENABLE_ITTI)
+               ,configuration
+#endif
               );
   }//END for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
 
   rrc_init_nr_global_param();
-
-
   openair_nr_rrc_on(&ctxt);
-
-  return 0;  
-
+  return 0;
 }//END openair_rrc_gNB_configuration
 
 
@@ -355,7 +304,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
 ///---------------------------------------------------------------------------------------------------------------///
 #if defined(ENABLE_ITTI)
 
-void* rrc_gnb_task(void* args_p){
+void *rrc_gnb_task(void *args_p) {
   MessageDef                         *msg_p;
   const char                         *msg_name_p;
   instance_t                         instance;
@@ -363,97 +312,94 @@ void* rrc_gnb_task(void* args_p){
   //SRB_INFO                           *srb_info_p;
   //int                                CC_id;
   //protocol_ctxt_t                    ctxt;
-
   itti_mark_task_ready(TASK_RRC_GNB);
   LOG_I(NR_RRC,"Entering main loop of NR_RRC message task\n");
 
   while (1) {
-  // Wait for a message
+    // Wait for a message
     itti_receive_msg(TASK_RRC_GNB, &msg_p);
-
     msg_name_p = ITTI_MSG_NAME(msg_p);
     instance = ITTI_MSG_INSTANCE(msg_p);
     LOG_I(NR_RRC,"Received message %s\n",msg_name_p);
 
     switch (ITTI_MSG_ID(msg_p)) {
-    case TERMINATE_MESSAGE:
-      LOG_W(RRC, " *** Exiting NR_RRC thread\n");
-      itti_exit_task();
-      break;
+      case TERMINATE_MESSAGE:
+        LOG_W(RRC, " *** Exiting NR_RRC thread\n");
+        itti_exit_task();
+        break;
 
-    case MESSAGE_TEST:
-      LOG_I(RRC, "[gNB %d] Received %s\n", instance, msg_name_p);
-      break;
+      case MESSAGE_TEST:
+        LOG_I(RRC, "[gNB %d] Received %s\n", instance, msg_name_p);
+        break;
 
       /* Messages from MAC */
 
-	    
       /* Messages from PDCP */
 
-/*
-#if defined(ENABLE_USE_MME)
-
-      // Messages from S1AP 
-    case S1AP_DOWNLINK_NAS:
-      rrc_eNB_process_S1AP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui);
-      break;
-
-    case S1AP_INITIAL_CONTEXT_SETUP_REQ:
-      rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance);
-      break;
-
-    case S1AP_UE_CTXT_MODIFICATION_REQ:
-      rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(msg_p, msg_name_p, instance);
-      break;
-
-    case S1AP_PAGING_IND:
-      LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
-      rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
-      break;
-  
-    case S1AP_E_RAB_SETUP_REQ: 
-      rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
-      LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
-      break;
-
-    case S1AP_E_RAB_MODIFY_REQ:
-      rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(msg_p, msg_name_p, instance);
-      break;
-
-    case S1AP_E_RAB_RELEASE_COMMAND:
-      rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(msg_p, msg_name_p, instance);
-      break;
-    
-    case S1AP_UE_CONTEXT_RELEASE_REQ:
-      rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
-      break;
-
-    case S1AP_UE_CONTEXT_RELEASE_COMMAND:
-      rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
-      break;
-
-    case GTPV1U_ENB_DELETE_TUNNEL_RESP:
-      ///Nothing to do. Apparently everything is done in S1AP processing
-      //LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
-      //instance, msg_name_p);
-      if (rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)
-          && rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc > 0) {
-        rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc =
-        rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_thres_rrc;
-      }
-      break;
-
-#endif
-*/
-    /* Messages from gNB app */
-    case NRRRC_CONFIGURATION_REQ:
-      LOG_I(NR_RRC, "[gNB %d] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));
-      openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(instance), &NRRRC_CONFIGURATION_REQ(msg_p));
-      break;
-
-    default:
-      LOG_E(NR_RRC, "[gNB %d] Received unexpected message %s\n", instance, msg_name_p);
-      break;
+      /*
+      #if defined(ENABLE_USE_MME)
+
+            // Messages from S1AP
+          case S1AP_DOWNLINK_NAS:
+            rrc_eNB_process_S1AP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui);
+            break;
+
+          case S1AP_INITIAL_CONTEXT_SETUP_REQ:
+            rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_UE_CTXT_MODIFICATION_REQ:
+            rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_PAGING_IND:
+            LOG_D(RRC, "[eNB %d] Received Paging message from S1AP: %s\n", instance, msg_name_p);
+            rrc_eNB_process_PAGING_IND(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_E_RAB_SETUP_REQ:
+            rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(msg_p, msg_name_p, instance);
+            LOG_D(RRC, "[eNB %d] Received the message %s\n", instance, msg_name_p);
+            break;
+
+          case S1AP_E_RAB_MODIFY_REQ:
+            rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_E_RAB_RELEASE_COMMAND:
+            rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_UE_CONTEXT_RELEASE_REQ:
+            rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
+            break;
+
+          case S1AP_UE_CONTEXT_RELEASE_COMMAND:
+            rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
+            break;
+
+          case GTPV1U_ENB_DELETE_TUNNEL_RESP:
+            ///Nothing to do. Apparently everything is done in S1AP processing
+            //LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
+            //instance, msg_name_p);
+            if (rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)
+                && rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc > 0) {
+              rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc =
+              rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_thres_rrc;
+            }
+            break;
+
+      #endif
+      */
+      /* Messages from gNB app */
+      case NRRRC_CONFIGURATION_REQ:
+        LOG_I(NR_RRC, "[gNB %d] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));
+        openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(instance), &NRRRC_CONFIGURATION_REQ(msg_p));
+        break;
+
+      default:
+        LOG_E(NR_RRC, "[gNB %d] Received unexpected message %s\n", instance, msg_name_p);
+        break;
     }
 
     result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index 7efc4e8bed949fcb5c595c965d19e28d0fe687ef..756be3963a635ff65e027e13aab962ac9f2d732d 100755
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -384,7 +384,6 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
                         break;
 
                     case NR_DL_DCCH_MessageType__c1_PR_NOTHING:
-#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
                     case NR_DL_DCCH_MessageType__c1_PR_rrcResume:
                     case NR_DL_DCCH_MessageType__c1_PR_rrcRelease:
                     case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment:
@@ -393,16 +392,6 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
                     case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
                     case NR_DL_DCCH_MessageType__c1_PR_counterCheck:
                     case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand:
-#else
-                    case NR_DL_DCCH_MessageType__c1_PR_spare15:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare14:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare13:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare12:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare11:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare10:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare9:
-                    case NR_DL_DCCH_MessageType__c1_PR_spare8:
-#endif
                     case NR_DL_DCCH_MessageType__c1_PR_spare7:
                     case NR_DL_DCCH_MessageType__c1_PR_spare6:
                     case NR_DL_DCCH_MessageType__c1_PR_spare5:
diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h
index e4ad6c227330a7d0f4f2ee837e4df27cc9ec17e0..912d846723147c4396db6d4d86bdc64be82aa97e 100644
--- a/openair2/UTIL/OPT/opt.h
+++ b/openair2/UTIL/OPT/opt.h
@@ -105,24 +105,21 @@ typedef enum radio_type_e {
   RADIO_TYPE_MAX
 } radio_type_t;
 
-extern trace_mode_t opt_type;
-extern char in_ip[40];
-extern char in_path[FILENAME_MAX];
 
 /**
  * function def
 */
 
 void trace_pdu(int direction,
-		       uint8_t *pdu_buffer,
-			   unsigned int pdu_buffer_size,
+               uint8_t *pdu_buffer,
+               unsigned int pdu_buffer_size,
                int ueid,
-			   int rntiType,
-			   int rnti,
-			   uint16_t sysFrame,
-			   uint8_t subframe,
+               int rntiType,
+               int rnti,
+               uint16_t sysFrame,
+               uint8_t subframe,
                int oob_event,
-			   int oob_event_value);
+               int oob_event_value);
 
 int init_opt(void);
 
diff --git a/openair2/UTIL/OPT/probe.c b/openair2/UTIL/OPT/probe.c
index 6e93066b8339b5d21787bc3ab3195c8b66ee49e7..3f07ad0a0947a719f05717a7a37e633991787065 100644
--- a/openair2/UTIL/OPT/probe.c
+++ b/openair2/UTIL/OPT/probe.c
@@ -90,8 +90,8 @@ what about the implementation
 
 #include <pthread.h>
 #include <stdint.h>
-#include "opt.h"
 #include "common/config/config_userapi.h"
+#include "opt.h"
 #include "common/utils/system.h"
 
 int opt_enabled=0;
@@ -99,8 +99,8 @@ int opt_enabled=0;
 //static unsigned char g_PDUBuffer[1600];
 //static unsigned int g_PDUOffset;
 
-char in_ip[40];
-char in_path[FILENAME_MAX];
+static char *in_ip;
+static char *in_path;
 FILE *file_fd = NULL;
 pcap_hdr_t file_header = {
   0xa1b2c3d4,   /* magic number */
@@ -132,8 +132,7 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
                       uint8_t *pdu_buffer, unsigned int pdu_buffer_size);
 
 static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
-                                 const unsigned char *PDU,
-								 unsigned int length);
+                                 const unsigned char *PDU, unsigned int length);
 
 static void *opt_listener_thread(void *arg) {
   ssize_t ret;
diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c
index 54b0020296b1f7057f0d56f11ae81cb515a96f6e..b7ccb07461f4e62da13707938823201a53672567 100644
--- a/openair2/X2AP/x2ap_eNB.c
+++ b/openair2/X2AP/x2ap_eNB.c
@@ -151,8 +151,8 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
   printf("x2ap_eNB_handle_sctp_association_resp at 4\n");
   dump_trees();
   /* Prepare new x2 Setup Request */
-  x2ap_eNB_generate_ENDC_x2_setup_request(instance_p, x2ap_enb_data_p);
-  //x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p);
+  x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p);
+  //x2ap_eNB_generate_ENDC_x2_setup_request(instance_p, x2ap_enb_data_p);
 }
 
 static
diff --git a/openair2/X2AP/x2ap_eNB_decoder.c b/openair2/X2AP/x2ap_eNB_decoder.c
index c7fc98763a656e0f97b06c76a197c1042c22cba7..7b178fb109e8aadaa58d65d73ff4959911076f18 100644
--- a/openair2/X2AP/x2ap_eNB_decoder.c
+++ b/openair2/X2AP/x2ap_eNB_decoder.c
@@ -134,9 +134,9 @@ int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint3
                         length,
                         0,
                         0);
-  //if (asn1_xer_print) {
+  if (asn1_xer_print) {
     xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, pdu);
-  //}
+  }
 
   if (dec_ret.code != RC_OK) {
     X2AP_ERROR("Failed to decode pdu\n");
diff --git a/openair2/X2AP/x2ap_eNB_encoder.c b/openair2/X2AP/x2ap_eNB_encoder.c
index 392206e4d730653e76dfea07c299860347aaa625..8b1c030d35d0b14d588475cf317d450f2fa3e686 100644
--- a/openair2/X2AP/x2ap_eNB_encoder.c
+++ b/openair2/X2AP/x2ap_eNB_encoder.c
@@ -44,9 +44,9 @@ int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
   DevAssert(buffer != NULL);
   DevAssert(len != NULL);
 
-  //if (asn1_xer_print) {
+  if (asn1_xer_print) {
     xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)pdu);
-  //}
+  }
 
   encoded = aper_encode_to_new_buffer(&asn_DEF_X2AP_X2AP_PDU, 0, pdu, (void **)buffer);
 
diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c
index e56edb8fe6b54f5e811d1f9fbe33fe79d746724c..54c4153e46d753e1d1c27c95f7faa5dd5752e38a 100644
--- a/openair3/GTPV1-U/gtpv1u_eNB.c
+++ b/openair3/GTPV1-U/gtpv1u_eNB.c
@@ -57,9 +57,9 @@
 extern unsigned char NB_eNB_INST;
 extern RAN_CONTEXT_t RC;
 
-extern struct rrc_eNB_ue_context_s*
+extern struct rrc_eNB_ue_context_s *
 rrc_eNB_get_ue_context(
-  eNB_RRC_INST* rrc_instance_pP,
+  eNB_RRC_INST *rrc_instance_pP,
   rnti_t rntiP);
 
 #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
@@ -112,24 +112,22 @@ static void gtpv1u_eNB_write_dump_socket(uint8_t *buffer_pP, uint32_t buffer_len
 #endif
 
 //-----------------------------------------------------------------------------
-static int gtpv1u_eNB_get_msgsource(struct rrc_eNB_ue_context_s *ue_context_p, teid_t teid)
-{
+static int gtpv1u_eNB_get_msgsource(struct rrc_eNB_ue_context_s *ue_context_p, teid_t teid) {
   int erab_index = 0;
 
   /* source enb */
-  if(ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info->state == HO_COMPLETE)
-  {
-    return GTPV1U_MSG_FROM_SPGW; 
+  if(ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
+    return GTPV1U_MSG_FROM_SPGW;
   }
 
   /* target enb */
   for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
-    if(ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index] == teid){
-      return GTPV1U_MSG_FROM_SOURCE_ENB;  
+    if(ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index] == teid) {
+      return GTPV1U_MSG_FROM_SOURCE_ENB;
     }
   }
-  
-  return GTPV1U_MSG_FROM_SPGW;  
+
+  return GTPV1U_MSG_FROM_SPGW;
 }
 
 //-----------------------------------------------------------------------------
@@ -225,10 +223,9 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
     case NW_GTPV1U_ULP_API_RECV_TPDU: {
       uint8_t              buffer[4096];
       uint32_t             buffer_len;
-      struct rrc_eNB_ue_context_s        *ue_context_p;	
+      struct rrc_eNB_ue_context_s        *ue_context_p;
       uint16_t             msgType = NW_GTP_GPDU;
-      NwGtpv1uMsgT 		 *pMsg = NULL;
-
+      NwGtpv1uMsgT     *pMsg = NULL;
       /* Nw-gptv1u stack has processed a PDU. we can schedule it to PDCP
        * for transmission.
        */
@@ -276,158 +273,152 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
           0,0,
           (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
           buffer_len);
+        ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
+
+        if((ue_context_p != NULL) &&
+            (ue_context_p->ue_context.handover_info != NULL) &&
+            (ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) {
+          if(msgType == NW_GTP_END_MARKER) {
+            /* in the source enb, UE in RRC_HO_EXECUTION mode */
+            if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
+              /* set handover state */
+              //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
+              MessageDef *msg;
+              // Configure end marker
+              msg = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_END_MARKER_REQ);
+              GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
+              memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
+              GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len;
+              GTPV1U_ENB_END_MARKER_REQ(msg).rnti   = ctxt.rnti;
+              GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
+              GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
+              LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
+              itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
+              return NW_GTPV1U_OK;
+            }
+          }
 
-    ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
-    if((ue_context_p != NULL) && 
-       (ue_context_p->ue_context.handover_info != NULL) &&
-       (ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) {
-
-      if(msgType == NW_GTP_END_MARKER){
-        /* in the source enb, UE in RRC_HO_EXECUTION mode */
-        if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
-          /* set handover state */
-          //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
-                
-          MessageDef *msg;
-          // Configure end marker
-          msg = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_END_MARKER_REQ);
-          GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
-          memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
-          GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len;
-          GTPV1U_ENB_END_MARKER_REQ(msg).rnti   = ctxt.rnti;
-          GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
-          GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
-          LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
-          itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
-          return NW_GTPV1U_OK;
-	}
-      }
-	  
-      if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION || ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
-
-        int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid);
-
-        LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n", 
-              ue_context_p->ue_context.Status, 
-              ue_context_p->ue_context.handover_info->state,
-              ue_context_p->ue_context.handover_info->forwarding_state,
-              msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC",
-              msgsrc != GTPV1U_MSG_FROM_SOURCE_ENB? "UDP DATA" :
-              msgType == NW_GTP_END_MARKER?"END MARKER":"DATA FORWARDING");
-
-	/* target enb */
-	if(msgType == NW_GTP_END_MARKER){
-	  LOG_I(GTPU, "target end receive END MARKER\n");
-	  ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
-          gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
-          memset(&delete_tunnel_req, 0 , sizeof(delete_tunnel_req));
-          delete_tunnel_req.rnti = ctxt.rnti;
-    	  gtpv1u_delete_x2u_tunnel(ctxt.module_id, &delete_tunnel_req, GTPV1U_TARGET_ENB);
-	  return NW_GTPV1U_OK;
-	}
-
-        /* form source eNB message */
-        if(msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB)
-        {
-          LOG_I(GTPU, "Received a message data forwarding length %d\n", buffer_len);
+          if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION || ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
+            int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid);
+            LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n",
+                  ue_context_p->ue_context.Status,
+                  ue_context_p->ue_context.handover_info->state,
+                  ue_context_p->ue_context.handover_info->forwarding_state,
+                  msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC",
+                  msgsrc != GTPV1U_MSG_FROM_SOURCE_ENB? "UDP DATA" :
+                  msgType == NW_GTP_END_MARKER?"END MARKER":"DATA FORWARDING");
+
+            /* target enb */
+            if(msgType == NW_GTP_END_MARKER) {
+              LOG_I(GTPU, "target end receive END MARKER\n");
+              ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
+              gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
+              memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
+              delete_tunnel_req.rnti = ctxt.rnti;
+              gtpv1u_delete_x2u_tunnel(ctxt.module_id, &delete_tunnel_req, GTPV1U_TARGET_ENB);
+              return NW_GTPV1U_OK;
+            }
 
+            /* form source eNB message */
+            if(msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB) {
+              LOG_I(GTPU, "Received a message data forwarding length %d\n", buffer_len);
 #if defined(LOG_GTPU) && LOG_GTPU > 0
-          LOG_T(GTPU, "forwarding data info:\n", buffer_len);	  
+              LOG_T(GTPU, "forwarding data info:\n", buffer_len);
 
-          for(int i=1;i<=buffer_len; i++){
-	    LOG_T(GTPU, "%02x ", buffer[i-1]);
-	    if(i%20 == 0)LOG_T(GTPU, "\n");
-	  }
-	  LOG_T(GTPU, "\n");
-#endif
-			
-	  result = gtpv_data_req(
-				&ctxt,
-				(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-				0, // mui
-				SDU_CONFIRM_NO, // confirm
-				buffer_len,
-				buffer,
-				PDCP_TRANSMISSION_MODE_DATA,
-                                TASK_DATA_FORWARDING
-				);
-			
-          if ( result == FALSE ) {
-	    LOG_W(GTPU, "DATA FORWARDING message save failed\n");	
-	    return NW_GTPV1U_FAILURE;
-	  }
-	  ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_NO_EMPTY;
-          return NW_GTPV1U_OK;
-	}
-        /* from epc message */
-        else
-        {
-          /* in the source enb, UE in RRC_HO_EXECUTION mode */
-          if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
-          MessageDef *msg;
-          // Configure target
-          msg = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_DATA_FORWARDING_REQ);
-          GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
-          memcpy(&GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
-          GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len;
-          GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti   = ctxt.rnti;
-          GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
-          GTPV1U_ENB_DATA_FORWARDING_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
+              for(int i=1; i<=buffer_len; i++) {
+                LOG_T(GTPU, "%02x ", buffer[i-1]);
 
-#if defined(LOG_GTPU) && LOG_GTPU > 0
+                if(i%20 == 0)LOG_T(GTPU, "\n");
+              }
 
-          LOG_T(GTPU, "Send data forwarding sdu_buffer to target enb. len %d info\n", buffer);
-          for(int i=1; i<=buffer_len; i++){
-            LOG_T(GTPU, "%02x ", buffer[i-1]);
-            if(i%20 == 0)LOG_T(GTPU, "\n");
-          }
-          LOG_T(GTPU, "\n");
+              LOG_T(GTPU, "\n");
 #endif
+              result = gtpv_data_req(
+                         &ctxt,
+                         (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
+                         0, // mui
+                         SDU_CONFIRM_NO, // confirm
+                         buffer_len,
+                         buffer,
+                         PDCP_TRANSMISSION_MODE_DATA,
+                         TASK_DATA_FORWARDING
+                       );
+
+              if ( result == FALSE ) {
+                LOG_W(GTPU, "DATA FORWARDING message save failed\n");
+                return NW_GTPV1U_FAILURE;
+              }
+
+              ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_NO_EMPTY;
+              return NW_GTPV1U_OK;
+            }
+            /* from epc message */
+            else {
+              /* in the source enb, UE in RRC_HO_EXECUTION mode */
+              if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
+                MessageDef *msg;
+                // Configure target
+                msg = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_DATA_FORWARDING_REQ);
+                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
+                memcpy(&GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
+                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len;
+                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti   = ctxt.rnti;
+                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
+                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
+#if defined(LOG_GTPU) && LOG_GTPU > 0
+                LOG_T(GTPU, "Send data forwarding sdu_buffer to target enb. len %d info\n", buffer);
 
-          LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
-          itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
-          return NW_GTPV1U_OK;
-        }
+                for(int i=1; i<=buffer_len; i++) {
+                  LOG_T(GTPU, "%02x ", buffer[i-1]);
+
+                  if(i%20 == 0)LOG_T(GTPU, "\n");
+                }
 
-          /* target eNB. x2ho forwarding is processing. spgw message save to TASK_END_MARKER */
-          if(ue_context_p->ue_context.handover_info->state != HO_COMPLETE &&
-             ue_context_p->ue_context.handover_info->state != HO_END_MARKER )
-          {
-            LOG_I(GTPU, "x2ho forwarding is processing. Received a spgw message. length %d\n", buffer_len);
-#if defined(LOG_GTPU) && LOG_GTPU > 0				
-	  LOG_T(GTPU, "spgw data info:\n", buffer_len);			
-	  for(int i=1;i<=buffer_len; i++){
-	    LOG_T(GTPU, "%02x ", buffer[i-1]);
-	    if(i%20 == 0)LOG_T(GTPU, "\n");
-	  }
-	  LOG_T(GTPU, "\n");
+                LOG_T(GTPU, "\n");
 #endif
-			
-	  result = gtpv_data_req(
-			&ctxt,
-			(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-			0, // mui
-			SDU_CONFIRM_NO, // confirm
-			buffer_len,
-			buffer,
-			PDCP_TRANSMISSION_MODE_DATA,
-		        TASK_END_MARKER
-			);
-
-	if ( result == FALSE ) {
-	  LOG_W(GTPU, "DATA FORWARDING message save failed\n");
-	  return NW_GTPV1U_FAILURE;
-        }
+                LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
+                itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
+                return NW_GTPV1U_OK;
+              }
+
+              /* target eNB. x2ho forwarding is processing. spgw message save to TASK_END_MARKER */
+              if(ue_context_p->ue_context.handover_info->state != HO_COMPLETE &&
+                  ue_context_p->ue_context.handover_info->state != HO_END_MARKER ) {
+                LOG_I(GTPU, "x2ho forwarding is processing. Received a spgw message. length %d\n", buffer_len);
+#if defined(LOG_GTPU) && LOG_GTPU > 0
+                LOG_T(GTPU, "spgw data info:\n", buffer_len);
 
-	ue_context_p->ue_context.handover_info->endmark_state = ENDMARK_NO_EMPTY;
-        return NW_GTPV1U_OK;
-      }
+                for(int i=1; i<=buffer_len; i++) {
+                  LOG_T(GTPU, "%02x ", buffer[i-1]);
 
-     }
+                  if(i%20 == 0)LOG_T(GTPU, "\n");
+                }
 
-    }
+                LOG_T(GTPU, "\n");
+#endif
+                result = gtpv_data_req(
+                           &ctxt,
+                           (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
+                           0, // mui
+                           SDU_CONFIRM_NO, // confirm
+                           buffer_len,
+                           buffer,
+                           PDCP_TRANSMISSION_MODE_DATA,
+                           TASK_END_MARKER
+                         );
+
+                if ( result == FALSE ) {
+                  LOG_W(GTPU, "DATA FORWARDING message save failed\n");
+                  return NW_GTPV1U_FAILURE;
+                }
+
+                ue_context_p->ue_context.handover_info->endmark_state = ENDMARK_NO_EMPTY;
+                return NW_GTPV1U_OK;
+              }
+            }
+          }
+        }
 
-  }
         result = pdcp_data_req(
                    &ctxt,
                    SRB_FLAG_NO,
@@ -436,10 +427,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
                    SDU_CONFIRM_NO, // confirm
                    buffer_len,
                    buffer,
-                   PDCP_TRANSMISSION_MODE_DATA
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                   ,NULL, NULL
-#endif
+                   PDCP_TRANSMISSION_MODE_DATA,NULL, NULL
                  );
 
         if ( result == FALSE ) {
@@ -671,7 +659,7 @@ gtpv1u_new_data_req(
   ue.ue_id = ue_rntiP;
   AssertFatal(enb_module_idP >=0, "Bad parameter enb module id %u\n", enb_module_idP);
   AssertFatal((rab_idP - GTPV1U_BEARER_OFFSET)< GTPV1U_MAX_BEARERS_ID, "Bad parameter rab id %u\n", rab_idP);
-  AssertFatal((rab_idP - GTPV1U_BEARER_OFFSET) >= 0 , "Bad parameter rab id %u\n", rab_idP);
+  AssertFatal((rab_idP - GTPV1U_BEARER_OFFSET) >= 0, "Bad parameter rab id %u\n", rab_idP);
   gtpv1u_data_p = RC.gtpv1u_data_g;
   /* Check that UE context is present in ue map. */
   hash_rc = hashtable_get(gtpv1u_data_p->ue_mapping, (uint64_t)ue_rntiP, (void **)&ue_inst_p);
@@ -739,10 +727,9 @@ gtpv1u_new_data_req(
 int
 gtpv1u_create_x2u_tunnel(
   const instance_t                              instanceP,
-  const gtpv1u_enb_create_x2u_tunnel_req_t * const  create_tunnel_req_pP,
-        gtpv1u_enb_create_x2u_tunnel_resp_t * const create_tunnel_resp_pP
-  )
-{
+  const gtpv1u_enb_create_x2u_tunnel_req_t *const  create_tunnel_req_pP,
+  gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP
+) {
   /* Create a new nw-gtpv1-u stack req using API */
   NwGtpv1uUlpApiT          stack_req;
   NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
@@ -752,16 +739,14 @@ gtpv1u_create_x2u_tunnel(
   hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
   int                      i;
   ebi_t                    eps_bearer_id        = 0;
-
   MSC_LOG_RX_MESSAGE(
-		  MSC_GTPU_ENB,
-		  MSC_RRC_ENB,
-		  NULL,0,
-		  MSC_AS_TIME_FMT" CREATE_X2U_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u enb-x2u teid %u",
-		  0,0,create_tunnel_req_pP->rnti, instanceP,
-		  create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
-		  create_tunnel_req_pP->tenb_X2u_teid[0]);
-
+    MSC_GTPU_ENB,
+    MSC_RRC_ENB,
+    NULL,0,
+    MSC_AS_TIME_FMT" CREATE_X2U_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u enb-x2u teid %u",
+    0,0,create_tunnel_req_pP->rnti, instanceP,
+    create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
+    create_tunnel_req_pP->tenb_X2u_teid[0]);
   create_tunnel_resp_pP->rnti        = create_tunnel_req_pP->rnti;
   create_tunnel_resp_pP->status      = 0;
   create_tunnel_resp_pP->num_tunnels = 0;
@@ -771,7 +756,6 @@ gtpv1u_create_x2u_tunnel(
     LOG_D(GTPU, "Rx GTPV1U_ENB_CREATE_X2U_TUNNEL_REQ ue rnti %x eps bearer id %u\n",
           create_tunnel_req_pP->rnti, eps_bearer_id);
     memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-
     stack_req.apiType = NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
 
     do {
@@ -780,30 +764,26 @@ gtpv1u_create_x2u_tunnel(
       stack_req.apiInfo.createTunnelEndPointInfo.teid          = x2u_teid;
       stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession   = 0;
       stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
-
       rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
       LOG_D(GTPU, ".\n");
     } while (rc != NW_GTPV1U_OK);
 
-      memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
-             &RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up,
-             sizeof (in_addr_t));
-
-      LOG_D(GTPU, "gtpv1u_create_x2u_tunnel() end addr %d.%d.%d.%d\n",
-		create_tunnel_resp_pP->enb_addr.buffer[0],
-		create_tunnel_resp_pP->enb_addr.buffer[1],
-		create_tunnel_resp_pP->enb_addr.buffer[2],
-		create_tunnel_resp_pP->enb_addr.buffer[3]);
-
+    memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
+           &RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up,
+           sizeof (in_addr_t));
+    LOG_D(GTPU, "gtpv1u_create_x2u_tunnel() end addr %d.%d.%d.%d\n",
+          create_tunnel_resp_pP->enb_addr.buffer[0],
+          create_tunnel_resp_pP->enb_addr.buffer[1],
+          create_tunnel_resp_pP->enb_addr.buffer[2],
+          create_tunnel_resp_pP->enb_addr.buffer[3]);
     create_tunnel_resp_pP->enb_addr.length  = sizeof (in_addr_t);
     create_tunnel_resp_pP->eps_bearer_id[i] = eps_bearer_id;
     create_tunnel_resp_pP->num_tunnels      += 1;
-
     //-----------------------
     // GTPV1U->PDCP mapping
     //-----------------------
     create_tunnel_resp_pP->enb_X2u_teid[i] = x2u_teid;
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, x2u_teid, (void**)&gtpv1u_teid_data_p);
+    hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, x2u_teid, (void **)&gtpv1u_teid_data_p);
 
     if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
       gtpv1u_teid_data_p = calloc (1, sizeof(gtpv1u_teid_data_t));
@@ -817,14 +797,14 @@ gtpv1u_create_x2u_tunnel(
       create_tunnel_resp_pP->status         = 0xFF;
     }
   }
-  MSC_LOG_TX_MESSAGE(
-		  MSC_GTPU_ENB,
-		  MSC_RRC_ENB,
-		  NULL,0,
-		  "0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
-		  create_tunnel_resp_pP->rnti,
-		  x2u_teid);
 
+  MSC_LOG_TX_MESSAGE(
+    MSC_GTPU_ENB,
+    MSC_RRC_ENB,
+    NULL,0,
+    "0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
+    create_tunnel_resp_pP->rnti,
+    x2u_teid);
   LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
         create_tunnel_req_pP->rnti,
         create_tunnel_resp_pP->status);
@@ -834,38 +814,37 @@ gtpv1u_create_x2u_tunnel(
 //-----------------------------------------------------------------------------
 int gtpv1u_delete_x2u_tunnel(
   const instance_t                             instanceP,
-  const gtpv1u_enb_delete_tunnel_req_t * const req_pP,
-  int                             enbflag)
-{
+  const gtpv1u_enb_delete_tunnel_req_t *const req_pP,
+  int                             enbflag) {
   gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
   hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
   int                      erab_index           = 0;
   ebi_t                    eps_bearer_id        = 0;
   struct rrc_eNB_ue_context_s *ue_context_p     = NULL;
-
   ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instanceP], req_pP->rnti);
-  if(ue_context_p != NULL){
+
+  if(ue_context_p != NULL) {
     /* in the source enb */
-    if(enbflag == GTPV1U_SOURCE_ENB){
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void**)&gtpv1u_ue_data_p);
+    if(enbflag == GTPV1U_SOURCE_ENB) {
+      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
 
       if (hash_rc == HASH_TABLE_OK) {
         for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
           eps_bearer_id = ue_context_p->ue_context.enb_gtp_x2u_ebi[erab_index];
           LOG_I(GTPU, "gtpv1u_delete_x2u_tunnel user rnti %x teNB X2U teid %u eps bearer id %u\n",
-            req_pP->rnti, 
-            gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB,
-            ue_context_p->ue_context.enb_gtp_x2u_ebi[erab_index]);
-          
+                req_pP->rnti,
+                gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB,
+                ue_context_p->ue_context.enb_gtp_x2u_ebi[erab_index]);
           gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = 0;
           gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = 0;
           //gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr = 0;
         }
+
         ue_context_p->ue_context.nb_x2u_e_rabs = 0;
       }
     }
     /* in the target enb */
-    else{
+    else {
       for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
         //-----------------------
         // GTPV1U->PDCP mapping
@@ -877,9 +856,11 @@ int gtpv1u_delete_x2u_tunnel(
           LOG_D(GTPU, "Removed user rnti %x , enb X2U teid %u not found\n", req_pP->rnti, ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index]);
         }
       }
+
       ue_context_p->ue_context.nb_x2u_e_rabs = 0;
     }
   }
+
   return 0;
 }
 
@@ -907,8 +888,6 @@ gtpv1u_create_s1u_tunnel(
   int                      addrs_length_in_bytes= 0;
   int                      loop_counter         = 0;
   int                      ret                  = 0;
-
-
   MSC_LOG_RX_MESSAGE(
     MSC_GTPU_ENB,
     MSC_RRC_ENB,
@@ -940,6 +919,7 @@ gtpv1u_create_s1u_tunnel(
       LOG_D(GTPU, ".\n");
       loop_counter++;
     } while (rc != NW_GTPV1U_OK && loop_counter < 10);
+
     if ( rc != NW_GTPV1U_OK && loop_counter == 10 ) {
       LOG_E(GTPU,"NwGtpv1uCreateTunnelEndPoint failed 10 times,start next loop\n");
       ret = -1;
@@ -1058,13 +1038,14 @@ int gtpv1u_update_s1u_tunnel(
   memcpy(gtpv1u_ue_data_new_p,gtpv1u_ue_data_p,sizeof(gtpv1u_ue_data_t));
   gtpv1u_ue_data_new_p->ue_id       = create_tunnel_req_pP->rnti;
   hash_rc = hashtable_insert(RC.gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, gtpv1u_ue_data_new_p);
+
   //AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
   if ( hash_rc != HASH_TABLE_OK ) {
     LOG_E(GTPU,"Failed to insert ue_mapping(rnti=%x) in GTPV1U hashtable\n",create_tunnel_req_pP->rnti);
     return -1;
   } else {
-  LOG_I(GTPU, "inserting ue_mapping(rnti=%x) in GTPV1U hashtable\n",
-        create_tunnel_req_pP->rnti);
+    LOG_I(GTPU, "inserting ue_mapping(rnti=%x) in GTPV1U hashtable\n",
+          create_tunnel_req_pP->rnti);
   }
 
   hash_rc = hashtable_remove(RC.gtpv1u_data_g->ue_mapping, prior_rnti);
@@ -1234,6 +1215,7 @@ int gtpv1u_eNB_init(void) {
    */
   ulp.ulpReqCallback = gtpv1u_eNB_process_stack_req;
   memset((void *)&(ulp.hUlp), 0, sizeof(NwGtpv1uUlpHandleT));
+
   if ((rc = nwGtpv1uSetUlpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &ulp)) != NW_GTPV1U_OK) {
     LOG_E(GTPU, "nwGtpv1uSetUlpEntity: %x", rc);
     return -1;
@@ -1244,6 +1226,7 @@ int gtpv1u_eNB_init(void) {
    */
   udp.udpDataReqCallback = gtpv1u_eNB_send_udp_msg;
   memset((void *)&(udp.hUdp), 0, sizeof(NwGtpv1uUdpHandleT));
+
   if ((rc = nwGtpv1uSetUdpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &udp)) != NW_GTPV1U_OK) {
     LOG_E(GTPU, "nwGtpv1uSetUdpEntity: %x", rc);
     return -1;
@@ -1251,6 +1234,7 @@ int gtpv1u_eNB_init(void) {
 
   log.logReqCallback = gtpv1u_eNB_log_request;
   memset((void *)&(log.logMgrHandle), 0, sizeof(NwGtpv1uLogMgrHandleT));
+
   if ((rc = nwGtpv1uSetLogMgrEntity(RC.gtpv1u_data_g->gtpv1u_stack, &log)) != NW_GTPV1U_OK) {
     LOG_E(GTPU, "nwGtpv1uSetLogMgrEntity: %x", rc);
     return -1;
@@ -1395,169 +1379,159 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
     break;
 
     case GTPV1U_ENB_DATA_FORWARDING_REQ: {
-    gtpv1u_enb_data_forwarding_req_t *data_req_p           = NULL;
-    NwGtpv1uUlpApiT               stack_req;
-    NwGtpv1uRcT                   rc                   = NW_GTPV1U_FAILURE;
-    hashtable_rc_t                hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-    gtpv1u_ue_data_t             *gtpv1u_ue_data_p     = NULL;
-    teid_t                        enb_s1u_teid         = 0;
-    teid_t                        tenb_x2u_teid         = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-    data_req_p = &GTPV1U_ENB_DATA_FORWARDING_REQ(received_message_p);
-    //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
-
+      gtpv1u_enb_data_forwarding_req_t *data_req_p           = NULL;
+      NwGtpv1uUlpApiT               stack_req;
+      NwGtpv1uRcT                   rc                   = NW_GTPV1U_FAILURE;
+      hashtable_rc_t                hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
+      gtpv1u_ue_data_t             *gtpv1u_ue_data_p     = NULL;
+      teid_t                        enb_s1u_teid         = 0;
+      teid_t                        tenb_x2u_teid         = 0;
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
+      data_req_p = &GTPV1U_ENB_DATA_FORWARDING_REQ(received_message_p);
+      //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
 #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-    gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
+      gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
 #endif
-    memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void**)&gtpv1u_ue_data_p);
+      memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
+      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
 
-    if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-      LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-    } else {
-      if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
-        enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
-        tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
-        stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-        stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
-        stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
-
-        rc = nwGtpv1uGpduMsgNew(
-               RC.gtpv1u_data_g->gtpv1u_stack,
-               tenb_x2u_teid,
-               NW_FALSE,
-               RC.gtpv1u_data_g->seq_num++,
-               data_req_p->buffer,
-               data_req_p->length,
-               data_req_p->offset,
-               &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-        if (rc != NW_GTPV1U_OK) {
-          LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-          MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-          		enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-          (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
-        } else {
-          rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
+      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
+        LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
+      } else {
+        if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
+          enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
+          tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
+          stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
+          stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
+          stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
+          rc = nwGtpv1uGpduMsgNew(
+                 RC.gtpv1u_data_g->gtpv1u_stack,
+                 tenb_x2u_teid,
+                 NW_FALSE,
+                 RC.gtpv1u_data_g->seq_num++,
+                 data_req_p->buffer,
+                 data_req_p->length,
+                 data_req_p->offset,
+                 &(stack_req.apiInfo.sendtoInfo.hMsg));
 
           if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
+            LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
             MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-            		enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+                          enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+            (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
           } else {
-            MSC_LOG_TX_MESSAGE(
-            		MSC_GTPU_ENB,
-            		MSC_GTPU_SGW,
-            		NULL,
-            		0,
-            		MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-            		0,0,
-            		enb_s1u_teid,
-            		tenb_x2u_teid,
-            		data_req_p->length);
+            rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
 
-        }
+            if (rc != NW_GTPV1U_OK) {
+              LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
+              MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
+                            enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+            } else {
+              MSC_LOG_TX_MESSAGE(
+                MSC_GTPU_ENB,
+                MSC_GTPU_SGW,
+                NULL,
+                0,
+                MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
+                0,0,
+                enb_s1u_teid,
+                tenb_x2u_teid,
+                data_req_p->length);
+            }
 
-        rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                               stack_req.apiInfo.sendtoInfo.hMsg);
+            rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
+                                   stack_req.apiInfo.sendtoInfo.hMsg);
 
-        if (rc != NW_GTPV1U_OK) {
-          LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
+            if (rc != NW_GTPV1U_OK) {
+              LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
+            }
+          }
         }
       }
-    }
-  }
 
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
-  /* Buffer still needed, do not free it */
-  //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer)
-  }
-  break;
-
-  case GTPV1U_ENB_END_MARKER_REQ:{
-    gtpv1u_enb_end_marker_req_t   *data_req_p           = NULL;
-    NwGtpv1uUlpApiT               stack_req;
-    NwGtpv1uRcT                   rc                    = NW_GTPV1U_FAILURE;
-    hashtable_rc_t                hash_rc               = HASH_TABLE_KEY_NOT_EXISTS;
-    gtpv1u_ue_data_t              *gtpv1u_ue_data_p     = NULL;
-    teid_t                        enb_s1u_teid          = 0;
-    teid_t                        tenb_x2u_teid         = 0;
-    NwGtpv1uMsgT		  *pMsg                 = NULL;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-    data_req_p = &GTPV1U_ENB_END_MARKER_REQ(received_message_p);
-    //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
+      /* Buffer still needed, do not free it */
+      //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer)
+    }
+    break;
 
+    case GTPV1U_ENB_END_MARKER_REQ: {
+      gtpv1u_enb_end_marker_req_t   *data_req_p           = NULL;
+      NwGtpv1uUlpApiT               stack_req;
+      NwGtpv1uRcT                   rc                    = NW_GTPV1U_FAILURE;
+      hashtable_rc_t                hash_rc               = HASH_TABLE_KEY_NOT_EXISTS;
+      gtpv1u_ue_data_t              *gtpv1u_ue_data_p     = NULL;
+      teid_t                        enb_s1u_teid          = 0;
+      teid_t                        tenb_x2u_teid         = 0;
+      NwGtpv1uMsgT      *pMsg                 = NULL;
+      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
+      data_req_p = &GTPV1U_ENB_END_MARKER_REQ(received_message_p);
+      //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
 #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-    gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
+      gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
 #endif
-    memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void**)&gtpv1u_ue_data_p);
+      memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
+      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
 
-    if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-      LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-    } else {
-      if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
-        enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
-        tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
-        stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-        stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
-        stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
-
-	rc = nwGtpv1uGpduMsgNew(
-               RC.gtpv1u_data_g->gtpv1u_stack,
-               tenb_x2u_teid,
-               NW_FALSE,
-               RC.gtpv1u_data_g->seq_num++,
-               data_req_p->buffer,
-               data_req_p->length,
-               data_req_p->offset,
-               &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-        if (rc != NW_GTPV1U_OK) {
-          LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-          MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-            		enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-          (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
-        } else {
-	  pMsg = (NwGtpv1uMsgT *) stack_req.apiInfo.sendtoInfo.hMsg;
-	  pMsg->msgType = NW_GTP_END_MARKER;
-          rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
+      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
+        LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
+      } else {
+        if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
+          enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
+          tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
+          stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
+          stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
+          stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
+          rc = nwGtpv1uGpduMsgNew(
+                 RC.gtpv1u_data_g->gtpv1u_stack,
+                 tenb_x2u_teid,
+                 NW_FALSE,
+                 RC.gtpv1u_data_g->seq_num++,
+                 data_req_p->buffer,
+                 data_req_p->length,
+                 data_req_p->offset,
+                 &(stack_req.apiInfo.sendtoInfo.hMsg));
 
           if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
+            LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
             MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-              		enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+                          enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+            (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
           } else {
-            MSC_LOG_TX_MESSAGE(
-            	        MSC_GTPU_ENB,
-            	        MSC_GTPU_SGW,
-            		NULL,
-            		0,
-            		MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-            		0,0,
-            		enb_s1u_teid,
-            		tenb_x2u_teid,
-            		data_req_p->length);
+            pMsg = (NwGtpv1uMsgT *) stack_req.apiInfo.sendtoInfo.hMsg;
+            pMsg->msgType = NW_GTP_END_MARKER;
+            rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
 
-          }
+            if (rc != NW_GTPV1U_OK) {
+              LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
+              MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
+                            enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
+            } else {
+              MSC_LOG_TX_MESSAGE(
+                MSC_GTPU_ENB,
+                MSC_GTPU_SGW,
+                NULL,
+                0,
+                MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
+                0,0,
+                enb_s1u_teid,
+                tenb_x2u_teid,
+                data_req_p->length);
+            }
 
-          rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                                 stack_req.apiInfo.sendtoInfo.hMsg);
+            rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
+                                   stack_req.apiInfo.sendtoInfo.hMsg);
 
-          if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-          }
+            if (rc != NW_GTPV1U_OK) {
+              LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
+            }
 
-          gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
-          memset(&delete_tunnel_req, 0 , sizeof(delete_tunnel_req));
-          delete_tunnel_req.rnti = data_req_p->rnti;
-	  gtpv1u_delete_x2u_tunnel(instance, &delete_tunnel_req, GTPV1U_SOURCE_ENB);
+            gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
+            memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
+            delete_tunnel_req.rnti = data_req_p->rnti;
+            gtpv1u_delete_x2u_tunnel(instance, &delete_tunnel_req, GTPV1U_SOURCE_ENB);
+          }
         }
-       }
       }
 
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c
index 282e7b5f60354cff5c80bfb2e6de7970be5e65dc..03e6273d1b4dbdce4d1bace082b9a221c3e83cd5 100644
--- a/openair3/S1AP/s1ap_eNB.c
+++ b/openair3/S1AP/s1ap_eNB.c
@@ -492,39 +492,6 @@ static int s1ap_eNB_generate_s1_setup_request(
   ie->value.choice.PagingDRX = instance_p->default_drx;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
-  /* optional */
-  if (0) {
-    ie = (S1AP_S1SetupRequestIEs_t *)calloc(1, sizeof(S1AP_S1SetupRequestIEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_CSG_IdList;
-    ie->criticality = S1AP_Criticality_reject;
-    ie->value.present = S1AP_S1SetupRequestIEs__value_PR_CSG_IdList;
-    // ie->value.choice.CSG_IdList = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-
-  /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(13, 0, 0))
-
-  if (0) {
-    ie = (S1AP_S1SetupRequestIEs_t *)calloc(1, sizeof(S1AP_S1SetupRequestIEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_UE_RetentionInformation;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_S1SetupRequestIEs__value_PR_UE_RetentionInformation;
-    // ie->value.choice.UE_RetentionInformation = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-
-  /* optional */
-  if (0) {
-    ie = (S1AP_S1SetupRequestIEs_t *)calloc(1, sizeof(S1AP_S1SetupRequestIEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_NB_IoT_DefaultPagingDRX;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_S1SetupRequestIEs__value_PR_NB_IoT_DefaultPagingDRX;
-    // ie->value.choice.NB_IoT_DefaultPagingDRX = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0)) */
 
   if (s1ap_eNB_encode_pdu(&pdu, &buffer, &len) < 0) {
     S1AP_ERROR("Failed to encode S1 setup request\n");
diff --git a/openair3/S1AP/s1ap_eNB_context_management_procedures.c b/openair3/S1AP/s1ap_eNB_context_management_procedures.c
index 6063eca2c3c02a1f23a4b28888764a6dfbccbfc7..374da7272fda4a43a770eb43b8587de6f01ef584 100644
--- a/openair3/S1AP/s1ap_eNB_context_management_procedures.c
+++ b/openair3/S1AP/s1ap_eNB_context_management_procedures.c
@@ -104,46 +104,6 @@ int s1ap_ue_context_release_complete(instance_t instance,
   ie->value.choice.ENB_UE_S1AP_ID = ue_release_complete_p->eNB_ue_s1ap_id;
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
-  /* optional */
-  if (0) {
-    ie = (S1AP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(S1AP_UEContextReleaseComplete_IEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_CriticalityDiagnostics;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_UEContextReleaseComplete_IEs__value_PR_CriticalityDiagnostics;
-    // ie->value.choice.CriticalityDiagnostics = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-
-  /* release 12, optional */
-#if (S1AP_VERSION >= MAKE_VERSION(12, 0, 0))
-  if (0) {
-    ie = (S1AP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(S1AP_UEContextReleaseComplete_IEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_UserLocationInformation;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_UEContextReleaseComplete_IEs__value_PR_UserLocationInformation;
-    // ie->value.choice.UserLocationInformation = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-
-  /* release 13, optional */
-#if (S1AP_VERSION >= MAKE_VERSION(13, 0, 0))
-  if (0) {
-    ie = (S1AP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(S1AP_UEContextReleaseComplete_IEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_InformationOnRecommendedCellsAndENBsForPaging;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_UEContextReleaseComplete_IEs__value_PR_InformationOnRecommendedCellsAndENBsForPaging;
-    // ie->value.choice.InformationOnRecommendedCellsAndENBsForPaging = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-
-    ie = (S1AP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(S1AP_UEContextReleaseComplete_IEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_CellIdentifierAndCELevelForCECapableUEs;
-    ie->criticality = S1AP_Criticality_ignore;
-    ie->value.present = S1AP_UEContextReleaseComplete_IEs__value_PR_CellIdentifierAndCELevelForCECapableUEs;
-    // ie->value.choice.CellIdentifierAndCELevelForCECapableUEs = ;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(13, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(12, 0, 0)) */
 
   if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
     /* Encode procedure has failed... */
@@ -278,17 +238,7 @@ int s1ap_ue_context_release_req(instance_t instance,
 
   ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
 
-  /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0))
-  if (0) {
-    ie = (S1AP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(S1AP_UEContextReleaseRequest_IEs_t));
-    ie->id = S1AP_ProtocolIE_ID_id_GWContextReleaseIndication;
-    ie->criticality = S1AP_Criticality_reject;
-    ie->value.present = S1AP_UEContextReleaseRequest_IEs__value_PR_GWContextReleaseIndication;
-    ie->value.choice.GWContextReleaseIndication = TRUE;
-    ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-  }
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0)) */
+
 
   if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
     /* Encode procedure has failed... */
diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c
index 4b50f1de8279f3cbbfea727ebc67239239484ea4..87abc1ede974206d84044a919937febd1e43d4e1 100644
--- a/openair3/S1AP/s1ap_eNB_handlers.c
+++ b/openair3/S1AP/s1ap_eNB_handlers.c
@@ -149,13 +149,11 @@ s1ap_message_decoded_callback messages_callback[][3] = {
   { 0, 0, 0 }, /* eNBConfigurationTransfer */
   { 0, 0, 0 }, /* MMEConfigurationTransfer */
   { 0, 0, 0 }, /* CellTrafficTrace */
-#if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0))
   { 0, 0, 0 }, /* Kill */
   { 0, 0, 0 }, /* DownlinkUEAssociatedLPPaTransport  */
   { 0, 0, 0 }, /* UplinkUEAssociatedLPPaTransport */
   { 0, 0, 0 }, /* DownlinkNonUEAssociatedLPPaTransport */
   { 0, 0, 0 }, /* UplinkNonUEAssociatedLPPaTransport */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
 };
 char *s1ap_direction2String(int s1ap_dir) {
   static char *s1ap_direction_String[] = {
@@ -592,12 +590,9 @@ int s1ap_eNB_handle_error_indication(uint32_t         assoc_id,
           case S1AP_CauseRadioNetwork_not_supported_QCI_value:
             S1AP_WARN("Received S1 Error indication S1AP_CauseRadioNetwork_not_supported_QCI_value\n");
             break;
-#if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0))
-
           case S1AP_CauseRadioNetwork_invalid_CSG_Id:
             S1AP_WARN("Received S1 Error indication S1AP_CauseRadioNetwork_invals1ap_id_CSG_Id\n");
             break;
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
 
           default:
             S1AP_WARN("Received S1 Error indication cause radio network case not handled\n");
@@ -638,12 +633,9 @@ int s1ap_eNB_handle_error_indication(uint32_t         assoc_id,
           case S1AP_CauseNas_unspecified:
             S1AP_WARN("Received S1 Error indication S1AP_CauseNas_unspecified\n");
             break;
-#if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0))
-
           case S1AP_CauseNas_csg_subscription_expiry:
             S1AP_WARN("Received S1 Error indication S1AP_CauseNas_csg_subscription_expiry\n");
             break;
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
 
           default:
             S1AP_WARN("Received S1 Error indication cause nas case not handled\n");
diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c
index bd0fd13208158aba2bcb1078f56a7f63eee7b154..b87bd7144a73e6de6a9f175a43c342c12d4e9ecf 100644
--- a/openair3/S1AP/s1ap_eNB_nas_procedures.c
+++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c
@@ -262,15 +262,6 @@ int s1ap_eNB_handle_nas_first_req(
         ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     }
 
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_CSG_Id;
-        ie->criticality = S1AP_Criticality_reject;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_CSG_Id;
-        // ie->value.choice.CSG_Id = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
 
     /* optional */
     if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_gummei) {
@@ -291,141 +282,7 @@ int s1ap_eNB_handle_nas_first_req(
         ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     }
 
-    /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0))
-
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_CellAccessMode;
-        ie->criticality = S1AP_Criticality_reject;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_CellAccessMode;
-        // ie->value.choice.CellAccessMode = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0))
-
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_GW_TransportLayerAddress;
-        ie->criticality = S1AP_Criticality_reject;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_TransportLayerAddress;
-        // ie->value.choice.TransportLayerAddress =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_RelayNode_Indicator;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_RelayNode_Indicator;
-        // ie->value.choice.RelayNode_Indicator =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
 
-#if (S1AP_VERSION >= MAKE_VERSION(11, 0, 0))
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_GUMMEIType;
-        ie->criticality = S1AP_Criticality_reject;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_GUMMEIType;
-        // ie->value.choice.GUMMEIType =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */ /* release 11 */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_Tunnel_Information_for_BBF;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_TunnelInformation;
-        // ie->value.choice.TunnelInformation =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_SIPTO_L_GW_TransportLayerAddress;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_TransportLayerAddress;
-        // ie->value.choice.TransportLayerAddress = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_LHN_ID;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_LHN_ID;
-        // ie->value.choice.LHN_ID = ue_release_req_p->eNB_ue_s1ap_id;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#if (S1AP_VERSION >= MAKE_VERSION(13, 0, 0))
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_MME_Group_ID;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_MME_Group_ID;
-        // ie->value.choice.MME_Group_ID =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_UE_Usage_Type;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_UE_Usage_Type;
-        // ie->value.choice.UE_Usage_Type =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_CE_mode_B_SupportIndicator;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_CE_mode_B_SupportIndicator;
-        // ie->value.choice.CE_mode_B_SupportIndicator = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0))
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_DCN_ID;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_DCN_ID;
-        // ie->value.choice.DCN_ID = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_InitialUEMessage_IEs_t *)calloc(1, sizeof(S1AP_InitialUEMessage_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_Coverage_Level;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_Coverage_Level;
-        // ie->value.choice.Coverage_Level = ue_release_req_p->eNB_ue_s1ap_id;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(13, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(11, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
 
     if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
         /* Failed to encode message */
@@ -659,41 +516,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
     TAC_TO_ASN1(s1ap_eNB_instance_p->tac, &ie->value.choice.TAI.tAC);
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0))
-
-    if (0) {
-        ie = (S1AP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(S1AP_UplinkNASTransport_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_GW_TransportLayerAddress;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_UplinkNASTransport_IEs__value_PR_TransportLayerAddress;
-        // ie->value.choice.TransportLayerAddress = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0))
 
-    if (0) {
-        ie = (S1AP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(S1AP_UplinkNASTransport_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_SIPTO_L_GW_TransportLayerAddress;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_UplinkNASTransport_IEs__value_PR_TransportLayerAddress;
-        // ie->value.choice.TransportLayerAddress = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-    /* optional */
-    if (0) {
-        ie = (S1AP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(S1AP_UplinkNASTransport_IEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_LHN_ID;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_UplinkNASTransport_IEs__value_PR_LHN_ID;
-        // ie->value.choice.LHN_ID =;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0)) */
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(10, 0, 0)) */
 
     if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
         S1AP_ERROR("Failed to encode uplink NAS transport\n");
@@ -1049,18 +872,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
     ie->value.choice.UERadioCapability.size = ue_cap_info_ind_p->ue_radio_cap.length;
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(12, 0, 0))
-
-    if (0) {
-        ie = (S1AP_UECapabilityInfoIndicationIEs_t *)calloc(1, sizeof(S1AP_UECapabilityInfoIndicationIEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_UERadioCapabilityForPaging;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_UECapabilityInfoIndicationIEs__value_PR_UERadioCapabilityForPaging;
-        // ie->value.choice.UERadioCapabilityForPaging = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0)) */
 
     if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
         /* Encode procedure has failed... */
@@ -1547,30 +1358,7 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance,
         ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
     }
 
-    /* optional */
-    if (0) {
-        ie = (S1AP_E_RABReleaseResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABReleaseResponseIEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_CriticalityDiagnostics;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_E_RABReleaseResponseIEs__value_PR_CriticalityDiagnostics;
-        // ie->value.choice.CriticalityDiagnostics = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
 
-    /* optional */
-#if (S1AP_VERSION >= MAKE_VERSION(12, 0, 0))
-
-    if(0) {
-        ie = (S1AP_E_RABReleaseResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABReleaseResponseIEs_t));
-        ie->id = S1AP_ProtocolIE_ID_id_UserLocationInformation;
-        ie->criticality = S1AP_Criticality_ignore;
-        ie->value.present = S1AP_E_RABReleaseResponseIEs__value_PR_UserLocationInformation;
-        // ie->value.choice.UserLocationInformation = ;
-        ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
-    }
-
-#endif /* #if (S1AP_VERSION >= MAKE_VERSION(14, 0, 0)) */
-    fprintf(stderr, "start encode\n");
 
     if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
         S1AP_ERROR("Failed to encode release response\n");
diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
index 6e6197c898bb024af5bda149acc58b613c9084b1..a608bbcc75d4a487155666876d8bc162004d72ca 100644
--- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
@@ -1141,6 +1141,7 @@ extern "C" {
       }
 
       s->usrp = uhd::usrp::multi_usrp::make(args);
+      device->priv = s;
 
       if (args.find("clock_source")==std::string::npos) {
 	LOG_I(HW, "Using clock_source == '%d'\n", openair0_cfg[0].clock_source);
@@ -1166,7 +1167,7 @@ extern "C" {
 
       if (s->usrp->get_clock_source(0) == "gpsdo") {
 	s->use_gps = 1;
-        if (sync_to_gps(device)) {
+        if (sync_to_gps(device)==EXIT_SUCCESS) {
           LOG_I(HW,"USRP synced with GPS!\n");
 	}
 	else {
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 6634ae51d29cbed9c1f477ab9f6a0e6e92cc82aa..b08f1a161129b57e1852da776d166616904077e1 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -29,7 +29,7 @@
  * \note
  * \warning
  */
- 
+
 /*! \function wakeup_txfh
  * \brief Implementation of creating multiple RU threads for beamforming emulation
  * \author TH Wang(Judy), TY Hsu, SY Yeh(fdragon)
@@ -149,9 +149,7 @@ void stop_eNB(int nb_inst);
 int wakeup_tx(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, int frame_tx, int subframe_tx, uint64_t timestamp_tx);
 int wakeup_txfh(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int frame_tx, int subframe_tx, uint64_t timestamp_tx);
 void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru, int frame, int subframe);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-  void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru, int frame, int subframe);
-#endif
+void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru, int frame, int subframe);
 
 
 extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
@@ -163,11 +161,9 @@ extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
 
 static inline int rxtx(PHY_VARS_eNB *eNB,
                        L1_rxtx_proc_t *proc,
-                       char *thread_name)
-{
+                       char *thread_name) {
   int ret;
   start_meas(&softmodem_stats_rxtx_sf);
-
   //L1_rxtx_proc_t *L1_proc_tx = &eNB->proc.L1_proc_tx;
   // *******************************************************************
 #if defined(PRE_SCD_THREAD)
@@ -201,7 +197,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
             NFAPI_SFNSF2DEC(eNB->UL_INFO.harq_ind.sfn_sf), eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs,
             NFAPI_SFNSF2DEC(eNB->UL_INFO.crc_ind.sfn_sf),  eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs,
             NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles,
-          eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis, 
+            eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis,
             proc->frame_rx, proc->subframe_rx,
             proc->frame_tx, proc->subframe_tx, eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols);
     }
@@ -219,15 +215,15 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
   // if this is IF5 or 3GPP_eNB
   if (eNB->RU_list && eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
     wakeup_prach_eNB(eNB,NULL,proc->frame_rx,proc->subframe_rx);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
-#endif
   }
+
   if (NFAPI_MODE!=NFAPI_MODE_PNF) {
     release_UE_in_freeList(eNB->Mod_id);
   } else {
     release_rnti_of_phy(eNB->Mod_id);
   }
+
   // UE-specific RX processing for subframe n
   if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
     phy_procedures_eNB_uespec_RX(eNB, proc);
@@ -244,9 +240,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
     //      memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
     memcpy(&pre_scd_eNB_UE_stats,&RC.mac[0]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
     memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
-
     AssertFatal((ret= pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd, return %d\n",ret);
-
     ru->proc.instance_pre_scd++;
 
     if (ru->proc.instance_pre_scd == 0) {
@@ -260,7 +254,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
     }
 
     AssertFatal((ret= pthread_mutex_unlock(&ru->proc.mutex_pre_scd))==0,"[eNB] error unlocking proc mutex for eNB pre scd, return %d\n",ret);
-
   }
 
 #endif
@@ -271,10 +264,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
   eNB->UL_INFO.CC_id     = eNB->CC_id;
   eNB->if_inst->UL_indication(&eNB->UL_INFO);
   AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret);
-
   /* this conflict resolution may be totally wrong, to be tested */
   /* CONFLICT RESOLUTION: BEGIN */
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, 0 );
 
   if(oai_exit) return(-1);
@@ -289,7 +280,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
   //if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) return(-1);
   /* CONFLICT RESOLUTION: END */
   stop_meas( &softmodem_stats_rxtx_sf );
-
   LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);
   LOG_D(PHY, "rxtx:%lld nfapi:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
         softmodem_stats_rxtx_sf.p_time, nfapi_meas.p_time,
@@ -298,7 +288,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
         TICK_TO_US(eNB->rx_prach),
         TICK_TO_US(eNB->ofdm_mod_stats)
        );
-
   LOG_D(PHY,
         "dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ",
         TICK_TO_US(eNB->dlsch_encoding_stats),
@@ -332,8 +321,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
 }
 
 
-static void *L1_thread_tx(void *param)
-{
+static void *L1_thread_tx(void *param) {
   L1_proc_t *eNB_proc  = (L1_proc_t *)param;
   L1_rxtx_proc_t *proc = &eNB_proc->L1_proc_tx;
   PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
@@ -346,6 +334,7 @@ static void *L1_thread_tx(void *param)
 
   while (!oai_exit) {
     LOG_D(PHY,"Waiting for TX (IC %d)\n",proc->instance_cnt);
+
     if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break;
 
     if (oai_exit) break;
@@ -364,16 +353,14 @@ static void *L1_thread_tx(void *param)
     phy_procedures_eNB_TX(eNB, proc, 1);
     AssertFatal((ret= pthread_mutex_lock( &proc->mutex ))==0,"error locking L1_proc_tx mutex, return %d\n",ret);
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC,proc->instance_cnt);
-
     int subframe_tx = proc->subframe_tx;
     int frame_tx    = proc->frame_tx;
     uint64_t timestamp_tx = proc->timestamp_tx;
-
     proc->instance_cnt = -1;
-
     LOG_D(PHY,"L1 TX signaling done for %d.%d\n",proc->frame_tx,proc->subframe_tx);
     // the thread can now be woken up
     LOG_D(PHY,"L1_thread_tx: signaling completion in %d.%d\n",proc->frame_tx,proc->subframe_tx);
+
     if (pthread_cond_signal(&proc->cond) != 0) {
       LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
       exit_fun( "ERROR pthread_cond_signal" );
@@ -392,10 +379,10 @@ static void *L1_thread_tx(void *param)
  * \param param is a \ref L1_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-static void *L1_thread( void *param )
-{
+static void *L1_thread( void *param ) {
   static int eNB_thread_rxtx_status;
   L1_rxtx_proc_t *proc;
+
   // Working
   if(NFAPI_MODE==NFAPI_MODE_VNF) {
     proc = (L1_rxtx_proc_t *)param;
@@ -418,8 +405,8 @@ static void *L1_thread( void *param )
   while (!oai_exit) {
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 );
     T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx));
-
     LOG_D(PHY,"L1RX waiting for RU RX\n");
+
     if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break;
 
     LOG_D(PHY,"L1RX starting in %d.%d\n",proc->frame_rx,proc->subframe_rx);
@@ -430,7 +417,6 @@ static void *L1_thread( void *param )
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB,proc->frame_tx);
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB,proc->frame_rx);
 
-  
     if (oai_exit) break;
 
     if (eNB->CC_id==0) {
@@ -438,8 +424,9 @@ static void *L1_thread( void *param )
     }
 
     LOG_D(PHY,"L1 RX %d.%d done\n",proc->frame_rx,proc->subframe_rx);
+
     if (NFAPI_MODE!=NFAPI_MODE_VNF) {
-      if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT)     wakeup_tx(eNB,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx); 
+      if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT)     wakeup_tx(eNB,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
       else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) {
         phy_procedures_eNB_TX(eNB, proc, 1);
         wakeup_txfh(eNB,proc,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
@@ -447,8 +434,6 @@ static void *L1_thread( void *param )
     }
 
     if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break;
-
-
   } // while !oai_exit
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 );
@@ -462,8 +447,7 @@ void eNB_top(PHY_VARS_eNB *eNB,
              int frame_rx,
              int subframe_rx,
              char *string,
-             RU_t *ru)
-{
+             RU_t *ru) {
   L1_proc_t *proc        = &eNB->proc;
   L1_rxtx_proc_t *L1_proc= &proc->L1_proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
@@ -480,7 +464,7 @@ void eNB_top(PHY_VARS_eNB *eNB,
     L1_proc->subframe_tx  = (L1_proc->subframe_rx + sf_ahead)%10;
 
     if (rxtx(eNB,L1_proc,string) < 0)
-    	LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
+      LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
 
     ru_proc->timestamp_tx = L1_proc->timestamp_tx;
     ru_proc->tti_tx  = L1_proc->subframe_tx;
@@ -493,45 +477,40 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
                 L1_rxtx_proc_t *proc,
                 int frame_tx,
                 int subframe_tx,
-                uint64_t timestamp_tx)
-{
+                uint64_t timestamp_tx) {
   RU_t *ru;
   RU_proc_t *ru_proc;
-  LTE_DL_FRAME_PARMS *fp; 
+  LTE_DL_FRAME_PARMS *fp;
   int waitret,ret;
-
   LOG_D(PHY,"L1 TX Waking up TX FH %d.%d (IC RU TX %d)\n",frame_tx,subframe_tx,proc->instance_cnt_RUs);
-
-  // grab the information for the RU due to the following wait 
-
+  // grab the information for the RU due to the following wait
   waitret=timedwait_on_condition(&proc->mutex_RUs,&proc->cond_RUs,&proc->instance_cnt_RUs,"wakeup_txfh",1000000);
-
-  AssertFatal(release_thread(&proc->mutex_RUs,&proc->instance_cnt_RUs,"wakeup_txfh")==0, "error releaseing eNB lock on RUs\n"); 
+  AssertFatal(release_thread(&proc->mutex_RUs,&proc->instance_cnt_RUs,"wakeup_txfh")==0, "error releaseing eNB lock on RUs\n");
 
   if (waitret == ETIMEDOUT) {
-     LOG_W(PHY,"Dropping TX slot (%d.%d) because FH is blocked more than 1 subframe times (1ms)\n",frame_tx,subframe_tx);
-
-     AssertFatal((ret=pthread_mutex_lock(&eNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
-     eNB->proc.RU_mask_tx = 0;
-     AssertFatal((ret=pthread_mutex_unlock(&eNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
-     AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret);
-     proc->instance_cnt_RUs = 0;
-     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,proc->instance_cnt_RUs);
-     AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs))==0,"mutex_unlock returns %d\n",ret);
-     return(-1);
-  } 
-
-  for(int ru_id=0; ru_id<eNB->num_RU; ru_id++){
+    LOG_W(PHY,"Dropping TX slot (%d.%d) because FH is blocked more than 1 subframe times (1ms)\n",frame_tx,subframe_tx);
+    AssertFatal((ret=pthread_mutex_lock(&eNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
+    eNB->proc.RU_mask_tx = 0;
+    AssertFatal((ret=pthread_mutex_unlock(&eNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
+    AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret);
+    proc->instance_cnt_RUs = 0;
+    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,proc->instance_cnt_RUs);
+    AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs))==0,"mutex_unlock returns %d\n",ret);
+    return(-1);
+  }
+
+  for(int ru_id=0; ru_id<eNB->num_RU; ru_id++) {
     ru      = eNB->RU_list[ru_id];
     ru_proc = &ru->proc;
     fp      = ru->frame_parms;
+
     if (((fp->frame_type == TDD) && (subframe_select(fp,proc->subframe_tx)==SF_UL))||
         (eNB->RU_list[ru_id]->state == RU_SYNC)||
-        (eNB->RU_list[ru_id]->wait_cnt>0)){
-       AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs))==0, "mutex_lock returns %d\n",ret);
-       proc->instance_cnt_RUs = 0;
-       AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs))==0, "mutex_unlock returns %d\n",ret);
-       continue;//hacking only works when all RU_tx works on the same subframe #TODO: adding mask stuff
+        (eNB->RU_list[ru_id]->wait_cnt>0)) {
+      AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs))==0, "mutex_lock returns %d\n",ret);
+      proc->instance_cnt_RUs = 0;
+      AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs))==0, "mutex_unlock returns %d\n",ret);
+      continue;//hacking only works when all RU_tx works on the same subframe #TODO: adding mask stuff
     }
 
     AssertFatal((ret = pthread_mutex_lock(&ru_proc->mutex_eNBs))==0,"ERROR pthread_mutex_lock failed on mutex_eNBs L1_thread_tx with ret=%d\n",ret);
@@ -549,13 +528,13 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
     ru_proc->timestamp_tx = timestamp_tx;
     ru_proc->tti_tx       = subframe_tx;
     ru_proc->frame_tx     = frame_tx;
-
     LOG_D(PHY,"L1 TX Waking up TX FH (2) %d.%d\n",frame_tx,subframe_tx);
     // the thread can now be woken up
     AssertFatal(pthread_cond_signal(&ru_proc->cond_eNBs) == 0,
-               "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
+                "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
     AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_eNBs))==0,"mutex_unlock returned %d\n",ret);
   }
+
   return(0);
 }
 
@@ -565,17 +544,12 @@ int wakeup_tx(PHY_VARS_eNB *eNB,
               int subframe_rx,
               int frame_tx,
               int subframe_tx,
-              uint64_t timestamp_tx)
-{
+              uint64_t timestamp_tx) {
   L1_rxtx_proc_t *L1_proc = &eNB->proc.L1_proc;
   L1_rxtx_proc_t *L1_proc_tx = &eNB->proc.L1_proc_tx;
-
   int ret;
-
   LOG_D(PHY,"ENTERED wakeup_tx (IC %d)\n",L1_proc_tx->instance_cnt);
-  
   AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret);
-
   LOG_D(PHY,"L1 RX %d.%d Waiting to wake up L1 TX %d.%d (IC L1TX %d)\n",L1_proc->frame_rx,L1_proc->subframe_rx,L1_proc->frame_tx,L1_proc->subframe_tx,L1_proc_tx->instance_cnt);
 
   while(L1_proc_tx->instance_cnt == 0) {
@@ -591,37 +565,31 @@ int wakeup_tx(PHY_VARS_eNB *eNB,
   L1_proc_tx->subframe_tx   = subframe_tx;
   L1_proc_tx->frame_tx      = frame_tx;
   L1_proc_tx->timestamp_tx  = timestamp_tx;
-
   // the thread can now be woken up
   LOG_D(PHY,"L1 RX Waking up L1 TX %d.%d\n",L1_proc->frame_tx,L1_proc->subframe_tx);
   AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for eNB L1 thread tx\n");
-
   AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret);
   return(0);
 }
 
 
 int wakeup_rxtx(PHY_VARS_eNB *eNB,
-		        RU_t *ru)
-{
+                RU_t *ru) {
   L1_proc_t *proc   =&eNB->proc;
   RU_proc_t *ru_proc=&ru->proc;
   L1_rxtx_proc_t *L1_proc=&proc->L1_proc;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   int ret;
-
   LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
-
   // wake up TX for subframe n+sl_ahead
   // lock the TX mutex and make sure the thread is ready
   AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);
 
   if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe
-   AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
-   LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
-   return(0);
+    AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
+    LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
+    return(0);
   }
- 
 
   ++L1_proc->instance_cnt;
   // We have just received and processed the common part of a subframe, say n.
@@ -635,9 +603,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
   L1_proc->subframe_rx  = ru_proc->tti_rx;
   L1_proc->frame_tx     = (L1_proc->subframe_rx > (9-sf_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
   L1_proc->subframe_tx  = (L1_proc->subframe_rx + sf_ahead)%10;
-
   LOG_D(PHY,"wakeup_rxtx: L1_proc->subframe_rx %d, L1_proc->subframe_tx %d, RU %d\n",L1_proc->subframe_rx,L1_proc->subframe_tx,ru->idx);
-
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_RX_RU+ru->idx, L1_proc->frame_rx);
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_RX_RU+ru->idx, L1_proc->subframe_rx);
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->frame_tx);
@@ -651,7 +617,6 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
   }
 
   AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
-
   return(0);
 }
 
@@ -659,22 +624,21 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
 void wakeup_prach_eNB(PHY_VARS_eNB *eNB,
                       RU_t *ru,
                       int frame,
-                      int subframe)
-{
+                      int subframe) {
   L1_proc_t *proc = &eNB->proc;
   LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
   int i,ret;
 
   if (ru!=NULL) {
-
     AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU_PRACH))==0,"mutex_lock return %d\n",ret);
+
     for (i=0; i<eNB->num_RU; i++) {
-    	if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
-        	LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU);
-		proc->RU_mask_prach |= (1<<i);
-        } else if (eNB->RU_list[i]->state == RU_SYNC || eNB->RU_list[i]->wait_cnt > 0) {
-	        proc->RU_mask_prach |= (1<<i);
-      	}
+      if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
+        LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU);
+        proc->RU_mask_prach |= (1<<i);
+      } else if (eNB->RU_list[i]->state == RU_SYNC || eNB->RU_list[i]->wait_cnt > 0) {
+        proc->RU_mask_prach |= (1<<i);
+      }
     }
 
     if (proc->RU_mask_prach != (1<<eNB->num_RU)-1) {  // not all RUs have provided their information so return
@@ -697,7 +661,6 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,
 
     // wake up thread for PRACH RX
     AssertFatal((ret=pthread_mutex_lock(&proc->mutex_prach))==0,"[eNB] ERROR pthread_mutex_lock for eNB PRACH thread %d (IC %d)\n", proc->thread_index, proc->instance_cnt_prach);
-
     ++proc->instance_cnt_prach;
     // set timing for prach thread
     proc->frame_prach = frame;
@@ -715,12 +678,11 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,
 }
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,
                          RU_t *ru,
                          int frame,
-                         int subframe)
-{
+                         int subframe) {
   L1_proc_t *proc = &eNB->proc;
   LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
   int i,ret;
@@ -760,7 +722,6 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,
 
     // wake up thread for PRACH RX
     AssertFatal((ret=pthread_mutex_lock(&proc->mutex_prach_br))==0,"[eNB] ERROR pthread_mutex_lock for eNB PRACH thread %d (IC %d)\n", proc->thread_index, proc->instance_cnt_prach_br);
-
     ++proc->instance_cnt_prach_br;
     // set timing for prach thread
     proc->frame_prach_br = frame;
@@ -776,7 +737,6 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,
     AssertFatal((ret=pthread_mutex_unlock( &proc->mutex_prach_br))==0,"mutex_unlock return %d\n",ret);
   }
 }
-#endif
 
 
 /*!
@@ -784,8 +744,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,
  * \param param is a \ref L1_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-static void *eNB_thread_prach( void *param )
-{
+static void *eNB_thread_prach( void *param ) {
   static int eNB_thread_prach_status;
   PHY_VARS_eNB *eNB= (PHY_VARS_eNB *)param;
   L1_proc_t *proc = &eNB->proc;
@@ -801,11 +760,7 @@ static void *eNB_thread_prach( void *param )
     if (oai_exit) break;
 
     LOG_D(PHY,"Running eNB prach procedures\n");
-    prach_procedures(eNB
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-                     ,0
-#endif
-                    );
+    prach_procedures(eNB,0 );
 
     if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break;
   }
@@ -816,14 +771,13 @@ static void *eNB_thread_prach( void *param )
 }
 
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 /*!
  * \brief The prach receive thread of eNB for BL/CE UEs.
  * \param param is a \ref L1_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-static void *eNB_thread_prach_br( void *param )
-{
+static void *eNB_thread_prach_br( void *param ) {
   static int eNB_thread_prach_status;
   PHY_VARS_eNB *eNB= (PHY_VARS_eNB *)param;
   L1_proc_t *proc = &eNB->proc;
@@ -846,7 +800,6 @@ static void *eNB_thread_prach_br( void *param )
   eNB_thread_prach_status = 0;
   return &eNB_thread_prach_status;
 }
-#endif
 
 
 extern void init_td_thread(PHY_VARS_eNB *);
@@ -855,8 +808,7 @@ extern void kill_td_thread(PHY_VARS_eNB *);
 extern void kill_te_thread(PHY_VARS_eNB *);
 
 
-static void *process_stats_thread(void *param)
-{
+static void *process_stats_thread(void *param) {
   PHY_VARS_eNB     *eNB      = (PHY_VARS_eNB *)param;
   wait_sync("process_stats_thread");
 
@@ -889,17 +841,14 @@ static void *process_stats_thread(void *param)
 }
 
 
-void init_eNB_proc(int inst)
-{
+void init_eNB_proc(int inst) {
   /*int i=0;*/
   int CC_id;
   PHY_VARS_eNB *eNB;
   L1_proc_t *proc;
   L1_rxtx_proc_t *L1_proc, *L1_proc_tx;
   pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_prach=NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   pthread_attr_t *attr_prach_br=NULL;
-#endif
   LOG_I(PHY,"%s(inst:%d) RC.nb_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_CC[inst]);
 
   for (CC_id=0; CC_id<RC.nb_CC[inst]; CC_id++) {
@@ -921,7 +870,7 @@ void init_eNB_proc(int inst)
     proc->first_rx                 =1;
     proc->first_tx                 =1;
     proc->RU_mask_tx               = (1<<eNB->num_RU)-1;
-    memset((void*)proc->RU_mask,0,10*sizeof(proc->RU_mask[0]));
+    memset((void *)proc->RU_mask,0,10*sizeof(proc->RU_mask[0]));
     proc->RU_mask_prach            =0;
     pthread_mutex_init( &eNB->UL_INFO_mutex, NULL);
     pthread_mutex_init( &L1_proc->mutex, NULL);
@@ -943,21 +892,17 @@ void init_eNB_proc(int inst)
     pthread_attr_init( &proc->attr_asynch_rxtx);
     pthread_attr_init( &L1_proc->attr);
     pthread_attr_init( &L1_proc_tx->attr);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     proc->instance_cnt_prach_br    = -1;
     proc->RU_mask_prach_br=0;
     pthread_mutex_init( &proc->mutex_prach_br, NULL);
     pthread_mutex_init( &proc->mutex_RU_PRACH_br,NULL);
     pthread_cond_init( &proc->cond_prach_br, NULL);
     pthread_attr_init( &proc->attr_prach_br);
-#endif
 #ifndef DEADLINE_SCHEDULER
     attr0       = &L1_proc->attr;
     attr1       = &L1_proc_tx->attr;
     attr_prach  = &proc->attr_prach;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     attr_prach_br  = &proc->attr_prach_br;
-#endif
     //    attr_td     = &proc->attr_td;
     //    attr_te     = &proc->attr_te;
 #endif
@@ -984,10 +929,9 @@ void init_eNB_proc(int inst)
 
     if (NFAPI_MODE!=NFAPI_MODE_VNF) {
       pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
       pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB );
-#endif
     }
+
     AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach);
 
     if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void *)eNB);
@@ -1019,8 +963,7 @@ void init_eNB_proc(int inst)
 /*!
  * \brief Terminate eNB TX and RX threads.
  */
-void kill_eNB_proc(int inst)
-{
+void kill_eNB_proc(int inst) {
   int *status;
   PHY_VARS_eNB *eNB;
   L1_proc_t *proc;
@@ -1062,13 +1005,11 @@ void kill_eNB_proc(int inst)
     LOG_I(PHY, "Destroying prach mutex/cond\n");
     pthread_mutex_destroy( &proc->mutex_prach);
     pthread_cond_destroy( &proc->cond_prach );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     proc->instance_cnt_prach_br = 0;
     pthread_cond_signal( &proc->cond_prach_br );
     pthread_join( proc->pthread_prach_br, (void **)&status );
     pthread_mutex_destroy( &proc->mutex_prach_br);
     pthread_cond_destroy( &proc->cond_prach_br );
-#endif
     LOG_I(PHY, "Destroying UL_INFO mutex\n");
     pthread_mutex_destroy(&eNB->UL_INFO_mutex);
 
@@ -1093,16 +1034,13 @@ void kill_eNB_proc(int inst)
     pthread_attr_destroy(&proc->attr_asynch_rxtx);
     pthread_attr_destroy(&L1_proc->attr);
     pthread_attr_destroy(&L1_proc_tx->attr);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     pthread_mutex_destroy(&proc->mutex_RU_PRACH_br);
     pthread_attr_destroy(&proc->attr_prach_br);
-#endif
   }
 }
 
 
-void reset_opp_meas(void)
-{
+void reset_opp_meas(void) {
   int sfn;
   reset_meas(&softmodem_stats_mt);
   reset_meas(&softmodem_stats_hw);
@@ -1114,8 +1052,7 @@ void reset_opp_meas(void)
 }
 
 
-void print_opp_meas(void)
-{
+void print_opp_meas(void) {
   int sfn=0;
   print_meas(&softmodem_stats_mt, "Main ENB Thread", NULL, NULL);
   print_meas(&softmodem_stats_hw, "HW Acquisation", NULL, NULL);
@@ -1127,8 +1064,7 @@ void print_opp_meas(void)
 }
 
 
-void free_transport(PHY_VARS_eNB *eNB)
-{
+void free_transport(PHY_VARS_eNB *eNB) {
   for (int i=0; i<NUMBER_OF_UE_MAX; i++) {
     LOG_D(PHY, "Freeing Transport Channel Buffers for DLSCH, UE %d\n",i);
 
@@ -1142,57 +1078,57 @@ void free_transport(PHY_VARS_eNB *eNB)
 }
 
 
-void init_transport(PHY_VARS_eNB *eNB)
-{
+void init_transport(PHY_VARS_eNB *eNB) {
   int i;
   int j;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   LOG_I(PHY, "Initialise transport\n");
 
-if (NFAPI_MODE!=NFAPI_MODE_VNF) {
-  for (i=0; i<NUMBER_OF_UE_MAX; i++) {
-    LOG_D(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
+  if (NFAPI_MODE!=NFAPI_MODE_VNF) {
+    for (i=0; i<NUMBER_OF_UE_MAX; i++) {
+      LOG_D(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
+
+      for (j=0; j<2; j++) {
+        eNB->dlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL,0,fp);
+
+        if (!eNB->dlsch[i][j]) {
+          LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
+          exit(-1);
+        } else {
+          eNB->dlsch[i][j]->rnti=0;
+          LOG_D(PHY,"dlsch[%d][%d] => %p rnti:%d\n",i,j,eNB->dlsch[i][j], eNB->dlsch[i][j]->rnti);
+        }
+      }
 
-    for (j=0; j<2; j++) {
-      eNB->dlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL,0,fp);
+      LOG_D(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n",i);
+      eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,fp->N_RB_UL, 0);
 
-      if (!eNB->dlsch[i][j]) {
-        LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
+      if (!eNB->ulsch[1+i]) {
+        LOG_E(PHY,"Can't get eNB ulsch structures\n");
         exit(-1);
-      } else {
-        eNB->dlsch[i][j]->rnti=0;
-        LOG_D(PHY,"dlsch[%d][%d] => %p rnti:%d\n",i,j,eNB->dlsch[i][j], eNB->dlsch[i][j]->rnti);
       }
+
+      // this is the transmission mode for the signalling channels
+      // this will be overwritten with the real transmission mode by the RRC once the UE is connected
+      eNB->transmission_mode[i] = fp->nb_antenna_ports_eNB==1 ? 1 : 2;
     }
 
-    LOG_D(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n",i);
-    eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,fp->N_RB_UL, 0);
+    // ULSCH for RA
+    eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, fp->N_RB_UL, 0);
 
-    if (!eNB->ulsch[1+i]) {
+    if (!eNB->ulsch[0]) {
       LOG_E(PHY,"Can't get eNB ulsch structures\n");
       exit(-1);
     }
 
-    // this is the transmission mode for the signalling channels
-    // this will be overwritten with the real transmission mode by the RRC once the UE is connected
-    eNB->transmission_mode[i] = fp->nb_antenna_ports_eNB==1 ? 1 : 2;
-  }
-
-  // ULSCH for RA
-  eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, fp->N_RB_UL, 0);
-
-  if (!eNB->ulsch[0]) {
-    LOG_E(PHY,"Can't get eNB ulsch structures\n");
-    exit(-1);
+    eNB->dlsch_SI  = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
+    LOG_D(PHY,"eNB %d.%d : SI %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_SI);
+    eNB->dlsch_ra  = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
+    LOG_D(PHY,"eNB %d.%d : RA %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_ra);
+    eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
+    LOG_D(PHY,"eNB %d.%d : MCH %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_MCH);
   }
 
-  eNB->dlsch_SI  = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
-  LOG_D(PHY,"eNB %d.%d : SI %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_SI);
-  eNB->dlsch_ra  = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
-  LOG_D(PHY,"eNB %d.%d : RA %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_ra);
-  eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
-  LOG_D(PHY,"eNB %d.%d : MCH %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_MCH);
-}
   eNB->rx_total_gain_dB=130;
 
   for(i=0; i<NUMBER_OF_UE_MAX; i++)
@@ -1206,8 +1142,7 @@ if (NFAPI_MODE!=NFAPI_MODE_VNF) {
 }
 
 
-void init_eNB_afterRU(void)
-{
+void init_eNB_afterRU(void) {
   int inst,CC_id,ru_id,i,aa;
   PHY_VARS_eNB *eNB;
   LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst);
@@ -1227,14 +1162,12 @@ void init_eNB_afterRU(void)
       eNB->frame_parms.nb_antennas_rx       = 0;
       LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]);
       eNB->prach_vars.rxsigF[0] = (int16_t **)malloc16(64*sizeof(int16_t *));
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
       for (int ce_level=0; ce_level<4; ce_level++) {
         LOG_I(PHY,"Overwriting eNB->prach_vars_br.rxsigF.rxsigF[0]:%p\n", eNB->prach_vars_br.rxsigF[ce_level]);
         eNB->prach_vars_br.rxsigF[ce_level] = (int16_t **)malloc16(64*sizeof(int16_t *));
       }
 
-#endif
       LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);
 
       for (ru_id=0,aa=0; ru_id<eNB->num_RU; ru_id++) {
@@ -1249,12 +1182,10 @@ void init_eNB_afterRU(void)
         for (i=0; i<eNB->RU_list[ru_id]->nb_rx; aa++,i++) {
           LOG_I(PHY,"Attaching RU %d antenna %d to eNB antenna %d\n",eNB->RU_list[ru_id]->idx,i,aa);
           eNB->prach_vars.rxsigF[0][aa]    =  eNB->RU_list[ru_id]->prach_rxsigF[i];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 
           for (int ce_level=0; ce_level<4; ce_level++)
             eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[ru_id]->prach_rxsigF_br[ce_level][i];
 
-#endif
           eNB->common_vars.rxdataF[aa]     =  eNB->RU_list[ru_id]->common.rxdataF[i];
         }
       }
@@ -1291,17 +1222,14 @@ void init_eNB_afterRU(void)
     AssertFatal(RC.ru[ru_id]!=NULL,"ru_id %d is null\n",ru_id);
     RC.ru[ru_id]->wakeup_rxtx         = wakeup_rxtx;
     RC.ru[ru_id]->wakeup_prach_eNB    = wakeup_prach_eNB;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     RC.ru[ru_id]->wakeup_prach_eNB_br = wakeup_prach_eNB_br;
-#endif
     RC.ru[ru_id]->eNB_top             = eNB_top;
   }
 }
 
 
 void init_eNB(int single_thread_flag,
-              int wait_for_sync)
-{
+              int wait_for_sync) {
   int CC_id;
   int inst;
   PHY_VARS_eNB *eNB;
@@ -1345,8 +1273,7 @@ void init_eNB(int single_thread_flag,
 }
 
 
-void stop_eNB(int nb_inst)
-{
+void stop_eNB(int nb_inst) {
   for (int inst=0; inst<nb_inst; inst++) {
     LOG_I(PHY,"Killing eNB %d processing threads\n",inst);
     kill_eNB_proc(inst);
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 569167296efd7e8e3e7c8f66db012c21ab3c2f92..81c68ad92ee3b7ec8b4b1b495f61827923bb8c11 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -141,6 +141,7 @@ extern uint16_t sf_ahead;
 // southbound IF5 fronthaul for 16-bit OAI format
 static inline void fh_if5_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) {
   if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
+
   send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_RRH_GW_DL);
 }
 
@@ -148,7 +149,8 @@ static inline void fh_if5_south_out(RU_t *ru,int frame, int subframe, uint64_t t
 // southbound IF5 fronthaul for Mobipass packet format
 static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) {
   if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
-  send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_MOBIPASS); 
+
+  send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_MOBIPASS);
 }
 
 
@@ -156,19 +158,21 @@ static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame, int subframe, u
 static inline void fh_if4p5_south_out(RU_t *ru,
                                       int frame,
                                       int subframe,
-                                      uint64_t timestamp)
-{
+                                      uint64_t timestamp) {
   if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
+
   LOG_D(PHY,"ENTERED fh_if4p5_south_out   Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
+
   if (subframe_select(ru->frame_parms,subframe)!=SF_UL) {
     send_IF4p5(ru,frame, subframe, IF4p5_PDLFFT);
     ru->south_out_cnt++;
     LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
   }
-/*if (ru == RC.ru[0] || ru == RC.ru[1]) {
-    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU+ru->idx, ru->proc.frame_tx );
-    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU+ru->idx, ru->proc.subframe_tx );
-  }*/
+
+  /*if (ru == RC.ru[0] || ru == RC.ru[1]) {
+      VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU+ru->idx, ru->proc.frame_tx );
+      VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU+ru->idx, ru->proc.subframe_tx );
+    }*/
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_OUT_RU+ru->idx, ru->proc.frame_tx);
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_SOUTH_OUT_RU+ru->idx, ru->proc.tti_tx);
 }
@@ -179,17 +183,16 @@ static inline void fh_if4p5_south_out(RU_t *ru,
 
 // Synchronous if5 from south
 void fh_if5_south_in(RU_t *ru,
-		             int *frame,
-					 int *subframe)
-{
+                     int *frame,
+                     int *subframe) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_proc_t *proc = &ru->proc;
   recv_IF5(ru, &proc->timestamp_rx, *subframe, IF5_RRH_GW_UL);
   proc->frame_rx    = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
   proc->tti_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
-  
+
   if (proc->first_rx == 0) {
-    if (proc->tti_rx != *subframe){
+    if (proc->tti_rx != *subframe) {
       LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d)\n",proc->tti_rx,*subframe);
       exit_fun("Exiting");
     }
@@ -201,18 +204,17 @@ void fh_if5_south_in(RU_t *ru,
   } else {
     proc->first_rx = 0;
     *frame = proc->frame_rx;
-    *subframe = proc->tti_rx;        
-  }      
-  
+    *subframe = proc->tti_rx;
+  }
+
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
 }
 
 
 // Synchronous if4p5 from south
 void fh_if4p5_south_in(RU_t *ru,
-		               int *frame,
-					   int *subframe)
-{
+                       int *frame,
+                       int *subframe) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_proc_t *proc = &ru->proc;
   int f,sf;
@@ -221,45 +223,51 @@ void fh_if4p5_south_in(RU_t *ru,
   uint32_t symbol_mask_full;
   int pultick_received=0;
 
-  if ((fp->frame_type == TDD) && (subframe_select(fp,*subframe)==SF_S))  
-    symbol_mask_full = (1<<fp->ul_symbols_in_S_subframe)-1;   
-  else     
-    symbol_mask_full = (1<<fp->symbols_per_tti)-1; 
+  if ((fp->frame_type == TDD) && (subframe_select(fp,*subframe)==SF_S))
+    symbol_mask_full = (1<<fp->ul_symbols_in_S_subframe)-1;
+  else
+    symbol_mask_full = (1<<fp->symbols_per_tti)-1;
+
   LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, ru %d, mask %x\n",ru->idx,*frame,*subframe,ru->idx,proc->symbol_mask[*subframe]);
   AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]==symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]);
-  if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished 
-     do {
-       recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
-	 LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
-       if (oai_exit == 1 || ru->cmd== STOP_RU) break;
-       if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
-       else if (packet_type == IF4p5_PULTICK) {           
-         proc->symbol_mask[sf] = symbol_mask_full;
-         pultick_received++;
-/*
-         if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx);       
-         else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx);       
-         else break; */
-         if (f==*frame || sf==*subframe) break;
-       } else if (packet_type == IF4p5_PRACH) {
-      // nothing in RU for RAU
-       }
-       LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
-     } while(proc->symbol_mask[sf] != symbol_mask_full);    
-  }
-  else {
-   f = *frame;
-   sf = *subframe;
+
+  if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished
+    do {
+      recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
+      LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
+
+      if (oai_exit == 1 || ru->cmd== STOP_RU) break;
+
+      if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
+      else if (packet_type == IF4p5_PULTICK) {
+        proc->symbol_mask[sf] = symbol_mask_full;
+        pultick_received++;
+
+        /*
+                 if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx);
+                 else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx);
+                 else break; */
+        if (f==*frame || sf==*subframe) break;
+      } else if (packet_type == IF4p5_PRACH) {
+        // nothing in RU for RAU
+      }
+
+      LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
+    } while(proc->symbol_mask[sf] != symbol_mask_full);
+  } else {
+    f = *frame;
+    sf = *subframe;
   }
 
   //calculate timestamp_rx, timestamp_tx based on frame and subframe
   proc->tti_rx  = sf;
   proc->frame_rx= f;
   proc->timestamp_rx = ((proc->frame_rx * 10)  + proc->tti_rx ) * fp->samples_per_tti ;
+
   //  proc->timestamp_tx = proc->timestamp_rx +  (4*fp->samples_per_tti);
   if (get_nprocs()<=4) {
-     proc->tti_tx  = (sf+sf_ahead)%10;
-     proc->frame_tx= (sf>(9-sf_ahead)) ? (f+1)&1023 : f;
+    proc->tti_tx  = (sf+sf_ahead)%10;
+    proc->frame_tx= (sf>(9-sf_ahead)) ? (f+1)&1023 : f;
   }
 
   LOG_D(PHY,"Setting proc for (%d,%d)\n",sf,f);
@@ -267,23 +275,23 @@ void fh_if4p5_south_in(RU_t *ru,
   if (proc->first_rx == 0) {
     if (proc->tti_rx != *subframe) {
       LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d, symbol_mask %x)\n",
-    		  proc->tti_rx,*subframe,proc->symbol_mask[*subframe]);
-      *subframe=sf; 
+            proc->tti_rx,*subframe,proc->symbol_mask[*subframe]);
+      *subframe=sf;
       //exit_fun("Exiting");
     }
+
     if (ru->cmd != WAIT_RESYNCH && proc->frame_rx != *frame) {
       LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d,symbol_mask %x\n",
-    		  proc->frame_rx,*frame,proc->symbol_mask[*subframe]);
+            proc->frame_rx,*frame,proc->symbol_mask[*subframe]);
       //exit_fun("Exiting");
-    }
-    else if (ru->cmd == WAIT_RESYNCH && proc->frame_rx != *frame){
-       ru->cmd=EMPTY;
-       *frame=proc->frame_rx; 
+    } else if (ru->cmd == WAIT_RESYNCH && proc->frame_rx != *frame) {
+      ru->cmd=EMPTY;
+      *frame=proc->frame_rx;
     }
   } else {
     proc->first_rx = 0;
     *frame = proc->frame_rx;
-    *subframe = proc->tti_rx;        
+    *subframe = proc->tti_rx;
   }
 
   /*if (ru == RC.ru[0] || ru == RC.ru[1]) {
@@ -294,10 +302,8 @@ void fh_if4p5_south_in(RU_t *ru,
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
   }*/
-
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_IN_RU   +ru->idx,f );
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,sf);
-
   proc->symbol_mask[sf] = 0;
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff);
   LOG_D(PHY,"RU %d: fh_if4p5_south_in returning ...\n",ru->idx);
@@ -307,9 +313,8 @@ void fh_if4p5_south_in(RU_t *ru,
 
 // Dummy FH from south for getting synchronization from master RU
 void fh_slave_south_in(RU_t *ru,
-		               int *frame,
-					   int *subframe)
-{
+                       int *frame,
+                       int *subframe) {
   // This case is for synchronization to another thread
   // it just waits for an external event.  The actual rx_fh is handle by the asynchronous RX thread
   RU_proc_t *proc=&ru->proc;
@@ -323,9 +328,8 @@ void fh_slave_south_in(RU_t *ru,
 
 // asynchronous inbound if5 fronthaul from south (Mobipass)
 void fh_if5_south_asynch_in_mobipass(RU_t *ru,
-		                             int *frame,
-									 int *subframe)
-{
+                                     int *frame,
+                                     int *subframe) {
   RU_proc_t *proc        = &ru->proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   recv_IF5(ru, &proc->timestamp_rx, *subframe, IF5_MOBIPASS);
@@ -334,19 +338,18 @@ void fh_if5_south_asynch_in_mobipass(RU_t *ru,
   pthread_mutex_lock(&proc->mutex_asynch_rxtx);
   proc->tti_rx = ((proc->timestamp_rx-offset_mobipass)/fp->samples_per_tti)%10;
   proc->frame_rx    = ((proc->timestamp_rx-offset_mobipass)/(fp->samples_per_tti*10))&1023;
-
   proc->tti_rx = (proc->timestamp_rx/fp->samples_per_tti)%10;
   proc->frame_rx    = (proc->timestamp_rx/(10*fp->samples_per_tti))&1023;
 
   if (proc->first_rx == 1) {
     proc->first_rx =2;
     *subframe = proc->tti_rx;
-    *frame    = proc->frame_rx; 
+    *frame    = proc->frame_rx;
     LOG_E(PHY,"[Mobipass]timestamp_rx:%llu, frame_rx %d, subframe: %d\n",(unsigned long long int)proc->timestamp_rx,proc->frame_rx,proc->tti_rx);
   } else {
     if (proc->tti_rx != *subframe) {
-        proc->first_rx++;
-        LOG_E(PHY,"[Mobipass]timestamp:%llu, tti_rx %d is not what we expect %d, first_rx:%d\n",(unsigned long long int)proc->timestamp_rx, proc->tti_rx,*subframe, proc->first_rx);
+      proc->first_rx++;
+      LOG_E(PHY,"[Mobipass]timestamp:%llu, tti_rx %d is not what we expect %d, first_rx:%d\n",(unsigned long long int)proc->timestamp_rx, proc->tti_rx,*subframe, proc->first_rx);
       //exit_fun("Exiting");
     }
 
@@ -357,8 +360,8 @@ void fh_if5_south_asynch_in_mobipass(RU_t *ru,
     }
 
     // temporary solution
-      *subframe = proc->tti_rx;
-      *frame    = proc->frame_rx;
+    *subframe = proc->tti_rx;
+    *frame    = proc->frame_rx;
   }
 
   pthread_mutex_unlock(&proc->mutex_asynch_rxtx);
@@ -367,9 +370,8 @@ void fh_if5_south_asynch_in_mobipass(RU_t *ru,
 
 // asynchronous inbound if4p5 fronthaul from south
 void fh_if4p5_south_asynch_in(RU_t *ru,
-		                      int *frame,
-							  int *subframe)
-{
+                              int *frame,
+                              int *subframe) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_proc_t *proc        = &ru->proc;
   uint16_t packet_type;
@@ -380,9 +382,10 @@ void fh_if4p5_south_asynch_in(RU_t *ru,
   prach_rx      = 0;
 
   do {   // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!!
-	recv_IF4p5(ru, &proc->frame_rx, &proc->tti_rx, &packet_type, &symbol_number);
+    recv_IF4p5(ru, &proc->frame_rx, &proc->tti_rx, &packet_type, &symbol_number);
 
     if (ru->cmd == STOP_RU) break;
+
     // grab first prach information for this new subframe
     if (got_prach_info==0) {
       prach_rx       = is_prach_subframe(fp, proc->frame_rx, proc->tti_rx);
@@ -400,21 +403,17 @@ void fh_if4p5_south_asynch_in(RU_t *ru,
       }
 
       if (proc->tti_rx != *subframe) {
-	LOG_E(PHY,"tti_rx %d is not what we expect %d\n",proc->tti_rx,*subframe);
-	exit_fun("Exiting");
+        LOG_E(PHY,"tti_rx %d is not what we expect %d\n",proc->tti_rx,*subframe);
+        exit_fun("Exiting");
       }
     }
 
     if      (packet_type == IF4p5_PULFFT)       symbol_mask &= (~(1<<symbol_number));
     else if (packet_type == IF4p5_PRACH)        prach_rx    &= (~0x1);
-
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     else if (packet_type == IF4p5_PRACH_BR_CE0) prach_rx    &= (~0x2);
     else if (packet_type == IF4p5_PRACH_BR_CE1) prach_rx    &= (~0x4);
     else if (packet_type == IF4p5_PRACH_BR_CE2) prach_rx    &= (~0x8);
     else if (packet_type == IF4p5_PRACH_BR_CE3) prach_rx    &= (~0x10);
-
-#endif
   } while( (symbol_mask > 0) || (prach_rx >0));   // haven't received all PUSCH symbols and PRACH information
 }
 
@@ -426,9 +425,8 @@ void fh_if4p5_south_asynch_in(RU_t *ru,
 // RRU IF4p5 TX fronthaul receiver. Assumes an if_device on input and if or rf device on output
 // receives one subframe's worth of IF4p5 OFDM symbols and OFDM modulates
 void fh_if4p5_north_in(RU_t *ru,
-		               int *frame,
-					   int *subframe)
-{
+                       int *frame,
+                       int *subframe) {
   uint32_t symbol_number=0;
   uint32_t symbol_mask, symbol_mask_full;
   uint16_t packet_type;
@@ -438,12 +436,13 @@ void fh_if4p5_north_in(RU_t *ru,
   symbol_mask_full = (1<<ru->frame_parms->symbols_per_tti)-1;
   LOG_D(PHY,"fh_if4p5_north_in: frame %d, subframe %d\n",*frame,*subframe);
 
-  do { 
+  do {
     recv_IF4p5(ru, frame, subframe, &packet_type, &symbol_number);
     symbol_mask = symbol_mask | (1<<symbol_number);
-  } while (symbol_mask != symbol_mask_full); 
-  
+  } while (symbol_mask != symbol_mask_full);
+
   ru->north_in_cnt++;
+
   // dump VCD output for first RU in list
   if (ru == RC.ru[0]) {
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, *frame );
@@ -452,23 +451,19 @@ void fh_if4p5_north_in(RU_t *ru,
 }
 
 void fh_if5_north_asynch_in(RU_t *ru,
-		                    int *frame,
-							int *subframe)
-{
+                            int *frame,
+                            int *subframe) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_proc_t *proc        = &ru->proc;
   int tti_tx,frame_tx;
   openair0_timestamp timestamp_tx;
-
-  recv_IF5(ru, &timestamp_tx, *subframe, IF5_RRH_GW_DL); 
-      //      printf("Received subframe %d (TS %llu) from RCC\n",tti_tx,timestamp_tx);
-
+  recv_IF5(ru, &timestamp_tx, *subframe, IF5_RRH_GW_DL);
+  //      printf("Received subframe %d (TS %llu) from RCC\n",tti_tx,timestamp_tx);
   tti_tx = (timestamp_tx/fp->samples_per_tti)%10;
   frame_tx    = (timestamp_tx/(fp->samples_per_tti*10))&1023;
-
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
-  
+
   if (proc->first_tx != 0) {
     *subframe = tti_tx;
     *frame    = frame_tx;
@@ -477,20 +472,19 @@ void fh_if5_north_asynch_in(RU_t *ru,
     AssertFatal(tti_tx == *subframe, "tti_tx %d is not what we expect %d\n",tti_tx,*subframe);
     AssertFatal(frame_tx == *frame, "frame_tx %d is not what we expect %d\n",frame_tx,*frame);
   }
+
   ru->north_in_cnt++;
 }
 
 
 void fh_if4p5_north_asynch_in(RU_t *ru,
-		                      int *frame,
-							  int *subframe)
-{
+                              int *frame,
+                              int *subframe) {
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   RU_proc_t *proc        = &ru->proc;
   uint16_t packet_type;
   uint32_t symbol_number,symbol_mask,symbol_mask_full;
   int tti_tx,frame_tx, ret;
-
   LOG_D(PHY, "%s(ru:%p frame, subframe)\n", __FUNCTION__, ru);
   symbol_number = 0;
   symbol_mask = 0;
@@ -500,49 +494,47 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
   do {
     recv_IF4p5(ru, &frame_tx, &tti_tx, &packet_type, &symbol_number);
     LOG_D(PHY,"income frame.subframe %d.%d, our frame.subframe.symbol_number %d.%d.%d (symbol mask %x)\n",frame_tx,tti_tx,*frame,*subframe,symbol_number,symbol_mask);
-    if (ru->cmd == STOP_RU)
-    {
+
+    if (ru->cmd == STOP_RU) {
       LOG_E(PHY,"Got STOP_RU\n");
       AssertFatal((ret=pthread_mutex_lock(&proc->mutex_ru))==0,"mutex_lock returns %d\n",ret);
       proc->instance_cnt_ru = -1;
       AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_ru))==0,"mutex_unlock returns %d\n",ret);
       ru->cmd=STOP_RU;
       return;
-    } 
+    }
+
     if ((subframe_select(fp,tti_tx) == SF_DL) && (symbol_number == 0)) start_meas(&ru->rx_fhaul);
+
     LOG_D(PHY,"subframe %d (%d): frame %d, subframe %d, symbol %d\n", *subframe,subframe_select(fp,*subframe),frame_tx,tti_tx,symbol_number);
 
-    if (proc->first_tx != 0)
-    {
+    if (proc->first_tx != 0) {
       *frame    = frame_tx;
       *subframe = tti_tx;
       proc->first_tx = 0;
       symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<<fp->dl_symbols_in_S_subframe) : (1<<fp->symbols_per_tti))-1;
     } else {
-     /* AssertFatal(frame_tx == *frame, "frame_tx %d is not what we expect %d\n",frame_tx,*frame);
-      AssertFatal(subframe_tx == *subframe, "In frame_tx %d : subframe_tx %d is not what we expect %d\n",frame_tx,subframe_tx,*subframe);
-     */
+      /* AssertFatal(frame_tx == *frame, "frame_tx %d is not what we expect %d\n",frame_tx,*frame);
+       AssertFatal(subframe_tx == *subframe, "In frame_tx %d : subframe_tx %d is not what we expect %d\n",frame_tx,subframe_tx,*subframe);
+      */
       *frame    = frame_tx;
       *subframe = tti_tx;
     }
 
     if (packet_type == IF4p5_PDLFFT) {
       symbol_mask = symbol_mask | (1<<symbol_number);
-    }
-    else AssertFatal(1==0,"Illegal IF4p5 packet type (should only be IF4p5_PDLFFT got %d\n",packet_type);
-  } while (symbol_mask != symbol_mask_full);    
+    } else AssertFatal(1==0,"Illegal IF4p5 packet type (should only be IF4p5_PDLFFT got %d\n",packet_type);
+  } while (symbol_mask != symbol_mask_full);
 
   if (subframe_select(fp,tti_tx) == SF_DL) stop_meas(&ru->rx_fhaul);
 
   ru->north_in_cnt++;
-
   proc->tti_tx  = tti_tx;
   proc->frame_tx= frame_tx;
 
   if ((frame_tx == 0)&&(tti_tx == 0)) proc->frame_tx_unwrap += 1024;
 
   proc->timestamp_tx = ((((uint64_t)frame_tx + (uint64_t)proc->frame_tx_unwrap) * 10) + (uint64_t)tti_tx) * (uint64_t)fp->samples_per_tti;
-
   LOG_D(PHY,"RU %d/%d TST %llu, frame %d, subframe %d\n",ru->idx,0,(long long unsigned int)proc->timestamp_tx,frame_tx,tti_tx);
 
   // dump VCD output for first RU in list
@@ -554,35 +546,35 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
   }
 
   if (ru->feptx_ofdm) ru->feptx_ofdm(ru,frame_tx,tti_tx);
+
   if (ru->fh_south_out) ru->fh_south_out(ru,frame_tx,tti_tx,proc->timestamp_tx);
 }
 
 
-void fh_if5_north_out(RU_t *ru)
-{
+void fh_if5_north_out(RU_t *ru) {
   RU_proc_t *proc=&ru->proc;
   uint8_t seqno=0;
-
-  /// **** send_IF5 of rxdata to BBU **** ///       
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );  
+  /// **** send_IF5 of rxdata to BBU **** ///
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
   send_IF5(ru, proc->timestamp_rx, proc->tti_rx, &seqno, IF5_RRH_GW_UL);
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );          
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
 }
 
 
 // RRU IF4p5 northbound interface (RX)
-void fh_if4p5_north_out(RU_t *ru)
-{
+void fh_if4p5_north_out(RU_t *ru) {
   RU_proc_t *proc=&ru->proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   const int subframe     = proc->tti_rx;
+
   if (ru->idx==0) {
-	  VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx );
-	  VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_NORTH_OUT, proc->tti_rx );
-	  VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_OUT, proc->frame_rx );
+    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx );
+    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_NORTH_OUT, proc->tti_rx );
+    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_OUT, proc->frame_rx );
   }
 
   LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULFFT SFN.SF %d.%d\n",proc->frame_rx,proc->tti_rx);
+
   if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
     /// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
     send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULTICK);
@@ -609,8 +601,7 @@ volatile late_control_e late_control=STATE_BURST_NORMAL;
 
 /* add fail safe for late command end */
 
-static void *emulatedRF_thread(void *param)
-{
+static void *emulatedRF_thread(void *param) {
   RU_proc_t *proc = (RU_proc_t *) param;
   int microsec = 500; // length of time to sleep, in miliseconds
   struct timespec req = {0};
@@ -623,7 +614,6 @@ static void *emulatedRF_thread(void *param)
   pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
   int policy;
   int ret;
-
   struct sched_param sparam;
   memset(&sparam, 0, sizeof(sparam));
   sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
@@ -650,17 +640,16 @@ static void *emulatedRF_thread(void *param)
 
 
 void rx_rf(RU_t *ru,
-		   int *frame,
-		   int *subframe)
-{
+           int *frame,
+           int *subframe) {
   RU_proc_t *proc = &ru->proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   void *rxp[ru->nb_rx];
   unsigned int rxs;
   int i;
   int resynch=0;
-
   openair0_timestamp ts=0,old_ts=0;
+
   for (i=0; i<ru->nb_rx; i++)
     rxp[i] = (void *)&ru->common.rxdata[i][*subframe*fp->samples_per_tti];
 
@@ -680,19 +669,20 @@ void rx_rf(RU_t *ru,
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
-
   ru->south_in_cnt++;
   LOG_D(PHY,"south_in_cnt %d\n",ru->south_in_cnt);
 
   if (ru->cmd==RU_FRAME_RESYNCH) {
     LOG_I(PHY,"Applying frame resynch %d => %d\n",*frame,ru->cmdval);
+
     if (proc->frame_rx>ru->cmdval) ru->ts_offset += (proc->frame_rx - ru->cmdval)*fp->samples_per_tti*10;
     else ru->ts_offset -= (-proc->frame_rx + ru->cmdval)*fp->samples_per_tti*10;
+
     *frame = ru->cmdval;
     ru->cmd=EMPTY;
     resynch=1;
   }
- 
+
   proc->timestamp_rx = ts-ru->ts_offset;
 
   //  AssertFatal(rxs == fp->samples_per_tti,
@@ -705,53 +695,49 @@ void rx_rf(RU_t *ru,
   if (proc->first_rx == 1) {
     ru->ts_offset = proc->timestamp_rx;
     proc->timestamp_rx = 0;
-  } 
-  else if (resynch==0 && (proc->timestamp_rx - old_ts != fp->samples_per_tti)) {
+  } else if (resynch==0 && (proc->timestamp_rx - old_ts != fp->samples_per_tti)) {
     LOG_I(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - fp->samples_per_tti,ru->ts_offset);
     ru->ts_offset += (proc->timestamp_rx - old_ts - fp->samples_per_tti);
     proc->timestamp_rx = ts-ru->ts_offset;
   }
 
-
   proc->frame_rx     = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
   proc->tti_rx  = (proc->timestamp_rx / fp->samples_per_tti)%10;
   // synchronize first reception to frame 0 subframe 0
 
-
   if (ru->fh_north_asynch_in == NULL) {
 #ifdef PHY_TX_THREAD
-  proc->timestamp_phy_tx = proc->timestamp_rx+((sf_ahead-1)*fp->samples_per_tti);
-  proc->subframe_phy_tx  = (proc->tti_rx+(sf_ahead-1))%10;  
-  proc->frame_phy_tx     = (proc->tti_rx>(9-(sf_ahead-1))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
+    proc->timestamp_phy_tx = proc->timestamp_rx+((sf_ahead-1)*fp->samples_per_tti);
+    proc->subframe_phy_tx  = (proc->tti_rx+(sf_ahead-1))%10;
+    proc->frame_phy_tx     = (proc->tti_rx>(9-(sf_ahead-1))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
 #else
-  proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
-  proc->tti_tx       = (proc->tti_rx+sf_ahead)%10;
-  proc->frame_tx     = (proc->tti_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
+    proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
+    proc->tti_tx       = (proc->tti_rx+sf_ahead)%10;
+    proc->frame_tx     = (proc->tti_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
 #endif
-  //proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
-  //proc->subframe_tx  = (proc->tti_rx+sf_ahead)%10;
-  //proc->frame_tx     = (proc->tti_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
-  
+    //proc->timestamp_tx = proc->timestamp_rx+(sf_ahead*fp->samples_per_tti);
+    //proc->subframe_tx  = (proc->tti_rx+sf_ahead)%10;
+    //proc->frame_tx     = (proc->tti_rx>(9-sf_ahead)) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
     LOG_D(PHY,"RU %d/%d TS %llu (off %d), frame %d, subframe %d\n",
-      ru->idx,
-      0,
-      (unsigned long long int)proc->timestamp_rx,
-      (int)ru->ts_offset,
-      proc->frame_rx,
-      proc->tti_rx);
-
+          ru->idx,
+          0,
+          (unsigned long long int)proc->timestamp_rx,
+          (int)ru->ts_offset,
+          proc->frame_rx,
+          proc->tti_rx);
     LOG_D(PHY,"south_in/rx_rf: RU %d/%d TS %llu (off %d), frame %d, subframe %d\n",
-      ru->idx,
-      0,
-      (unsigned long long int)proc->timestamp_rx,
-      (int)ru->ts_offset,
-      proc->frame_rx,
-      proc->tti_rx);
+          ru->idx,
+          0,
+          (unsigned long long int)proc->timestamp_rx,
+          (int)ru->ts_offset,
+          proc->frame_rx,
+          proc->tti_rx);
 
     // dump VCD output for first RU in list
     if (ru == RC.ru[0]) {
       VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx );
       VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx );
+
       if (ru->fh_north_asynch_in == NULL) {
         VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
         VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_rx );
@@ -760,7 +746,7 @@ void rx_rf(RU_t *ru,
   }
 
   if (proc->first_rx == 0) {
-    if (proc->tti_rx != *subframe){
+    if (proc->tti_rx != *subframe) {
       LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d)\n",(long long unsigned int)proc->timestamp_rx,proc->tti_rx,*subframe);
       exit_fun("Exiting");
     }
@@ -772,11 +758,10 @@ void rx_rf(RU_t *ru,
   } else {
     proc->first_rx = 0;
     *frame = proc->frame_rx;
-    *subframe = proc->tti_rx;        
+    *subframe = proc->tti_rx;
   }
-  
+
   //printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",ru->timestamp_rx,proc->frame_rx,frame,proc->tti_rx,subframe);
-  
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
 
   if (rxs != fp->samples_per_tti) {
@@ -793,22 +778,18 @@ void rx_rf(RU_t *ru,
 void tx_rf(RU_t *ru,
            int frame,
            int subframe,
-           uint64_t timestamp)
-{
+           uint64_t timestamp) {
   RU_proc_t *proc = &ru->proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
-  void *txp[ru->nb_tx]; 
+  void *txp[ru->nb_tx];
   unsigned int txs;
   int i;
-
   T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(subframe),
     T_INT(0), T_BUFFER(&ru->common.txdata[0][subframe * fp->samples_per_tti], fp->samples_per_tti * 4));
-
   lte_subframe_t SF_type     = subframe_select(fp,subframe%10);
   lte_subframe_t prevSF_type = subframe_select(fp,(subframe+9)%10);
   //lte_subframe_t nextSF_type = subframe_select(fp,(subframe+1)%10);
   int sf_extension = 0;
-  
 
   if ((SF_type == SF_DL) ||
       (SF_type == SF_S)) {
@@ -848,7 +829,7 @@ void tx_rf(RU_t *ru,
 #endif
 
     for (i=0; i<ru->nb_tx; i++)
-      txp[i] = (void*)&ru->common.txdata[i][(subframe*fp->samples_per_tti)-sf_extension];
+      txp[i] = (void *)&ru->common.txdata[i][(subframe*fp->samples_per_tti)-sf_extension];
 
     /* add fail safe for late command */
     if(late_control!=STATE_BURST_NORMAL) { //stop burst
@@ -880,6 +861,7 @@ void tx_rf(RU_t *ru,
           break;
       }
     }
+
     /* add fail safe for late command end */
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame);
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, subframe);
@@ -892,13 +874,13 @@ void tx_rf(RU_t *ru,
                                       siglen+sf_extension,
                                       ru->nb_tx,
                                       flags);
-
     ru->south_out_cnt++;
     LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
     int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
 
     if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx, se,
-    		siglen+sf_extension, (long long unsigned int)timestamp, frame, proc->frame_tx_unwrap, subframe);
+                                 siglen+sf_extension, (long long unsigned int)timestamp, frame, proc->frame_tx_unwrap, subframe);
+
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
 
     //    AssertFatal(txs ==  siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
@@ -916,8 +898,7 @@ void tx_rf(RU_t *ru,
  * \param param is a \ref L1_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-static void *ru_thread_asynch_rxtx( void *param )
-{
+static void *ru_thread_asynch_rxtx( void *param ) {
   static int ru_thread_asynch_rxtx_status;
   RU_t *ru         = (RU_t *)param;
   RU_proc_t *proc  = &ru->proc;
@@ -927,9 +908,7 @@ static void *ru_thread_asynch_rxtx( void *param )
   wait_sync("ru_thread_asynch_rxtx");
   // wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
   LOG_I(PHY, "waiting for devices (ru_thread_asynch_rxtx)\n");
-
   wait_on_condition(&proc->mutex_asynch_rxtx,&proc->cond_asynch_rxtx,&proc->instance_cnt_asynch_rxtx,"thread_asynch");
-
   LOG_I(PHY, "devices ok (ru_thread_asynch_rxtx)\n");
 
   while (!oai_exit) {
@@ -939,17 +918,15 @@ static void *ru_thread_asynch_rxtx( void *param )
       subframe=0;
       frame=0;
       usleep(1000);
-    }
-    else {
-      if (subframe==9) { 
-         subframe=0;
-         frame++;
-         frame&=1023;
-       } else {
-         subframe++;
+    } else {
+      if (subframe==9) {
+        subframe=0;
+        frame++;
+        frame&=1023;
+      } else {
+        subframe++;
       }
 
-
       LOG_D(PHY,"ru_thread_asynch_rxtx: Waiting on incoming fronthaul\n");
 
       // asynchronous receive from south (Mobipass)
@@ -959,36 +936,34 @@ static void *ru_thread_asynch_rxtx( void *param )
       // asynchronous receive from north (RRU IF4/IF5)
       else if (ru->fh_north_asynch_in) {
         if (subframe_select(ru->frame_parms,subframe)!=SF_UL) ru->fh_north_asynch_in(ru,&frame,&subframe);
-      }
-      else
+      } else
         AssertFatal(1==0,"Unknown function in ru_thread_asynch_rxtx\n");
     }
   }
+
   ru_thread_asynch_rxtx_status=0;
   return(&ru_thread_asynch_rxtx_status);
 }
 
 
-void wakeup_slaves(RU_proc_t *proc)
-{
+void wakeup_slaves(RU_proc_t *proc) {
   int ret;
   struct timespec wait;
   int time_ns = 5000000L;
 
   for (int i=0; i<proc->num_slaves; i++) {
     RU_proc_t *slave_proc = proc->slave_proc[i];
-
     // wake up slave FH thread
     // lock the FH mutex and make sure the thread is ready
     clock_gettime(CLOCK_REALTIME,&wait);
     wait.tv_nsec += time_ns;
-    if(wait.tv_nsec >= 1000*1000*1000)
-    {
+
+    if(wait.tv_nsec >= 1000*1000*1000) {
       wait.tv_nsec -= 1000*1000*1000;
       wait.tv_sec  += 1;
     }
-    AssertFatal((ret=pthread_mutex_timedlock(&slave_proc->mutex_FH,&wait))==0,"ERROR pthread_mutex_lock for RU %d slave %d (IC %d)\n",proc->ru->idx,slave_proc->ru->idx,slave_proc->instance_cnt_FH);
 
+    AssertFatal((ret=pthread_mutex_timedlock(&slave_proc->mutex_FH,&wait))==0,"ERROR pthread_mutex_lock for RU %d slave %d (IC %d)\n",proc->ru->idx,slave_proc->ru->idx,slave_proc->instance_cnt_FH);
     int cnt_slave            = ++slave_proc->instance_cnt_FH;
     slave_proc->frame_rx     = proc->frame_rx;
     slave_proc->tti_rx  = proc->tti_rx;
@@ -999,9 +974,9 @@ void wakeup_slaves(RU_proc_t *proc)
     if (cnt_slave == 0) {
       // the thread was presumably waiting where it should and can now be woken up
       if (pthread_cond_signal(&slave_proc->cond_FH) != 0) {
-	LOG_E( PHY, "ERROR pthread_cond_signal for RU %d, slave RU %d\n",proc->ru->idx,slave_proc->ru->idx);
-	exit_fun( "ERROR pthread_cond_signal" );
-	break;
+        LOG_E( PHY, "ERROR pthread_cond_signal for RU %d, slave RU %d\n",proc->ru->idx,slave_proc->ru->idx);
+        exit_fun( "ERROR pthread_cond_signal" );
+        break;
       }
     } else {
       LOG_W( PHY,"[RU] Frame %d, slave %d thread busy!! (cnt_FH %i)\n",slave_proc->frame_rx,slave_proc->ru->idx, cnt_slave);
@@ -1017,8 +992,7 @@ void wakeup_slaves(RU_proc_t *proc)
  * \param param is a \ref RU_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-void *ru_thread_prach( void *param )
-{
+void *ru_thread_prach( void *param ) {
   static int ru_thread_prach_status;
   RU_t *ru        = (RU_t *)param;
   RU_proc_t *proc = (RU_proc_t *)&ru->proc;
@@ -1043,10 +1017,7 @@ void *ru_thread_prach( void *param )
 
     if (ru->eNB_list[0]) {
       prach_procedures(
-        ru->eNB_list[0]
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-        ,0
-#endif
+        ru->eNB_list[0],0
       );
     } else {
       rx_prach(NULL,
@@ -1056,11 +1027,8 @@ void *ru_thread_prach( void *param )
                NULL,
                NULL,
                proc->frame_prach,
-               0
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-               ,0
-#endif
-               );
+               0,0
+              );
     }
 
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 );
@@ -1073,7 +1041,7 @@ void *ru_thread_prach( void *param )
   return &ru_thread_prach_status;
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 void *ru_thread_prach_br( void *param ) {
   static int ru_thread_prach_status;
   RU_t *ru        = (RU_t *)param;
@@ -1105,26 +1073,23 @@ void *ru_thread_prach_br( void *param ) {
   ru_thread_prach_status = 0;
   return &ru_thread_prach_status;
 }
-#endif
 
 
-int wakeup_synch(RU_t *ru)
-{
+int wakeup_synch(RU_t *ru) {
   int ret;
   struct timespec wait;
   int time_ns = 5000000L;
-
   // wake up synch thread
   // lock the synch mutex and make sure the thread is readif (pthread_mutex_timedlock(&ru->proc.mutex_synch,&wait) != 0) {
   clock_gettime(CLOCK_REALTIME,&wait);
   wait.tv_nsec += time_ns;
-  if(wait.tv_nsec >= 1000*1000*1000)
-  {
+
+  if(wait.tv_nsec >= 1000*1000*1000) {
     wait.tv_nsec -= 1000*1000*1000;
     wait.tv_sec  += 1;
   }
-  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_synch,&wait)) == 0,"[RU] ERROR pthread_mutex_lock for RU synch thread (IC %d)\n", ru->proc.instance_cnt_synch );
 
+  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_synch,&wait)) == 0,"[RU] ERROR pthread_mutex_lock for RU synch thread (IC %d)\n", ru->proc.instance_cnt_synch );
   ++ru->proc.instance_cnt_synch;
 
   // the thread can now be woken up
@@ -1139,8 +1104,7 @@ int wakeup_synch(RU_t *ru)
 }
 
 
-void do_ru_synch(RU_t *ru)
-{
+void do_ru_synch(RU_t *ru) {
   LTE_DL_FRAME_PARMS *fp  = ru->frame_parms;
   RU_proc_t *proc         = &ru->proc;
   int rxs, ic, ret, i;
@@ -1169,6 +1133,7 @@ void do_ru_synch(RU_t *ru)
                                      ru->nb_rx);
 
     if (rxs != fp->samples_per_tti*10) LOG_E(PHY,"requested %d samples, got %d\n",fp->samples_per_tti*10,rxs);
+
     // wakeup synchronization processing thread
     wakeup_synch(ru);
     ic=0;
@@ -1195,85 +1160,83 @@ void do_ru_synch(RU_t *ru)
   // read in rx_offset samples
   LOG_I(PHY,"Resynchronizing by %d samples\n",ru->rx_offset);
   rxs = ru->rfdevice.trx_read_func(&ru->rfdevice,
-				   &(proc->timestamp_rx),
-				   rxp,
-				   ru->rx_offset,
-				   ru->nb_rx);
+                                   &(proc->timestamp_rx),
+                                   rxp,
+                                   ru->rx_offset,
+                                   ru->nb_rx);
   // Verification of synchronization procedure
   ru->state = RU_CHECK_SYNC;
-
   LOG_I(PHY,"Exiting synch routine\n");
 }
 
 
 int check_sync(RU_t *ru,
                RU_t *ru_master,
-               int subframe)
-{
-	if (fabs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
-		return 0;
-	return 1;
+               int subframe) {
+  if (fabs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
+    return 0;
+
+  return 1;
 }
 
 
-void wakeup_L1s(RU_t *ru)
-{
+void wakeup_L1s(RU_t *ru) {
   PHY_VARS_eNB **eNB_list = ru->eNB_list;
   LOG_D(PHY,"wakeup_L1s (num %d) for RU %d (%d.%d)\n", ru->num_eNB, ru->idx, ru->proc.frame_rx,ru->proc.tti_rx);
-
   PHY_VARS_eNB *eNB = eNB_list[0];
   L1_proc_t *proc   = &eNB->proc;
   struct timespec t;
   LOG_D(PHY,"wakeup_L1s (num %d) for RU %d ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->eNB_top);
-
   // call eNB function directly
   char string[20];
   sprintf(string,"Incoming RU %d",ru->idx);
-
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU   +ru->idx, ru->proc.frame_rx);
   VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
-  
   AssertFatal(0==pthread_mutex_lock(&proc->mutex_RU),"");
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 1);
-  
   //printf("wakeup_L1s: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
   //          ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
   //    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
   //    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
   clock_gettime(CLOCK_MONOTONIC,&ru->proc.t[ru->proc.tti_rx]);
-  
+
   if (proc->RU_mask[ru->proc.tti_rx] == 0) {
     //clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
     proc->t[ru->proc.tti_rx] = ru->proc.t[ru->proc.tti_rx];
     //start_meas(&proc->ru_arrival_time);
     LOG_D(PHY,"RU %d starting timer for frame %d subframe %d\n", ru->idx, ru->proc.frame_rx, ru->proc.tti_rx);
   }
-  
+
   for (int i=0; i<eNB->num_RU; i++) {
     if (eNB->RU_list[i]->wait_cnt==1 && ru->proc.tti_rx!=9) eNB->RU_list[i]->wait_cnt=0;
+
     LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",
-    		eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
+          eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
+
     if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
-      //	AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
+      //  AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
       proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
-    } else if (/*eNB->RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0)){
+    } else if (/*eNB->RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0)) {
       proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
     }
+
     //printf("RU %d, RU_mask[%d] %d, i %d, frame %d, slave %d, ru->cnt %d, i->cnt %d\n",ru->idx,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx],i,ru->proc.frame_rx,ru->is_slave,ru->wait_cnt,eNB->RU_list[i]->wait_cnt);
     VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
+
     if (ru->is_slave == 0 && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<i)) == 1) && eNB->RU_list[i]->state == RU_RUN) { // This is master & the RRU has already been received
       if (check_sync(eNB->RU_list[i],eNB->RU_list[0],ru->proc.tti_rx)  == 0)
         LOG_E(PHY,"RU %d is not SYNC, subframe %d, time  %f this is master\n",
-        		eNB->RU_list[i]->idx, ru->proc.tti_rx, fabs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
+              eNB->RU_list[i]->idx, ru->proc.tti_rx, fabs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
     } else if (ru->is_slave == 1 && ru->state == RU_RUN && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<0)) == 1)) { // master already received. TODO: we assume that RU0 is master.
       if (check_sync(ru,eNB->RU_list[0],ru->proc.tti_rx)  == 0)
         LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time  %f\n",
-        		ru->idx, ru->proc.tti_rx, fabs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
+              ru->idx, ru->proc.tti_rx, fabs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
     }
   }
+
   //clock_gettime(CLOCK_MONOTONIC,&t);
   //LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.subframe_rx], t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
-  
+
   if (proc->RU_mask[ru->proc.tti_rx] == (1<<eNB->num_RU)-1) { // all RUs have provided their information so continue on and wakeup eNB top
     LOG_D(PHY,"ru_mask is %d \n ", proc->RU_mask[ru->proc.tti_rx]);
     LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ", (1<<eNB->num_RU)-1, ru->idx);
@@ -1284,16 +1247,16 @@ void wakeup_L1s(RU_t *ru)
     clock_gettime(CLOCK_MONOTONIC,&t);
     //stop_meas(&proc->ru_arrival_time);
     /*    AssertFatal(t.tv_nsec < proc->t[ru->proc.subframe_rx].tv_nsec+5000000,
-		"Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
-		ru->proc.subframe_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec, ru->idx);
+    "Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
+    ru->proc.subframe_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec, ru->idx);
     */
     // VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
     //VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
     AssertFatal(0==pthread_mutex_unlock(&proc->mutex_RU),"");
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 0 );
-    
     // unlock RUs that are waiting for eNB processing to be completed
     LOG_D(PHY,"RU %d wakeup eNB top for subframe %d\n", ru->idx, ru->proc.tti_rx);
+
     if (ru->wait_cnt == 0) {
       if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD) {
         LOG_D(PHY,"RU %d Call eNB_top\n", ru->idx);
@@ -1302,10 +1265,12 @@ void wakeup_L1s(RU_t *ru)
         for (int i=0; i<ru->num_eNB; i++) {
           LOG_D(PHY,"ru->wakeup_rxtx:%p\n", ru->wakeup_rxtx);
           eNB_list[i]->proc.ru_proc = &ru->proc;
-	      if (ru->wakeup_rxtx!=0 && ru->wakeup_rxtx(eNB_list[i],ru) < 0) LOG_E(PHY,"could not wakeup eNB rxtx process for subframe %d\n", ru->proc.tti_rx);
+
+          if (ru->wakeup_rxtx!=0 && ru->wakeup_rxtx(eNB_list[i],ru) < 0) LOG_E(PHY,"could not wakeup eNB rxtx process for subframe %d\n", ru->proc.tti_rx);
         }
       }
     }
+
     /*
       AssertFatal(0==pthread_mutex_lock(&ruproc->mutex_eNBs),"");
       LOG_D(PHY,"RU %d sending signal to unlock waiting ru_threads\n", ru->idx);
@@ -1313,32 +1278,30 @@ void wakeup_L1s(RU_t *ru)
       if (ruproc->instance_cnt_eNBs==-1) ruproc->instance_cnt_eNBs++;
       AssertFatal(0==pthread_mutex_unlock(&ruproc->mutex_eNBs),"");
     */
-  }
-  else { // not all RUs have provided their information
+  } else { // not all RUs have provided their information
     AssertFatal(0==pthread_mutex_unlock(&proc->mutex_RU),"");
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 0 );
   }
-//      pthread_mutex_unlock(&proc->mutex_RU);
-//      LOG_D(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.subframe_rx);
-//      ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
+
+  //      pthread_mutex_unlock(&proc->mutex_RU);
+  //      LOG_D(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.subframe_rx);
+  //      ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
   ru->proc.emulate_rf_busy = 0;
 }
 
 
-static inline int wakeup_prach_ru(RU_t *ru)
-{
+static inline int wakeup_prach_ru(RU_t *ru) {
   struct timespec wait;
   int time_ns = 5000000L, ret;
-
   clock_gettime(CLOCK_REALTIME,&wait);
   wait.tv_nsec += time_ns;
-  if(wait.tv_nsec >= 1000*1000*1000)
-  {
+
+  if(wait.tv_nsec >= 1000*1000*1000) {
     wait.tv_nsec -= 1000*1000*1000;
     wait.tv_sec  += 1;
   }
-  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_prach,&wait)) == 0,"[RU] ERROR pthread_mutex_lock for RU prach thread (IC %d)\n", ru->proc.instance_cnt_prach);
 
+  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_prach,&wait)) == 0,"[RU] ERROR pthread_mutex_lock for RU prach thread (IC %d)\n", ru->proc.instance_cnt_prach);
 
   if (ru->proc.instance_cnt_prach==-1) {
     ++ru->proc.instance_cnt_prach;
@@ -1360,28 +1323,25 @@ static inline int wakeup_prach_ru(RU_t *ru)
   return(0);
 }
 
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
+
 inline int wakeup_prach_ru_br(RU_t *ru) {
   int ret;
   struct timespec wait;
   int time_ns = 5000000L;
-
-
   clock_gettime(CLOCK_REALTIME,&wait);
   wait.tv_nsec += time_ns;
-  if(wait.tv_nsec >= 1000*1000*1000)
-  {
+
+  if(wait.tv_nsec >= 1000*1000*1000) {
     wait.tv_nsec -= 1000*1000*1000;
     wait.tv_sec  += 1;
   }
-  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_prach_br,&wait))==0,"[RU] ERROR pthread_mutex_lock for RU prach thread BR (IC %d)\n", ru->proc.instance_cnt_prach_br);
 
+  AssertFatal((ret=pthread_mutex_timedlock(&ru->proc.mutex_prach_br,&wait))==0,"[RU] ERROR pthread_mutex_lock for RU prach thread BR (IC %d)\n", ru->proc.instance_cnt_prach_br);
 
   if (ru->proc.instance_cnt_prach_br==-1) {
     ++ru->proc.instance_cnt_prach_br;
     ru->proc.frame_prach_br    = ru->proc.frame_rx;
     ru->proc.subframe_prach_br = ru->proc.tti_rx;
-
     LOG_D(PHY,"RU %d: waking up PRACH thread\n",ru->idx);
     // the thread can now be woken up
     AssertFatal(pthread_cond_signal(&ru->proc.cond_prach_br) == 0, "ERROR pthread_cond_signal for RU prach thread BR\n");
@@ -1390,13 +1350,12 @@ inline int wakeup_prach_ru_br(RU_t *ru) {
   AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach_br ))==0,"mutex_unlock returns %d\n",ret);
   return(0);
 }
-#endif
+
 
 
 // this is for RU with local RF unit
 void fill_rf_config(RU_t *ru,
-		            char *rf_config_file)
-{
+                    char *rf_config_file) {
   int i;
   LTE_DL_FRAME_PARMS *fp   = ru->frame_parms;
   openair0_config_t *cfg   = &ru->openair0_cfg;
@@ -1450,7 +1409,6 @@ void fill_rf_config(RU_t *ru,
     cfg->rx_bw = 1.5e6;
   } else AssertFatal(1==0,"Unknown N_RB_DL %d\n",fp->N_RB_DL);
 
-
   if (fp->frame_type==TDD)
     cfg->duplex_mode = duplex_mode_TDD;
   else //FDD
@@ -1481,8 +1439,7 @@ void fill_rf_config(RU_t *ru,
    Each rf chain is is addressed by the card number and the chain on the card. The
    rf_map specifies for each antenna port, on which rf chain the mapping should start. Multiple
    antennas are mapped to successive RF chains on the same card. */
-int setup_RU_buffers(RU_t *ru)
-{
+int setup_RU_buffers(RU_t *ru) {
   int i,j;
   int card,ant;
   //uint16_t N_TA_offset = 0;
@@ -1561,29 +1518,33 @@ int setup_RU_buffers(RU_t *ru)
 }
 
 
-static void *ru_stats_thread(void *param)
-{
+static void *ru_stats_thread(void *param) {
   RU_t *ru = (RU_t *)param;
   wait_sync("ru_stats_thread");
-  
+
   while (!oai_exit) {
     sleep(1);
+
     if (opp_enabled) {
       if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
+
       if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
+
       if (ru->fh_north_asynch_in) print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
+
       if (ru->fh_north_out) {
-	print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
-	print_meas(&ru->compression,"compression",NULL,NULL);
-	print_meas(&ru->transport,"transport",NULL,NULL);
-	LOG_I(PHY,"ru->north_out_cnt = %d\n",ru->north_out_cnt);
+        print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
+        print_meas(&ru->compression,"compression",NULL,NULL);
+        print_meas(&ru->transport,"transport",NULL,NULL);
+        LOG_I(PHY,"ru->north_out_cnt = %d\n",ru->north_out_cnt);
       }
+
       if (ru->fh_south_out) LOG_I(PHY,"ru->south_out_cnt = %d\n",ru->south_out_cnt);
+
       if (ru->fh_north_asynch_in) LOG_I(PHY,"ru->north_in_cnt = %d\n",ru->north_in_cnt);
-      
     }
   }
-  
+
   return(NULL);
 }
 
@@ -1594,9 +1555,8 @@ static void *ru_stats_thread(void *param)
 #endif
 
 
-static void* ru_thread_tx( void* param )
-{
-  RU_t *ru         = (RU_t*)param;
+static void *ru_thread_tx( void *param ) {
+  RU_t *ru         = (RU_t *)param;
   RU_proc_t *proc  = &ru->proc;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   PHY_VARS_eNB *eNB;
@@ -1605,7 +1565,6 @@ static void* ru_thread_tx( void* param )
   cpu_set_t cpuset;
   CPU_ZERO(&cpuset);
   char filename[256];
-
   thread_top_init("ru_thread_tx",1,400000,500000,500000);
   //CPU_SET(5, &cpuset);
   //pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
@@ -1621,28 +1580,28 @@ static void* ru_thread_tx( void* param )
     LOG_D(PHY,"ru_thread_tx (ru %d): Waiting for TX processing\n",ru->idx);
     // wait until eNBs are finished subframe RX n and TX n+4
     wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
-
     LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.tti_tx);
 
     if (oai_exit) break;
 
     // do TX front-end processing if needed (precoding and/or IDFTs)
     if (ru->feptx_prec) ru->feptx_prec(ru,proc->frame_tx,proc->tti_tx);
-  	  
+
     // do OFDM if needed
     if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,proc->frame_tx,proc->tti_tx);
+
     if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){
       // do outgoing fronthaul (south) if needed
       if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx);
-  	      
+
       if (ru->fh_north_out) ru->fh_north_out(ru);
-    }
-    else {
+    } else {
       for (int i=0; i<ru->nb_tx; i++) {
         if(proc->frame_tx == 2) {
           sprintf(filename,"txdataF%d_frame%d_sf%d.m",i,proc->frame_tx,proc->tti_tx);
           LOG_M(filename,"txdataF_frame",ru->common.txdataF_BF[i],fp->symbols_per_tti*fp->ofdm_symbol_size, 1, 1);
         }
+
         if(proc->frame_tx == 2 && proc->tti_tx==0) {
           sprintf(filename,"txdata%d_frame%d.m",i,proc->frame_tx);
           LOG_M(filename,"txdata_frame",ru->common.txdata[i],fp->samples_per_tti*10, 1, 1);
@@ -1657,23 +1616,24 @@ static void* ru_thread_tx( void* param )
       eNB       = ru->eNB_list[i];
       eNB_proc  = &eNB->proc;
       L1_proc   = (get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT)? &eNB_proc->L1_proc_tx : &eNB_proc->L1_proc;
-
       AssertFatal((ret=pthread_mutex_lock(&eNB_proc->mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
+
       for (int j=0; j<eNB->num_RU; j++) {
         if (ru == eNB->RU_list[j]) {
           if ((eNB_proc->RU_mask_tx&(1<<j)) > 0)
             LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information from RU tx %d (num_RU %d,mask %x) has not been served yet!\n",
                   eNB->Mod_id,eNB_proc->frame_rx,eNB_proc->subframe_rx,ru->idx,eNB->num_RU,eNB_proc->RU_mask_tx);
 
+          eNB_proc->RU_mask_tx |= (1<<j);
+        } else if (/*eNB->RU_list[j]->state==RU_SYNC ||*/ (eNB->RU_list[j]->is_slave==1 && eNB->RU_list[j]->wait_cnt>0 && ru!=eNB->RU_list[j] && ru->is_slave==0)) {
           eNB_proc->RU_mask_tx |= (1<<j);
         }
-        else if (/*eNB->RU_list[j]->state==RU_SYNC ||*/ (eNB->RU_list[j]->is_slave==1 && eNB->RU_list[j]->wait_cnt>0 && ru!=eNB->RU_list[j] && ru->is_slave==0)){
-		  eNB_proc->RU_mask_tx |= (1<<j);
-        }
-	    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_TX_RU, eNB_proc->RU_mask_tx);
+
+        VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_TX_RU, eNB_proc->RU_mask_tx);
       }
+
       if (eNB_proc->RU_mask_tx != (1<<eNB->num_RU)-1) {  // not all RUs have provided their information so return
-      	//printf("Not all RUs have provided their info (mask = %d), RU %d, num_RUs %d\n", eNB_proc->RU_mask_tx,ru->idx,eNB->num_RU);
+        //printf("Not all RUs have provided their info (mask = %d), RU %d, num_RUs %d\n", eNB_proc->RU_mask_tx,ru->idx,eNB->num_RU);
         AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
       } else { // all RUs TX are finished so send the ready signal to eNB processing
         eNB_proc->RU_mask_tx = 0;
@@ -1681,10 +1641,10 @@ static void* ru_thread_tx( void* param )
         AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
         AssertFatal((ret=pthread_mutex_lock( &L1_proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret);
         L1_proc->instance_cnt_RUs = 0;
-
         LOG_D(PHY,"ru_thread_tx: Signaling RU TX done in %d.%d\n",proc->frame_tx,proc->tti_tx);
         // the thread can now be woken up
-        LOG_D(PHY,"ru_thread_tx: clearing mask and Waking up L1 thread\n"); 
+        LOG_D(PHY,"ru_thread_tx: clearing mask and Waking up L1 thread\n");
+
         if (pthread_cond_signal(&L1_proc->cond_RUs) != 0) {
           LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
           exit_fun( "ERROR pthread_cond_signal" );
@@ -1693,6 +1653,7 @@ static void* ru_thread_tx( void* param )
         AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex_RUs))==0,"mutex_unlock returns %d\n",ret);
       }
     }
+
     //printf("ru_thread_tx: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask_tx %d\n",
     //eNB_proc->frame_rx,eNB_proc->subframe_rx,ru->idx,ru->wait_cnt,eNB_proc->RU_mask_tx);
   }
@@ -1702,8 +1663,7 @@ static void* ru_thread_tx( void* param )
 }
 
 
-static void *ru_thread( void *param )
-{
+static void *ru_thread( void *param ) {
   RU_t               *ru      = (RU_t *)param;
   RU_proc_t          *proc    = &ru->proc;
   int subframe = 9;
@@ -1713,15 +1673,12 @@ static void *ru_thread( void *param )
   cpu_set_t cpuset;
   CPU_ZERO(&cpuset);
   char filename[256];
-
   // set default return value
-
 #if defined(PRE_SCD_THREAD)
   dlsch_ue_select_tbl_in_use = 1;
 #endif
   // set default return value
   thread_top_init("ru_thread",1,400000,500000,500000);
-
   //CPU_SET(1, &cpuset);
   //pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
   pthread_setname_np( pthread_self(),"ru thread");
@@ -1732,94 +1689,93 @@ static void *ru_thread( void *param )
     fill_rf_config(ru,ru->rf_config_file);
     init_frame_parms(ru->frame_parms,1);
     phy_init_RU(ru);
-    
+
     if (setup_RU_buffers(ru)!=0) {
       printf("Exiting, cannot initialize RU Buffers\n");
       exit(-1);
     }
-    
+
     LOG_I(PHY, "Signaling main thread that RU %d is ready\n",ru->idx);
     AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
     RC.ru_mask &= ~(1<<ru->idx);
     pthread_cond_signal(&RC.ru_cond);
     AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret);
     ru->state = RU_RUN;
-  }
-  else if (ru->has_ctrl_prt == 0){
+  } else if (ru->has_ctrl_prt == 0) {
     // There is no control port: start everything here
     LOG_I(PHY, "RU %d has not ctrl port\n",ru->idx);
+
     if (ru->if_south == LOCAL_RF) {
       fill_rf_config(ru,ru->rf_config_file);
       init_frame_parms(ru->frame_parms,1);
       ru->frame_parms->nb_antennas_rx = ru->nb_rx;
       phy_init_RU(ru);
-      
       openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
-      
+
       if (setup_RU_buffers(ru)!=0) {
         printf("Exiting, cannot initialize RU Buffers\n");
         exit(-1);
       }
+
       AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
       RC.ru_mask &= ~(1<<ru->idx);
       pthread_cond_signal(&RC.ru_cond);
       AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret);
     }
+
     AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
     RC.ru_mask &= ~(1<<ru->idx);
     pthread_cond_signal(&RC.ru_cond);
     AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret);
-    
     ru->state = RU_RUN;
   }
-  
+
   AssertFatal((ret=pthread_mutex_lock(&proc->mutex_FH1))==0,"mutex_lock returns %d\n",ret);
   proc->instance_cnt_FH1 = 0;
   pthread_cond_signal(&proc->cond_FH1);
   AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_FH1))==0,"mutex_unlock returns %d\n",ret);
 
   while (!oai_exit) {
-    
     if (ru->if_south != LOCAL_RF && ru->is_slave==1) {
       ru->wait_cnt = 100;
-    }
-    else { 
+    } else {
       ru->wait_cnt = 0;
       ru->wait_check = 0;
     }
-    
-    
+
     // wait to be woken up
     if (ru->function!=eNodeB_3GPP && ru->has_ctrl_prt == 1) {
       if (wait_on_condition(&ru->proc.mutex_ru,&ru->proc.cond_ru_thread,&ru->proc.instance_cnt_ru,"ru_thread")<0) break;
-    }
-    else wait_sync("ru_thread");
-    
+    } else wait_sync("ru_thread");
+
     if(!(get_softmodem_params()->emulate_rf)) {
       if (ru->is_slave == 0) AssertFatal(ru->state == RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]);
-      else if (ru->is_slave == 1) AssertFatal(ru->state == RU_SYNC || ru->state == RU_RUN || ru->state == RU_CHECK_SYNC,"ru %d state = %s != RU_SYNC or RU_RUN or RU_CHECK_SYNC\n",ru->idx,ru_states[ru->state]); 
+      else if (ru->is_slave == 1) AssertFatal(ru->state == RU_SYNC || ru->state == RU_RUN ||
+                                                ru->state == RU_CHECK_SYNC,"ru %d state = %s != RU_SYNC or RU_RUN or RU_CHECK_SYNC\n",ru->idx,ru_states[ru->state]);
+
       // Start RF device if any
       if (ru->start_rf) {
         if (ru->start_rf(ru) != 0)
-        LOG_E(HW,"Could not start the RF device\n");
-      else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
-      }
-      else LOG_D(PHY,"RU %d no rf device\n",ru->idx);
+          LOG_E(HW,"Could not start the RF device\n");
+        else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
+      } else LOG_D(PHY,"RU %d no rf device\n",ru->idx);
     }
+
     // if an asnych_rxtx thread exists
     // wakeup the thread because the devices are ready at this point
-    
+
     if ((ru->fh_south_asynch_in)||(ru->fh_north_asynch_in)) {
       AssertFatal((ret=pthread_mutex_lock(&proc->mutex_asynch_rxtx))==0,"mutex_lock returns %d\n",ret);
       proc->instance_cnt_asynch_rxtx=0;
       pthread_cond_signal(&proc->cond_asynch_rxtx);
       AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_asynch_rxtx))==0,"mutex_unlock returns %d\n",ret);
     } else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
-    
+
     // if this is a slave RRU, try to synchronize on the DL frequency
     if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
-    
+
     LOG_D(PHY,"Starting steady-state operation\n");
+
     // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
     while (ru->state == RU_RUN || ru->state == RU_CHECK_SYNC) {
       // these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
@@ -1831,35 +1787,36 @@ static void *ru_thread( void *param )
       } else {
         subframe++;
       }
-      
+
       // synchronization on input FH interface, acquire signals/data and block
       if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&subframe);
       else AssertFatal(1==0, "No fronthaul interface at south port");
-      
+
 #ifdef PHY_TX_THREAD
-      if(first_phy_tx == 0)
-	{ 
-	  phy_tx_end = 0;
-	  phy_tx_txdataF_end = 0;
-          AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_phy_tx))==0,"[RU] ERROR pthread_mutex_lock for phy tx thread (IC %d)\n", ru->proc.instance_cnt_phy_tx);
-
-	  if (ru->proc.instance_cnt_phy_tx==-1) {
-	    ++ru->proc.instance_cnt_phy_tx;
-	    
-	    // the thread can now be woken up
-	    AssertFatal(pthread_cond_signal(&ru->proc.cond_phy_tx) == 0, "ERROR pthread_cond_signal for phy_tx thread\n");
-	  }else{
-	    LOG_E(PHY,"phy tx thread busy, skipping\n");
-	    ++ru->proc.instance_cnt_phy_tx;
-	  }
-          AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_phy_tx ))==0,"mutex_unlock returns %d\n",ret);
-	} else { 
+
+      if(first_phy_tx == 0) {
+        phy_tx_end = 0;
+        phy_tx_txdataF_end = 0;
+        AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_phy_tx))==0,"[RU] ERROR pthread_mutex_lock for phy tx thread (IC %d)\n", ru->proc.instance_cnt_phy_tx);
+
+        if (ru->proc.instance_cnt_phy_tx==-1) {
+          ++ru->proc.instance_cnt_phy_tx;
+          // the thread can now be woken up
+          AssertFatal(pthread_cond_signal(&ru->proc.cond_phy_tx) == 0, "ERROR pthread_cond_signal for phy_tx thread\n");
+        } else {
+          LOG_E(PHY,"phy tx thread busy, skipping\n");
+          ++ru->proc.instance_cnt_phy_tx;
+        }
+
+        AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_phy_tx ))==0,"mutex_unlock returns %d\n",ret);
+      } else {
         phy_tx_end = 1;
         phy_tx_txdataF_end = 1;
       }
+
       first_phy_tx = 0;
 #endif
-      
+
       if (ru->stop_rf && ru->cmd == STOP_RU) {
         ru->stop_rf(ru);
         ru->state = RU_IDLE;
@@ -1872,123 +1829,125 @@ static void *ru_thread( void *param )
         LOG_I(PHY,"RU %d stopped\n",ru->idx);
         break;
       }
+
       if (oai_exit == 1) break;
-      
+
       if (ru->wait_cnt > 0) {
-	
         ru->wait_cnt--;
         LOG_D(PHY,"RU thread %d, frame %d, subframe %d, wait_cnt %d \n",ru->idx, frame, subframe, ru->wait_cnt);
-	
+
         if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx && resynch_done == 0) {
-	  // Send RRU_frame adjust
+          // Send RRU_frame adjust
           RRU_CONFIG_msg_t rru_config_msg;
           rru_config_msg.type = RRU_frame_resynch;
           rru_config_msg.len  = sizeof(RRU_CONFIG_msg_t); // TODO: set to correct msg len
-          ((uint16_t*)&rru_config_msg.msg[0])[0] = RC.ru[0]->proc.frame_rx;
+          ((uint16_t *)&rru_config_msg.msg[0])[0] = RC.ru[0]->proc.frame_rx;
           ru->cmd=WAIT_RESYNCH;
           LOG_I(PHY,"Sending Frame Resynch %d to RRU %d\n", RC.ru[0]->proc.frame_rx,ru->idx);
           AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU\n");
           resynch_done=1;
         }
+
         wakeup_L1s(ru);
-      }
-      else {
+      } else {
         LOG_D(PHY,"RU thread %d, frame %d, subframe %d (do_prach %d, is_prach_subframe %d)\n",
               ru->idx, frame, subframe, ru->do_prach, is_prach_subframe(ru->frame_parms, proc->frame_rx, proc->tti_rx));
+
         if ((ru->do_prach>0) && (is_prach_subframe(ru->frame_parms, proc->frame_rx, proc->tti_rx)==1)) {
           LOG_D(PHY,"Waking up prach for %d.%d\n", proc->frame_rx, proc->tti_rx);
           wakeup_prach_ru(ru);
-        }
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
-        else if ((ru->do_prach>0) && (is_prach_subframe(ru->frame_parms, proc->frame_rx, proc->tti_rx)>1)) {
+        } else if ((ru->do_prach>0) && (is_prach_subframe(ru->frame_parms, proc->frame_rx, proc->tti_rx)>1)) {
           wakeup_prach_ru_br(ru);
         }
-#endif
-	
-	// adjust for timing offset between RU
-	if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
-	
-	// At this point, all information for subframe has been received on FH interface
-	// If this proc is to provide synchronization, do so
-	wakeup_slaves(proc);
-	
-    // do RX front-end processing (frequency-shift, dft) if needed
-	if (ru->feprx) ru->feprx(ru,proc->tti_rx);
-	
-    // wakeup all eNB processes waiting for this RU
-    AssertFatal((ret=pthread_mutex_lock(&proc->mutex_eNBs))==0,"mutex_lock returns %d\n",ret);
-	if (proc->instance_cnt_eNBs==0) proc->instance_cnt_eNBs--;
-      AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_eNBs))==0,"mutex_unlock returns %d\n",ret);
 
+        // adjust for timing offset between RU
+        if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
+
+        // At this point, all information for subframe has been received on FH interface
+        // If this proc is to provide synchronization, do so
+        wakeup_slaves(proc);
+
+        // do RX front-end processing (frequency-shift, dft) if needed
+        if (ru->feprx) ru->feprx(ru,proc->tti_rx);
+
+        // wakeup all eNB processes waiting for this RU
+        AssertFatal((ret=pthread_mutex_lock(&proc->mutex_eNBs))==0,"mutex_lock returns %d\n",ret);
+
+        if (proc->instance_cnt_eNBs==0) proc->instance_cnt_eNBs--;
+
+        AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_eNBs))==0,"mutex_unlock returns %d\n",ret);
 #if defined(PRE_SCD_THREAD)
-	new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
-	dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
-	memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
-	memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
+        new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
+        dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
+        memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
+        memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
         AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd\n");
-	
-	ru->proc.instance_pre_scd++;
-	
-	if (ru->proc.instance_pre_scd == 0) {
-	  if (pthread_cond_signal(&ru->proc.cond_pre_scd) != 0) {
-	    LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB pre scd\n" );
-	    exit_fun( "ERROR pthread_cond_signal cond_pre_scd" );
-	  }
-	}else{
-	  LOG_E( PHY, "[eNB] frame %d subframe %d rxtx busy instance_pre_scd %d\n",
-		 frame,subframe,ru->proc.instance_pre_scd );
-	}
-
-	AssertFatal((ret=pthread_mutex_unlock(&ru->proc.mutex_pre_scd))==0,"[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd\n");
+        ru->proc.instance_pre_scd++;
 
+        if (ru->proc.instance_pre_scd == 0) {
+          if (pthread_cond_signal(&ru->proc.cond_pre_scd) != 0) {
+            LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB pre scd\n" );
+            exit_fun( "ERROR pthread_cond_signal cond_pre_scd" );
+          }
+        } else {
+          LOG_E( PHY, "[eNB] frame %d subframe %d rxtx busy instance_pre_scd %d\n",
+                 frame,subframe,ru->proc.instance_pre_scd );
+        }
+
+        AssertFatal((ret=pthread_mutex_unlock(&ru->proc.mutex_pre_scd))==0,"[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd\n");
 #endif
-	// wakeup all eNB processes waiting for this RU
-	if (ru->num_eNB>0) wakeup_L1s(ru);
-	
+
+        // wakeup all eNB processes waiting for this RU
+        if (ru->num_eNB>0) wakeup_L1s(ru);
+
 #ifndef PHY_TX_THREAD
-    if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0) {
-      // do TX front-end processing if needed (precoding and/or IDFTs)
-      if (ru->feptx_prec) ru->feptx_prec(ru, proc->frame_tx, proc->tti_tx);
-      
-      // do OFDM if needed
-      if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru, proc->frame_tx, proc->tti_tx);
-      if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){
-        // do outgoing fronthaul (south) if needed
-        if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx);
-        
-        if ((ru->fh_north_out) && (ru->state!=RU_CHECK_SYNC)) ru->fh_north_out(ru);
-      }
-      else {
-        for (int i=0; i<ru->nb_tx; i++) {
-          if(proc->frame_tx == 2) {
-            sprintf(filename,"txdataF%d_frame%d_sf%d.m",i,proc->frame_tx,proc->tti_tx);
-            LOG_M(filename,"txdataF_frame",ru->common.txdataF_BF[i],ru->frame_parms->symbols_per_tti*ru->frame_parms->ofdm_symbol_size, 1, 1);
-          }
-          if(proc->frame_tx == 2 && proc->tti_tx==0){
-            sprintf(filename,"txdata%d_frame%d.m",i,proc->frame_tx);
-            LOG_M(filename,"txdata_frame",ru->common.txdata[i],ru->frame_parms->samples_per_tti*10, 1, 1);
+
+        if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0) {
+          // do TX front-end processing if needed (precoding and/or IDFTs)
+          if (ru->feptx_prec) ru->feptx_prec(ru, proc->frame_tx, proc->tti_tx);
+
+          // do OFDM if needed
+          if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru, proc->frame_tx, proc->tti_tx);
+
+          if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){
+            // do outgoing fronthaul (south) if needed
+            if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx);
+
+            if ((ru->fh_north_out) && (ru->state!=RU_CHECK_SYNC)) ru->fh_north_out(ru);
+          } else {
+            for (int i=0; i<ru->nb_tx; i++) {
+              if(proc->frame_tx == 2) {
+                sprintf(filename,"txdataF%d_frame%d_sf%d.m",i,proc->frame_tx,proc->tti_tx);
+                LOG_M(filename,"txdataF_frame",ru->common.txdataF_BF[i],ru->frame_parms->symbols_per_tti*ru->frame_parms->ofdm_symbol_size, 1, 1);
+              }
+
+              if(proc->frame_tx == 2 && proc->tti_tx==0) {
+                sprintf(filename,"txdata%d_frame%d.m",i,proc->frame_tx);
+                LOG_M(filename,"txdata_frame",ru->common.txdata[i],ru->frame_parms->samples_per_tti*10, 1, 1);
+              }
+            }
           }
+
+          proc->emulate_rf_busy = 0;
         }
-      }
-      proc->emulate_rf_busy = 0;
-    }
 
 #else
-	struct timespec time_req, time_rem;
-	time_req.tv_sec = 0;
-	time_req.tv_nsec = 10000;
-	
-	while((!oai_exit)&&(phy_tx_end == 0)){
-	  nanosleep(&time_req,&time_rem);
-	  continue;
-	}
+        struct timespec time_req, time_rem;
+        time_req.tv_sec = 0;
+        time_req.tv_nsec = 10000;
+
+        while((!oai_exit)&&(phy_tx_end == 0)) {
+          nanosleep(&time_req,&time_rem);
+          continue;
+        }
+
 #endif
       } // else wait_cnt == 0
     } // ru->state = RU_RUN
   } // while !oai_exit
-  
+
   printf( "Exiting ru_thread \n");
-  
+
   if (!(get_softmodem_params()->emulate_rf)) {
     if (ru->stop_rf != NULL) {
       if (ru->stop_rf(ru) != 0)
@@ -1996,12 +1955,12 @@ static void *ru_thread( void *param )
       else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
     }
   }
+
   return NULL;
 }
 
 // This thread run the initial synchronization like a UE
-void *ru_thread_synch(void *arg)
-{
+void *ru_thread_synch(void *arg) {
   RU_t *ru = (RU_t *)arg;
   LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
   int64_t peak_val, avg;
@@ -2021,45 +1980,43 @@ void *ru_thread_synch(void *arg)
       // run intial synch like UE
       LOG_I(PHY,"Running initial synchronization\n");
       ru->rx_offset = ru_sync_time(ru,
-				   &peak_val,
-				   &avg);
+                                   &peak_val,
+                                   &avg);
       LOG_I(PHY,"RU synch cnt %d: %d, val %llu (%d dB,%d dB)\n",cnt,ru->rx_offset,(unsigned long long)peak_val,dB_fixed64(peak_val),dB_fixed64(avg));
       cnt++;
+
       //if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) {
       if (ru->rx_offset >= 0 && avg>0 && dB_fixed(peak_val/avg)>=15 && cnt>10) {
         LOG_I(PHY,"Estimated peak_val %d dB, avg %d => timing offset %llu\n",dB_fixed(peak_val),dB_fixed(avg),(unsigned long long int)ru->rx_offset);
         ru->in_synch = 1;
-/*
-        LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
-        LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
-        LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
-  */      
-//exit(-1);
+        /*
+                LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
+                LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
+                LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
+          */
+        //exit(-1);
       } // sync_pos > 0
-      else //AssertFatal(cnt<1000,"Cannot find synch reference\n");
-          {
-              if (cnt>200) {
-                 LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
-                 LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
-                 LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
-
-                 exit(-1);
-              }
-          }
+      else { //AssertFatal(cnt<1000,"Cannot find synch reference\n");
+        if (cnt>200) {
+          LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
+          LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
+          LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
+          exit(-1);
+        }
+      }
     } // ru->in_synch==0
+
     if (release_thread(&ru->proc.mutex_synch,&ru->proc.instance_cnt_synch,"ru_synch_thread") < 0) break;
   } // oai_exit
 
   ru_sync_time_free(ru);
-
   ru_thread_synch_status = 0;
   return &ru_thread_synch_status;
 }
 
 
 #if defined(PRE_SCD_THREAD)
-void *pre_scd_thread( void *param )
-{
+void *pre_scd_thread( void *param ) {
   static int              eNB_pre_scd_status;
   protocol_ctxt_t         ctxt;
   int                     frame;
@@ -2128,8 +2085,7 @@ void *pre_scd_thread( void *param )
  * \param param is a \ref L1_proc_t structure which contains the info what to process.
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
-static void *eNB_thread_phy_tx( void *param )
-{
+static void *eNB_thread_phy_tx( void *param ) {
   static int eNB_thread_phy_tx_status;
   RU_t *ru        = (RU_t *)param;
   RU_proc_t *proc = &ru->proc;
@@ -2147,30 +2103,31 @@ static void *eNB_thread_phy_tx( void *param )
 
     LOG_D(PHY,"Running eNB phy tx procedures\n");
     AssertFatal(ru->num_eNB == 1, "Handle multiple L1 case\n");
-    if(ru->num_eNB == 1){
-       L1_proc.subframe_tx = proc->subframe_phy_tx;
-       L1_proc.frame_tx = proc->frame_phy_tx;
-       phy_procedures_eNB_TX(eNB_list[0], &L1_proc, 1);
-       phy_tx_txdataF_end = 1;
-
-       if(pthread_mutex_lock(&ru->proc.mutex_rf_tx) != 0){
-          LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for rf tx thread (IC %d)\n", ru->proc.instance_cnt_rf_tx);
-          exit_fun( "error locking mutex_rf_tx" );
-        }
 
-       if (ru->proc.instance_cnt_rf_tx==-1) {
-          ++ru->proc.instance_cnt_rf_tx;
-          ru->proc.frame_tx = proc->frame_phy_tx;
-          ru->proc.tti_tx = proc->subframe_phy_tx;
-          ru->proc.timestamp_tx = proc->timestamp_phy_tx;
+    if(ru->num_eNB == 1) {
+      L1_proc.subframe_tx = proc->subframe_phy_tx;
+      L1_proc.frame_tx = proc->frame_phy_tx;
+      phy_procedures_eNB_TX(eNB_list[0], &L1_proc, 1);
+      phy_tx_txdataF_end = 1;
+
+      if(pthread_mutex_lock(&ru->proc.mutex_rf_tx) != 0) {
+        LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for rf tx thread (IC %d)\n", ru->proc.instance_cnt_rf_tx);
+        exit_fun( "error locking mutex_rf_tx" );
+      }
 
-          // the thread can now be woken up
-          AssertFatal(pthread_cond_signal(&ru->proc.cond_rf_tx) == 0, "ERROR pthread_cond_signal for rf_tx thread\n");
-        }else{
-          LOG_E(PHY,"rf tx thread busy, skipping\n");
-          late_control=STATE_BURST_TERMINATE;
-        }
-        pthread_mutex_unlock( &ru->proc.mutex_rf_tx );
+      if (ru->proc.instance_cnt_rf_tx==-1) {
+        ++ru->proc.instance_cnt_rf_tx;
+        ru->proc.frame_tx = proc->frame_phy_tx;
+        ru->proc.tti_tx = proc->subframe_phy_tx;
+        ru->proc.timestamp_tx = proc->timestamp_phy_tx;
+        // the thread can now be woken up
+        AssertFatal(pthread_cond_signal(&ru->proc.cond_rf_tx) == 0, "ERROR pthread_cond_signal for rf_tx thread\n");
+      } else {
+        LOG_E(PHY,"rf tx thread busy, skipping\n");
+        late_control=STATE_BURST_TERMINATE;
+      }
+
+      pthread_mutex_unlock( &ru->proc.mutex_rf_tx );
     }
 
     AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_rf_tx ))==0,"mutex_unlock returns %d\n",ret);
@@ -2186,8 +2143,7 @@ static void *eNB_thread_phy_tx( void *param )
 }
 
 
-static void *rf_tx( void *param )
-{
+static void *rf_tx( void *param ) {
   static int rf_tx_status;
   RU_t *ru      = (RU_t *)param;
   RU_proc_t *proc = &ru->proc;
@@ -2258,37 +2214,30 @@ extern void kill_feptx_thread(RU_t *ru);
 extern void ru_fep_full_2thread(RU_t *ru,int subframe);
 
 
-void reset_proc(RU_t *ru)
-{
+void reset_proc(RU_t *ru) {
   int i=0;
   RU_proc_t *proc;
-
   AssertFatal(ru != NULL, "ru is null\n");
   proc = &ru->proc;
-
   proc->ru = ru;
   proc->first_rx                 = 1;
   proc->first_tx                 = 1;
   proc->frame_offset             = 0;
   proc->frame_tx_unwrap          = 0;
 
-  for (i=0;i<10;i++) proc->symbol_mask[i]=0;
+  for (i=0; i<10; i++) proc->symbol_mask[i]=0;
 }
 
 
-extern void* ru_thread_control( void* param );
+extern void *ru_thread_control( void *param );
 
 
-void init_RU_proc(RU_t *ru)
-{
+void init_RU_proc(RU_t *ru) {
   int i=0,ret;
   RU_proc_t *proc;
   pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL, *attr_prach=NULL, *attr_asynch=NULL, *attr_synch=NULL, *attr_emulateRF=NULL, *attr_ctrl=NULL;
   //pthread_attr_t *attr_fep=NULL;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   pthread_attr_t *attr_prach_br=NULL;
-#endif
-
 #ifndef OCP_FRAMEWORK
   LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
 #endif
@@ -2319,7 +2268,6 @@ void init_RU_proc(RU_t *ru)
   pthread_mutex_init( &proc->mutex_emulateRF,NULL);
   pthread_mutex_init( &proc->mutex_eNBs, NULL);
   pthread_mutex_init( &proc->mutex_ru,NULL);
-
   pthread_cond_init( &proc->cond_prach, NULL);
   pthread_cond_init( &proc->cond_FH, NULL);
   pthread_cond_init( &proc->cond_FH1, NULL);
@@ -2328,7 +2276,6 @@ void init_RU_proc(RU_t *ru)
   pthread_cond_init( &proc->cond_synch,NULL);
   pthread_cond_init( &proc->cond_eNBs, NULL);
   pthread_cond_init( &proc->cond_ru_thread,NULL);
-
   pthread_attr_init( &proc->attr_FH);
   pthread_attr_init( &proc->attr_FH1);
   pthread_attr_init( &proc->attr_emulateRF);
@@ -2336,12 +2283,10 @@ void init_RU_proc(RU_t *ru)
   pthread_attr_init( &proc->attr_synch);
   pthread_attr_init( &proc->attr_asynch_rxtx);
   pthread_attr_init( &proc->attr_fep);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   proc->instance_cnt_prach_br = -1;
   pthread_mutex_init( &proc->mutex_prach_br, NULL);
   pthread_cond_init( &proc->cond_prach_br, NULL);
   pthread_attr_init( &proc->attr_prach_br);
-#endif
 #ifdef PHY_TX_THREAD
   proc->instance_cnt_phy_tx = -1;
   pthread_mutex_init( &proc->mutex_phy_tx, NULL);
@@ -2357,14 +2302,12 @@ void init_RU_proc(RU_t *ru)
   attr_synch     = &proc->attr_synch;
   attr_asynch    = &proc->attr_asynch_rxtx;
   attr_emulateRF = &proc->attr_emulateRF;
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   attr_prach_br  = &proc->attr_prach_br;
 #endif
-#endif
-  if (ru->function!=eNodeB_3GPP) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void*)ru );
 
-  pthread_create( &proc->pthread_FH, attr_FH, ru_thread, (void*)ru );
+  if (ru->function!=eNodeB_3GPP) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void *)ru );
 
+  pthread_create( &proc->pthread_FH, attr_FH, ru_thread, (void *)ru );
 #if defined(PRE_SCD_THREAD)
   proc->instance_pre_scd = -1;
   pthread_mutex_init( &proc->mutex_pre_scd, NULL);
@@ -2386,29 +2329,25 @@ void init_RU_proc(RU_t *ru)
 
   if (ru->function == NGFI_RRU_IF4p5) {
     pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void *)ru );
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     pthread_create( &proc->pthread_prach_br, attr_prach_br, ru_thread_prach_br, (void *)ru );
-#endif
 
     if (ru->is_slave == 1) pthread_create( &proc->pthread_synch, attr_synch, ru_thread_synch, (void *)ru);
 
     if ((ru->if_timing == synch_to_other) || (ru->function == NGFI_RRU_IF5) || (ru->function == NGFI_RRU_IF4p5)) {
-        LOG_I(PHY,"Starting ru_thread_asynch_rxtx, ru->is_slave %d, ru->generate_dmrs_sync %d\n",
-              ru->is_slave,ru->generate_dmrs_sync);
-	//generate_ul_ref_sigs();
-        //ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t)); 
-        pthread_create( &proc->pthread_asynch_rxtx, attr_asynch, ru_thread_asynch_rxtx, (void*)ru );
+      LOG_I(PHY,"Starting ru_thread_asynch_rxtx, ru->is_slave %d, ru->generate_dmrs_sync %d\n",
+            ru->is_slave,ru->generate_dmrs_sync);
+      //generate_ul_ref_sigs();
+      //ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t));
+      pthread_create( &proc->pthread_asynch_rxtx, attr_asynch, ru_thread_asynch_rxtx, (void *)ru );
     }
-  }
-  else if (ru->function == eNodeB_3GPP && ru->if_south == LOCAL_RF) { // DJP - need something else to distinguish between monolithic and PNF
+  } else if (ru->function == eNodeB_3GPP && ru->if_south == LOCAL_RF) { // DJP - need something else to distinguish between monolithic and PNF
     LOG_I(PHY,"%s() DJP - added creation of pthread_prach\n", __FUNCTION__);
-    pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru );
+    pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void *)ru );
     ru->state=RU_RUN;
     fill_rf_config(ru,ru->rf_config_file);
     init_frame_parms(ru->frame_parms,1);
     ru->frame_parms->nb_antennas_rx = ru->nb_rx;
     phy_init_RU(ru);
-
     openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
 
     if (setup_RU_buffers(ru)!=0) {
@@ -2420,9 +2359,10 @@ void init_RU_proc(RU_t *ru)
   if (get_thread_worker_conf() == WORKER_ENABLE) {
     init_fep_thread(ru, NULL);
     init_feptx_thread(ru, NULL);
-  } 
-  if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void*)ru); 
- 
+  }
+
+  if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void *)ru);
+
   if (ru->function == eNodeB_3GPP) {
     usleep(10000);
     LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d,send_dmrs %d) is ready in state %s\n",ru->idx,ru->is_slave,ru->generate_dmrs_sync,ru_states[ru->state]);
@@ -2434,8 +2374,7 @@ void init_RU_proc(RU_t *ru)
 }
 
 
-void kill_RU_proc(RU_t *ru)
-{
+void kill_RU_proc(RU_t *ru) {
   int ret;
   RU_proc_t *proc = &ru->proc;
 #if defined(PRE_SCD_THREAD)
@@ -2483,12 +2422,10 @@ void kill_RU_proc(RU_t *ru)
   proc->instance_cnt_prach = 0;
   pthread_cond_signal(&proc->cond_prach);
   AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_prach))==0,"mutex_unlock returns %d\n",ret);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   AssertFatal((ret=pthread_mutex_lock(&proc->mutex_prach_br))==0,"mutex_lock returns %d\n",ret);
   proc->instance_cnt_prach_br = 0;
   pthread_cond_signal(&proc->cond_prach_br);
   AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_prach_br))==0,"mutex_unlock returns %d\n",ret);
-#endif
   AssertFatal((ret=pthread_mutex_lock(&proc->mutex_synch))==0,"mutex_lock returns %d\n",ret);
   proc->instance_cnt_synch = 0;
   pthread_cond_signal(&proc->cond_synch);
@@ -2514,10 +2451,8 @@ void kill_RU_proc(RU_t *ru)
   if (ru->function == NGFI_RRU_IF4p5) {
     LOG_D(PHY, "Joining pthread_prach\n");
     pthread_join(proc->pthread_prach, NULL);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     LOG_D(PHY, "Joining pthread_prach_br\n");
     pthread_join(proc->pthread_prach_br, NULL);
-#endif
 
     if (ru->is_slave) {
       LOG_D(PHY, "Joining pthread_\n");
@@ -2555,16 +2490,13 @@ void kill_RU_proc(RU_t *ru)
   pthread_attr_destroy(&proc->attr_synch);
   pthread_attr_destroy(&proc->attr_asynch_rxtx);
   pthread_attr_destroy(&proc->attr_fep);
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
   pthread_mutex_destroy(&proc->mutex_prach_br);
   pthread_cond_destroy(&proc->cond_prach_br);
   pthread_attr_destroy(&proc->attr_prach_br);
-#endif
 }
 
 
-void init_precoding_weights(PHY_VARS_eNB *eNB)
-{
+void init_precoding_weights(PHY_VARS_eNB *eNB) {
   int layer,ru_id,aa,re,ue,tb;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   RU_t *ru;
@@ -2598,163 +2530,162 @@ void init_precoding_weights(PHY_VARS_eNB *eNB)
 }
 
 
-void set_function_spec_param(RU_t *ru)
-{
+void set_function_spec_param(RU_t *ru) {
   int ret;
 
   switch (ru->if_south) {
-  case LOCAL_RF:   // this is an RU with integrated RF (RRU, eNB)
-    if (ru->function ==  NGFI_RRU_IF5) {                 // IF5 RRU
-      ru->do_prach              = 0;                      // no prach processing in RU
-      ru->fh_north_in           = NULL;                   // no shynchronous incoming fronthaul from north
-      ru->fh_north_out          = fh_if5_north_out;       // need only to do send_IF5  reception
-      ru->fh_south_out          = tx_rf;                  // send output to RF
-      ru->fh_north_asynch_in    = fh_if5_north_asynch_in; // TX packets come asynchronously
-      ru->feprx                 = NULL;                   // nothing (this is a time-domain signal)
-      ru->feptx_ofdm            = NULL;                   // nothing (this is a time-domain signal)
-      ru->feptx_prec            = NULL;                   // nothing (this is a time-domain signal)
-      ru->start_if              = start_if;               // need to start the if interface for if5
-      ru->ifdevice.host_type    = RRU_HOST;
-      ru->rfdevice.host_type    = RRU_HOST;
-      ru->ifdevice.eth_params   = &ru->eth_params;
-      reset_meas(&ru->rx_fhaul);
-      reset_meas(&ru->tx_fhaul);
-      reset_meas(&ru->compression);
-      reset_meas(&ru->transport);
+    case LOCAL_RF:   // this is an RU with integrated RF (RRU, eNB)
+      if (ru->function ==  NGFI_RRU_IF5) {                 // IF5 RRU
+        ru->do_prach              = 0;                      // no prach processing in RU
+        ru->fh_north_in           = NULL;                   // no shynchronous incoming fronthaul from north
+        ru->fh_north_out          = fh_if5_north_out;       // need only to do send_IF5  reception
+        ru->fh_south_out          = tx_rf;                  // send output to RF
+        ru->fh_north_asynch_in    = fh_if5_north_asynch_in; // TX packets come asynchronously
+        ru->feprx                 = NULL;                   // nothing (this is a time-domain signal)
+        ru->feptx_ofdm            = NULL;                   // nothing (this is a time-domain signal)
+        ru->feptx_prec            = NULL;                   // nothing (this is a time-domain signal)
+        ru->start_if              = start_if;               // need to start the if interface for if5
+        ru->ifdevice.host_type    = RRU_HOST;
+        ru->rfdevice.host_type    = RRU_HOST;
+        ru->ifdevice.eth_params   = &ru->eth_params;
+        reset_meas(&ru->rx_fhaul);
+        reset_meas(&ru->tx_fhaul);
+        reset_meas(&ru->compression);
+        reset_meas(&ru->transport);
+        ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
+        printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
+
+        if (ret<0) {
+          printf("Exiting, cannot initialize transport protocol\n");
+          exit(-1);
+        }
+      } else if (ru->function == NGFI_RRU_IF4p5) {
+        ru->do_prach              = 1;                        // do part of prach processing in RU
+        ru->fh_north_in           = NULL;                     // no synchronous incoming fronthaul from north
+        ru->fh_north_out          = fh_if4p5_north_out;       // send_IF4p5 on reception
+        ru->fh_south_out          = tx_rf;                    // send output to RF
+        ru->fh_north_asynch_in    = fh_if4p5_north_asynch_in; // TX packets come asynchronously
+        ru->feprx                 = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full :ru_fep_full_2thread;                 // RX DFTs
+        ru->feptx_ofdm            = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;               // this is fep with idft only (no precoding in RRU)
+        ru->feptx_prec            = NULL;
+        ru->start_if              = start_if;                 // need to start the if interface for if4p5
+        ru->ifdevice.host_type    = RRU_HOST;
+        ru->rfdevice.host_type    = RRU_HOST;
+        ru->ifdevice.eth_params   = &ru->eth_params;
+        reset_meas(&ru->rx_fhaul);
+        reset_meas(&ru->tx_fhaul);
+        reset_meas(&ru->compression);
+        reset_meas(&ru->transport);
+        ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
+        printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
+
+        if (ret<0) {
+          printf("Exiting, cannot initialize transport protocol\n");
+          exit(-1);
+        }
+
+        malloc_IF4p5_buffer(ru);
+      } else if (ru->function == eNodeB_3GPP) {
+        ru->do_prach             = 0;                       // no prach processing in RU
+        ru->feprx                = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : ru_fep_full_2thread;                // RX DFTs
+        ru->feptx_ofdm           = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;              // this is fep with idft and precoding
+        ru->feptx_prec           = feptx_prec;              // this is fep with idft and precoding
+        ru->fh_north_in          = NULL;                    // no incoming fronthaul from north
+        ru->fh_north_out         = NULL;                    // no outgoing fronthaul to north
+        ru->start_if             = NULL;                    // no if interface
+        ru->rfdevice.host_type   = RAU_HOST;
+      }
+
+      ru->fh_south_in            = rx_rf;                               // local synchronous RF RX
+      ru->fh_south_out           = tx_rf;                               // local synchronous RF TX
+      ru->start_rf               = start_rf;                            // need to start the local RF interface
+      ru->stop_rf                = stop_rf;
+      printf("configuring ru_id %d (start_rf %p)\n", ru->idx, start_rf);
+      /*
+        if (ru->function == eNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
+        fill_rf_config(ru,rf_config_file);
+        init_frame_parms(&ru->frame_parms,1);
+        phy_init_RU(ru);
+        }
+
+        ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
+        if (setup_RU_buffers(ru)!=0) {
+        printf("Exiting, cannot initialize RU Buffers\n");
+        exit(-1);
+        }*/
+      break;
+
+    case REMOTE_IF5: // the remote unit is IF5 RRU
+      ru->do_prach               = 0;
+      ru->feprx                  = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : fep_full;                   // this is frequency-shift + DFTs
+      ru->feptx_prec             = feptx_prec;                 // need to do transmit Precoding + IDFTs
+      ru->feptx_ofdm             = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;                 // need to do transmit Precoding + IDFTs
+
+      if (ru->if_timing == synch_to_other) {
+        ru->fh_south_in          = fh_slave_south_in;                  // synchronize to master
+        ru->fh_south_out         = fh_if5_mobipass_south_out;          // use send_IF5 for mobipass
+        ru->fh_south_asynch_in   = fh_if5_south_asynch_in_mobipass;    // UL is asynchronous
+      } else {
+        ru->fh_south_in          = fh_if5_south_in;     // synchronous IF5 reception
+        ru->fh_south_out         = fh_if5_south_out;    // synchronous IF5 transmission
+        ru->fh_south_asynch_in   = NULL;                // no asynchronous UL
+      }
+
+      ru->start_rf               = NULL;                 // no local RF
+      ru->stop_rf                = NULL;
+      ru->start_if               = start_if;             // need to start if interface for IF5
+      ru->ifdevice.host_type     = RAU_HOST;
+      ru->ifdevice.eth_params    = &ru->eth_params;
+      ru->ifdevice.configure_rru = configure_ru;
       ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
       printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
-      
+
       if (ret<0) {
         printf("Exiting, cannot initialize transport protocol\n");
         exit(-1);
       }
-    } else if (ru->function == NGFI_RRU_IF4p5) {
-      ru->do_prach              = 1;                        // do part of prach processing in RU
-      ru->fh_north_in           = NULL;                     // no synchronous incoming fronthaul from north
-      ru->fh_north_out          = fh_if4p5_north_out;       // send_IF4p5 on reception
-      ru->fh_south_out          = tx_rf;                    // send output to RF
-      ru->fh_north_asynch_in    = fh_if4p5_north_asynch_in; // TX packets come asynchronously
-      ru->feprx                 = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full :ru_fep_full_2thread;                 // RX DFTs
-      ru->feptx_ofdm            = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;               // this is fep with idft only (no precoding in RRU)
-      ru->feptx_prec            = NULL;
-      ru->start_if              = start_if;                 // need to start the if interface for if4p5
-      ru->ifdevice.host_type    = RRU_HOST;
-      ru->rfdevice.host_type    = RRU_HOST;
-      ru->ifdevice.eth_params   = &ru->eth_params;
-      reset_meas(&ru->rx_fhaul);
-      reset_meas(&ru->tx_fhaul);
-      reset_meas(&ru->compression);
-      reset_meas(&ru->transport);
-      ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
+
+      break;
+
+    case REMOTE_IF4p5:
+      ru->do_prach               = 0;
+      ru->feprx                  = NULL;                // DFTs
+      ru->feptx_prec             = feptx_prec;          // Precoding operation
+      ru->feptx_ofdm             = NULL;                // no OFDM mod
+      ru->fh_south_in            = fh_if4p5_south_in;   // synchronous IF4p5 reception
+      ru->fh_south_out           = fh_if4p5_south_out;  // synchronous IF4p5 transmission
+      ru->fh_south_asynch_in     = (ru->if_timing == synch_to_other) ? fh_if4p5_south_in : NULL;                // asynchronous UL if synch_to_other
+      ru->fh_north_out           = NULL;
+      ru->fh_north_asynch_in     = NULL;
+      ru->start_rf               = NULL;                // no local RF
+      ru->stop_rf                = NULL;
+      ru->start_if               = start_if;            // need to start if interface for IF4p5
+      ru->ifdevice.host_type     = RAU_HOST;
+      ru->ifdevice.eth_params    = &ru->eth_params;
+      ru->ifdevice.configure_rru = configure_ru;
+      ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg, &ru->eth_params);
       printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
-      
+
       if (ret<0) {
         printf("Exiting, cannot initialize transport protocol\n");
         exit(-1);
       }
-      
+
       malloc_IF4p5_buffer(ru);
-    } else if (ru->function == eNodeB_3GPP) {
-      ru->do_prach             = 0;                       // no prach processing in RU
-      ru->feprx                = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : ru_fep_full_2thread;                // RX DFTs
-      ru->feptx_ofdm           = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;              // this is fep with idft and precoding
-      ru->feptx_prec           = feptx_prec;              // this is fep with idft and precoding
-      ru->fh_north_in          = NULL;                    // no incoming fronthaul from north
-      ru->fh_north_out         = NULL;                    // no outgoing fronthaul to north
-      ru->start_if             = NULL;                    // no if interface
-      ru->rfdevice.host_type   = RAU_HOST;
-    }
-    
-    ru->fh_south_in            = rx_rf;                               // local synchronous RF RX
-    ru->fh_south_out           = tx_rf;                               // local synchronous RF TX
-    ru->start_rf               = start_rf;                            // need to start the local RF interface
-    ru->stop_rf                = stop_rf;
-    printf("configuring ru_id %d (start_rf %p)\n", ru->idx, start_rf);
-    /*
-      if (ru->function == eNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
-      fill_rf_config(ru,rf_config_file);
-      init_frame_parms(&ru->frame_parms,1);
-      phy_init_RU(ru);
-      }
-      
-      ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
-      if (setup_RU_buffers(ru)!=0) {
-      printf("Exiting, cannot initialize RU Buffers\n");
-      exit(-1);
-      }*/
-    break;
-    
-  case REMOTE_IF5: // the remote unit is IF5 RRU
-    ru->do_prach               = 0;
-    ru->feprx                  = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : fep_full;                   // this is frequency-shift + DFTs
-    ru->feptx_prec             = feptx_prec;                 // need to do transmit Precoding + IDFTs
-    ru->feptx_ofdm             = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread;                 // need to do transmit Precoding + IDFTs
-    
-    if (ru->if_timing == synch_to_other) {
-      ru->fh_south_in          = fh_slave_south_in;                  // synchronize to master
-      ru->fh_south_out         = fh_if5_mobipass_south_out;          // use send_IF5 for mobipass
-      ru->fh_south_asynch_in   = fh_if5_south_asynch_in_mobipass;    // UL is asynchronous
-    } else {
-      ru->fh_south_in          = fh_if5_south_in;     // synchronous IF5 reception
-      ru->fh_south_out         = fh_if5_south_out;    // synchronous IF5 transmission
-      ru->fh_south_asynch_in   = NULL;                // no asynchronous UL
-    }
-    
-    ru->start_rf               = NULL;                 // no local RF
-    ru->stop_rf                = NULL;
-    ru->start_if               = start_if;             // need to start if interface for IF5
-    ru->ifdevice.host_type     = RAU_HOST;
-    ru->ifdevice.eth_params    = &ru->eth_params;
-    ru->ifdevice.configure_rru = configure_ru;
-    ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
-    printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
-    
-    if (ret<0) {
-      printf("Exiting, cannot initialize transport protocol\n");
-      exit(-1);
-    }
-    
-    break;
-    
-  case REMOTE_IF4p5:
-    ru->do_prach               = 0;
-    ru->feprx                  = NULL;                // DFTs
-    ru->feptx_prec             = feptx_prec;          // Precoding operation
-    ru->feptx_ofdm             = NULL;                // no OFDM mod
-    ru->fh_south_in            = fh_if4p5_south_in;   // synchronous IF4p5 reception
-    ru->fh_south_out           = fh_if4p5_south_out;  // synchronous IF4p5 transmission
-    ru->fh_south_asynch_in     = (ru->if_timing == synch_to_other) ? fh_if4p5_south_in : NULL;                // asynchronous UL if synch_to_other
-    ru->fh_north_out           = NULL;
-    ru->fh_north_asynch_in     = NULL;
-    ru->start_rf               = NULL;                // no local RF
-    ru->stop_rf                = NULL;
-    ru->start_if               = start_if;            // need to start if interface for IF4p5
-    ru->ifdevice.host_type     = RAU_HOST;
-    ru->ifdevice.eth_params    = &ru->eth_params;
-    ru->ifdevice.configure_rru = configure_ru;
-    ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg, &ru->eth_params);
-    printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
-    
-    if (ret<0) {
-      printf("Exiting, cannot initialize transport protocol\n");
-      exit(-1);
-    }
-    malloc_IF4p5_buffer(ru);
-    break;
-  
-  default:
-    LOG_E(PHY,"RU with invalid or unknown southbound interface type %d\n",ru->if_south);
-    break;
+      break;
+
+    default:
+      LOG_E(PHY,"RU with invalid or unknown southbound interface type %d\n",ru->if_south);
+      break;
   } // switch on interface type
 }
- 
+
 //extern void RCconfig_RU(void);
 
 void init_RU(char *rf_config_file,
              clock_source_t clock_source,
              clock_source_t time_source,
-             int send_dmrssync)
-{
+             int send_dmrssync) {
   int ru_id;
   RU_t *ru;
   PHY_VARS_eNB *eNB0     = (PHY_VARS_eNB *)NULL;
@@ -2782,31 +2713,36 @@ void init_RU(char *rf_config_file,
     ru->rf_config_file = rf_config_file;
     ru->idx          = ru_id;
     ru->ts_offset    = 0;
+
     if (ru->is_slave == 1) {
-       ru->in_synch    = 0;
-       ru->generate_dmrs_sync = 0; 	
-    }
-    else {
-       ru->in_synch    = 1;
-       ru->generate_dmrs_sync=send_dmrssync;
+      ru->in_synch    = 0;
+      ru->generate_dmrs_sync = 0;
+    } else {
+      ru->in_synch    = 1;
+      ru->generate_dmrs_sync=send_dmrssync;
     }
-    ru->cmd	     = EMPTY;
+
+    ru->cmd      = EMPTY;
     ru->south_out_cnt= 0;
     // use eNB_list[0] as a reference for RU frame parameters
     // NOTE: multiple CC_id are not handled here yet!
     ru->openair0_cfg.clock_source  = clock_source;
     ru->openair0_cfg.time_source = time_source;
+
     //ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
     if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
       ru->generate_dmrs_sync = 1;
     else
       ru->generate_dmrs_sync = 0;
+
     if (ru->generate_dmrs_sync == 1) {
       generate_ul_ref_sigs();
-      ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
+      ru->dmrssync = (int16_t *)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
     }
+
     ru->wakeup_L1_sleeptime = 2000;
     ru->wakeup_L1_sleep_cnt_max  = 3;
+
     if (ru->num_eNB > 0) {
       LOG_D(PHY, "%s() RC.ru[%d].num_eNB:%d ru->eNB_list[0]:%p RC.eNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_eNB, ru->eNB_list[0], RC.eNB[0][0], ru->rf_config_file);
 
@@ -2826,6 +2762,7 @@ void init_RU(char *rf_config_file,
     fp               = ru->frame_parms;
     LOG_D(PHY, "RU FUnction:%d ru->if_south:%d\n", ru->function, ru->if_south);
     LOG_D(PHY, "eNB0:%p   fp:%p\n", eNB0, fp);
+
     if (eNB0) {
       if ((ru->function != NGFI_RRU_IF5) && (ru->function != NGFI_RRU_IF4p5))
         AssertFatal(eNB0!=NULL,"eNB0 is null!\n");
@@ -2842,52 +2779,54 @@ void init_RU(char *rf_config_file,
         }
       }
     }
+
     LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
     set_function_spec_param(ru);
     LOG_I(PHY,"Starting ru_thread %d, is_slave %d, send_dmrs %d\n",ru_id,ru->is_slave,ru->generate_dmrs_sync);
-
     init_RU_proc(ru);
   } // for ru_id
-  
+
   //  sleep(1);
   LOG_D(HW,"[lte-softmodem.c] RU threads created\n");
 }
 
 
-void stop_ru(RU_t *ru)
-{
+void stop_ru(RU_t *ru) {
 #if defined(PRE_SCD_THREAD) || defined(PHY_TX_THREAD)
   int *status;
 #endif
-  printf("Stopping RU %p processing threads\n",(void*)ru);
+  printf("Stopping RU %p processing threads\n",(void *)ru);
 #if defined(PRE_SCD_THREAD)
-  if(ru){
+
+  if(ru) {
     ru->proc.instance_pre_scd = 0;
     pthread_cond_signal( &ru->proc.cond_pre_scd );
-    pthread_join(ru->proc.pthread_pre_scd, (void**)&status );
+    pthread_join(ru->proc.pthread_pre_scd, (void **)&status );
     pthread_mutex_destroy(&ru->proc.mutex_pre_scd );
     pthread_cond_destroy(&ru->proc.cond_pre_scd );
   }
+
 #endif
 #ifdef PHY_TX_THREAD
-  if(ru){
-      ru->proc.instance_cnt_phy_tx = 0;
-      pthread_cond_signal(&ru->proc.cond_phy_tx);
-      pthread_join( ru->proc.pthread_phy_tx, (void**)&status );
-      pthread_mutex_destroy( &ru->proc.mutex_phy_tx );
-      pthread_cond_destroy( &ru->proc.cond_phy_tx );
-      ru->proc.instance_cnt_rf_tx = 0;
-      pthread_cond_signal(&ru->proc.cond_rf_tx);
-      pthread_join( ru->proc.pthread_rf_tx, (void**)&status );
-      pthread_mutex_destroy( &ru->proc.mutex_rf_tx );
-      pthread_cond_destroy( &ru->proc.cond_rf_tx );
+
+  if(ru) {
+    ru->proc.instance_cnt_phy_tx = 0;
+    pthread_cond_signal(&ru->proc.cond_phy_tx);
+    pthread_join( ru->proc.pthread_phy_tx, (void **)&status );
+    pthread_mutex_destroy( &ru->proc.mutex_phy_tx );
+    pthread_cond_destroy( &ru->proc.cond_phy_tx );
+    ru->proc.instance_cnt_rf_tx = 0;
+    pthread_cond_signal(&ru->proc.cond_rf_tx);
+    pthread_join( ru->proc.pthread_rf_tx, (void **)&status );
+    pthread_mutex_destroy( &ru->proc.mutex_rf_tx );
+    pthread_cond_destroy( &ru->proc.cond_rf_tx );
   }
+
 #endif
 }
 
 
-void stop_RU(int nb_ru)
-{
+void stop_RU(int nb_ru) {
   for (int inst = 0; inst < nb_ru; inst++) {
     LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
     kill_RU_proc(RC.ru[inst]);
@@ -2987,8 +2926,7 @@ void init_ru_vnf(void) {
 
 /* --------------------------------------------------------*/
 /* from here function to use configuration module          */
-void RCconfig_RU(void)
-{
+void RCconfig_RU(void) {
   int i = 0;
   paramdef_t RUParams[] = RUPARAMS_DESC;
   paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
@@ -3010,7 +2948,8 @@ void RCconfig_RU(void)
         RC.ru[j]->num_eNB                           = RUParamList.paramarray[j][RU_ENB_LIST_IDX].numelt;
       else
         RC.ru[j]->num_eNB                           = 0;
-      for (i=0;i<RC.ru[j]->num_eNB;i++) RC.ru[j]->eNB_list[i] = RC.eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0];     
+
+      for (i=0; i<RC.ru[j]->num_eNB; i++) RC.ru[j]->eNB_list[i] = RC.eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0];
 
       RC.ru[j]->has_ctrl_prt                        = 1;
 
@@ -3039,65 +2978,63 @@ void RCconfig_RU(void)
           RC.ru[j]->function                        = eNodeB_3GPP;
           RC.ru[j]->state                           = RU_RUN;
           printf("Setting function for RU %d to eNodeB_3GPP\n",j);
-        }
-        else { 
-          RC.ru[j]->eth_params.local_if_name            = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));    
-          RC.ru[j]->eth_params.my_addr                  = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); 
+        } else {
+          RC.ru[j]->eth_params.local_if_name            = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));
+          RC.ru[j]->eth_params.my_addr                  = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr));
           RC.ru[j]->eth_params.remote_addr              = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr));
           RC.ru[j]->eth_params.my_portd                 = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr);
           RC.ru[j]->eth_params.remote_portd             = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr);
 
-	  // Check if control port set
-	  if  (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ){
-        printf("Removing control port for RU %d\n",j);
+          // Check if control port set
+          if  (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) {
+            printf("Removing control port for RU %d\n",j);
+            RC.ru[j]->has_ctrl_prt            = 0;
+          } else {
+            RC.ru[j]->eth_params.my_portc                 = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
+            RC.ru[j]->eth_params.remote_portc             = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
+            printf(" Control port %u \n",RC.ru[j]->eth_params.my_portc);
+          }
+
+          if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
+            RC.ru[j]->if_south                        = LOCAL_RF;
+            RC.ru[j]->function                        = NGFI_RRU_IF5;
+            RC.ru[j]->eth_params.transp_preference    = ETH_UDP_MODE;
+            printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
+          } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
+            RC.ru[j]->if_south                        = LOCAL_RF;
+            RC.ru[j]->function                        = NGFI_RRU_IF5;
+            RC.ru[j]->eth_params.transp_preference    = ETH_RAW_MODE;
+            printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
+          } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
+            RC.ru[j]->if_south                        = LOCAL_RF;
+            RC.ru[j]->function                        = NGFI_RRU_IF4p5;
+            RC.ru[j]->eth_params.transp_preference    = ETH_UDP_IF4p5_MODE;
+            printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
+          } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
+            RC.ru[j]->if_south                        = LOCAL_RF;
+            RC.ru[j]->function                        = NGFI_RRU_IF4p5;
+            RC.ru[j]->eth_params.transp_preference    = ETH_RAW_IF4p5_MODE;
+            printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
+          }
 
-        RC.ru[j]->has_ctrl_prt			      = 0;
-      }
-	  else {
-	    RC.ru[j]->eth_params.my_portc                 = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
-	    RC.ru[j]->eth_params.remote_portc             = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
-
-	    printf(" Control port %u \n",RC.ru[j]->eth_params.my_portc);
-	  }
-
-	  if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
-	    RC.ru[j]->if_south                        = LOCAL_RF;
-	    RC.ru[j]->function                        = NGFI_RRU_IF5;
-	    RC.ru[j]->eth_params.transp_preference    = ETH_UDP_MODE;
-           
-	    printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
-	  } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
-	    RC.ru[j]->if_south                        = LOCAL_RF;
-	    RC.ru[j]->function                        = NGFI_RRU_IF5;
-	    RC.ru[j]->eth_params.transp_preference    = ETH_RAW_MODE;
-	  
-	    printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
-	  } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
-	    RC.ru[j]->if_south                        = LOCAL_RF;
-	    RC.ru[j]->function                        = NGFI_RRU_IF4p5;
-	    RC.ru[j]->eth_params.transp_preference    = ETH_UDP_IF4p5_MODE;
-	 
-	    printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
-	  } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
-	    RC.ru[j]->if_south                        = LOCAL_RF;
-	    RC.ru[j]->function                        = NGFI_RRU_IF4p5;
-	    RC.ru[j]->eth_params.transp_preference    = ETH_RAW_IF4p5_MODE;
-	
-	    printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
-	  }
           printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
+
           if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
           else RC.ru[j]->is_slave=0;
+
           printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
+
           if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) RC.ru[j]->ota_sync_enable=1;
           else RC.ru[j]->ota_sync_enable=0;
-	}
-	RC.ru[j]->max_pdschReferenceSignalPower     = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
-	RC.ru[j]->max_rxgain                        = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
-	RC.ru[j]->num_bands                         = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
-	/* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */
+        }
+
+        RC.ru[j]->max_pdschReferenceSignalPower     = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
+        RC.ru[j]->max_rxgain                        = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
+        RC.ru[j]->num_bands                         = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
+        /* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */
         RC.ru[j]->sf_extension                      = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr);
-	for (i=0;i<RC.ru[j]->num_bands;i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i]; 
+
+        for (i=0; i<RC.ru[j]->num_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
       } //strcmp(local_rf, "yes") == 0
       else {
         printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr));
@@ -3131,6 +3068,7 @@ void RCconfig_RU(void)
           RC.ru[j]->if_timing                    = synch_to_other;
           RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF5_MOBIPASS;
         }
+
         if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
         else RC.ru[j]->is_slave=0;
       }  /* strcmp(local_rf, "yes") != 0 */
diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c
index abbcb6ddfd2796894b87b1be26e68bcbf676ffbd..d13abfc75323041f9a107b1a5b9fbe615244cc78 100644
--- a/targets/RT/USER/ru_control.c
+++ b/targets/RT/USER/ru_control.c
@@ -428,14 +428,12 @@ void configure_ru(int idx,
     LOG_I(PHY,"REMOTE_IF4p5: prach_FrequOffset %d, prach_ConfigIndex %d\n",
 	  config->prach_FreqOffset[0],config->prach_ConfigIndex[0]);
     
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     int i;
     for (i=0;i<4;i++) {
       config->emtc_prach_CElevel_enable[0][i]  = ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i];
       config->emtc_prach_FreqOffset[0][i]      = ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[i];
       config->emtc_prach_ConfigIndex[0][i]     = ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i];
     }
-#endif
   }
 
   init_frame_parms(ru->frame_parms,1);
@@ -473,13 +471,11 @@ void configure_rru(int idx,
 	  config->prach_FreqOffset[0],config->prach_ConfigIndex[0],ru->att_tx,ru->att_rx);
     ru->frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset  = config->prach_FreqOffset[0];
     ru->frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = config->prach_ConfigIndex[0];
-#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
     for (int i=0;i<4;i++) {
       ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] = config->emtc_prach_CElevel_enable[0][i];
       ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[i]     = config->emtc_prach_FreqOffset[0][i];
       ru->frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i]    = config->emtc_prach_ConfigIndex[0][i];
     }
-#endif
   }
   
   init_frame_parms(ru->frame_parms,1);