2014.10.16.2140 : added looping functions to script-modecouple