Added hilbert and z curve sorting