add publishing functionality