implemented the layers feature.