first compiling, untested sequential based forloop mode switching