added sub method #publish