diff --git a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
index fd201e87ac28c77bb42f8f23850f793ed474ab9c..41135da38f92997217f2286c7e9daf1155e56b3b 100755
--- a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
+++ b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
@@ -225,7 +225,8 @@ module hpp
     /// between two indicated states. Will fail if the index of the states do not exist
     /// \param state1
     /// \param state2 index of second state.
-    void interpolateBetweenStates(in double state1, in double state2) raises (Error);
+    /// \param numOptimizations Number of iterations of the shortcut algorithm to apply between each states
+    void interpolateBetweenStates(in double state1, in double state2, in unsigned short numOptimizations) raises (Error);
 
     /// Saves the last computed states by the function interpolate in a filename.
     /// Raises an error if interpolate has not been called, or the file could not be opened.
diff --git a/src/hpp/corbaserver/rbprm/rbprmfullbody.py b/src/hpp/corbaserver/rbprm/rbprmfullbody.py
index 2686320aa01ad14f22635334625624b54840e0fa..a8525347d6db7bd5cd313dcfd514b7b6a253f9d1 100755
--- a/src/hpp/corbaserver/rbprm/rbprmfullbody.py
+++ b/src/hpp/corbaserver/rbprm/rbprmfullbody.py
@@ -248,8 +248,9 @@ class FullBody (object):
 	#
     # \param index of first state.
     # \param index of second state.
-    def interpolateBetweenStates(self, state1, state2):
-		return self.client.rbprm.rbprm.interpolateBetweenStates(state1, state2)
+    # \param numOptim Number of iterations of the shortcut algorithm to apply between each states
+    def interpolateBetweenStates(self, state1, state2, numOptim = 10):
+		return self.client.rbprm.rbprm.interpolateBetweenStates(state1, state2, numOptim)
 		
 		
 		
diff --git a/src/rbprmbuilder.impl.cc b/src/rbprmbuilder.impl.cc
index a3840b9826a992253c7cd4f28e47f979bd2eb6bd..00b8e4615c89f39004c03eb24c858a38db563cf7 100755
--- a/src/rbprmbuilder.impl.cc
+++ b/src/rbprmbuilder.impl.cc
@@ -644,7 +644,7 @@ namespace hpp {
         }
     }
 
-    void RbprmBuilder::interpolateBetweenStates(double state1, double state2) throw (hpp::Error)
+    void RbprmBuilder::interpolateBetweenStates(double state1, double state2, unsigned short numOptimizations) throw (hpp::Error)
     {
         try
         {
@@ -656,7 +656,7 @@ namespace hpp {
             //create helper
 //            /interpolation::LimbRRTHelper helper(fullBody_, problemSolver_->problem());
             core::PathVectorPtr_t path = interpolation::interpolateStates(fullBody_,problemSolver_->problem(),
-                                                                          lastStatesComputed_.begin()+s1,lastStatesComputed_.begin()+s2);
+                                                                          lastStatesComputed_.begin()+s1,lastStatesComputed_.begin()+s2, numOptimizations);
             problemSolver_->addPath(path);
             problemSolver_->robot()->setDimensionExtraConfigSpace(problemSolver_->robot()->extraConfigSpace().dimension()+1);
         }
diff --git a/src/rbprmbuilder.impl.hh b/src/rbprmbuilder.impl.hh
index a713fbbdc5cc02d429596b423af3a1d7cbddc36a..54db0bc964baf3ca4493b6b8e942f52d49d8336d 100755
--- a/src/rbprmbuilder.impl.hh
+++ b/src/rbprmbuilder.impl.hh
@@ -127,7 +127,7 @@ namespace hpp {
         virtual void setEndState(const hpp::floatSeq& configuration, const hpp::Names_t& contactLimbs) throw (hpp::Error);
         virtual hpp::floatSeqSeq* interpolate(double timestep, double path, double robustnessTreshold) throw (hpp::Error);
         virtual hpp::floatSeqSeq* interpolateConfigs(const hpp::floatSeqSeq& configs, double robustnessTreshold) throw (hpp::Error);
-        virtual void interpolateBetweenStates(double state1, double state2) throw (hpp::Error);
+        virtual void interpolateBetweenStates(double state1, double state2, unsigned short numOptimizations) throw (hpp::Error);
         virtual void saveComputedStates(const char* filepath) throw (hpp::Error);
         virtual void saveLimbDatabase(const char* limbname,const char* filepath) throw (hpp::Error);
         virtual hpp::floatSeq* getOctreeBox(const char* limbName, double sampleId) throw (hpp::Error);