added publish method with a string payload