abstracted publish method