corrected the last algorithm to do a block swap.

probabalistic way of swapping blocks