changed publish method