change layers property from object to layer to ease the implementation of exclude layer