Add setLayers method