Removed sub-viewing with z because it caused the output file names to be shifted by min(z).