implemented interleave