modefied the return value of publish()