some functions put together in publish action