rewrote voxel function in Registration. works correctly.