added argument getLayer(as.class='list')