make apply_to_layer public