use layer instead of removed vector_layer function