publish safe method