implemented diagonal blocking