trying to figure out z index