add publish switch