put layers in order