implement publish