Adding functionality for auto-publish