layer validation and layer order working