Put z_index into variables