Completed Publish function