added publishing functionality