updated block, Z, Hilbert order with 3D support