first version of block rotation algorythm.

BROKEN