why pass this as an object and not just the layer itself?