updating publish method in listeners