updated voxel function to include corresponding planes