add variable z_dim