fixed blocks declaration, now works for square matrices more than N = 22