fixed interleave.py to count properly