change publish function interface