overrode publish task method