added loopPre