added publish method