unroll outer loop