sigh, I-DCT had to reverse the order of middle loop to stop