Use Publish function for event