set Z positions of layers