updates to publish logic