loopStack should be raw array.